Enum Class CauldronSpoutingBehavior

java.lang.Object
java.lang.Enum<CauldronSpoutingBehavior>
com.simibubi.create.api.behaviour.spouting.CauldronSpoutingBehavior
All Implemented Interfaces:
BlockSpoutingBehaviour, Serializable, Comparable<CauldronSpoutingBehavior>, Constable

public enum CauldronSpoutingBehavior extends Enum<CauldronSpoutingBehavior> implements BlockSpoutingBehaviour
BlockSpoutingBehaviour for empty cauldrons. Mods can register their fluids to CAULDRON_INFO to allow spouts to fill empty cauldrons with their fluids.
  • Enum Constant Details

  • Field Details

  • Method Details

    • values

      public static CauldronSpoutingBehavior[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CauldronSpoutingBehavior valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • fillBlock

      public int fillBlock(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, SpoutBlockEntity spout, net.neoforged.neoforge.fluids.FluidStack availableFluid, boolean simulate)
      Description copied from interface: BlockSpoutingBehaviour
      While idle, spouts will query the behavior provided by the block below it. If one is present, this method will be called every tick with simulate == true.

      When a value greater than 0 is returned, the spout will begin processing. It will call this method again with simulate == false, which is when any filling behavior should actually occur.

      This method is only called on the server side, except for in Ponder.

      Specified by:
      fillBlock in interface BlockSpoutingBehaviour
      Parameters:
      level - The current level
      pos - The position of the affected block
      spout - The spout block entity that is calling this
      availableFluid - A copy of the fluidStack that is available, modifying this will do nothing, return the amount to be subtracted instead
      simulate - Whether the spout is testing or actually performing this behaviour
      Returns:
      The amount filled into the block, 0 to idle/cancel