Interface RitualRequirement


public interface RitualRequirement
Represents a passive ritual requirement. These requirements are checked before the ritual effects are performed.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<RitualRequirement>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.mojang.serialization.MapCodec<? extends RitualRequirement>
     
    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.
    boolean
    test(@Nullable net.minecraft.world.entity.player.Player player, net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 vec)
     
  • Field Details

  • 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 - The Player triggering the ritual.
      level - The Level the ritual is triggered in.
      vec - The Vec3 the 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 - The Player triggering the ritual.
      level - The Level the ritual is triggered in.
      vec - The Vec3 the ritual is triggered at.