Class CauldronFluidContent

java.lang.Object
net.neoforged.neoforge.fluids.CauldronFluidContent

public final class CauldronFluidContent extends Object
Fluid content information for cauldrons.

Empty, water and lava cauldrons are registered by default, and additional cauldrons must be registered with RegisterCauldronFluidContentEvent. Contents can be queried with getForBlock(Block) and getForFluid(Fluid).

The CauldronFluidContent itself defines:

  • The block of the cauldron.
  • The fluid that can be accepted by the cauldron. NBT is discarded when entering the cauldron.
  • Which fluid amounts can be stored in the cauldron, and how they map to the level property of the cauldron. If levelProperty is null, then maxLevel = 1, and there is only one level. Otherwise, the levels are all the integer values between 1 and maxLevel (included).
  • totalAmount defines how much fluid (in millibuckets) there is in one level of the cauldron.
  • Field Details

    • block

      public final Block block
      Block of the cauldron.
    • fluid

      public final Fluid fluid
      Fluid stored inside the cauldron.
    • totalAmount

      public final int totalAmount
      Amount of #fluid in millibuckets in the entire full cauldron.
    • maxLevel

      public final int maxLevel
      Maximum level for levelProperty. 1 if levelProperty is null, otherwise a number >= 1. The minimum level is always 1.
    • levelProperty

      public final @Nullable IntegerProperty levelProperty
      Property storing the level of the cauldron. If it's null, only one level is possible.
    • BLOCK_TO_CAULDRON

      private static final Map<Block, CauldronFluidContent> BLOCK_TO_CAULDRON
    • FLUID_TO_CAULDRON

      private static final Map<Fluid, CauldronFluidContent> FLUID_TO_CAULDRON
  • Constructor Details

  • Method Details