Interface RitualRequirement
public interface RitualRequirement
Represents a passive ritual requirement. These requirements are checked before the ritual effects are performed.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<? extends RitualRequirement> codec()default voidconsume(@Nullable net.minecraft.world.entity.player.Player player, net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 vec) Consumes the requirement, if applicable and the ritual was successful.booleantest(@Nullable net.minecraft.world.entity.player.Player player, net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 vec)
-
Field Details
-
CODEC
-
-
Method Details
-
codec
com.mojang.serialization.MapCodec<? extends RitualRequirement> codec()- Returns:
- The registered
MapCodec.
-
test
boolean test(@Nullable net.minecraft.world.entity.player.Player player, net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 vec) - Parameters:
player- ThePlayertriggering the ritual.level- TheLevelthe ritual is triggered in.vec- TheVec3the ritual is triggered at.- Returns:
- Whether the requirement was met or not.
-
consume
default void consume(@Nullable net.minecraft.world.entity.player.Player player, net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 vec) Consumes the requirement, if applicable and the ritual was successful. For example, the ingredient ritual requirement consumes the dropped items here.- Parameters:
player- ThePlayertriggering the ritual.level- TheLevelthe ritual is triggered in.vec- TheVec3the ritual is triggered at.
-