Enum Class SpoutCasting
- All Implemented Interfaces:
BlockSpoutingBehaviour,Serializable,Comparable<SpoutCasting>,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields inherited from interface com.simibubi.create.api.behaviour.spouting.BlockSpoutingBehaviour
BY_BLOCK, BY_BLOCK_ENTITY -
Method Summary
Modifier and TypeMethodDescriptionintfillBlock(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, SpoutBlockEntity spout, net.neoforged.neoforge.fluids.FluidStack availableFluid, boolean simulate) While idle, spouts will query the behavior provided by the block below it.static SpoutCastingReturns the enum constant of this class with the specified name.static SpoutCasting[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
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
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 nameNullPointerException- 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:BlockSpoutingBehaviourWhile 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:
fillBlockin interfaceBlockSpoutingBehaviour- Parameters:
level- The current levelpos- The position of the affected blockspout- The spout block entity that is calling thisavailableFluid- A copy of the fluidStack that is available, modifying this will do nothing, return the amount to be subtracted insteadsimulate- Whether the spout is testing or actually performing this behaviour- Returns:
- The amount filled into the block, 0 to idle/cancel
-