Class Fluid
java.lang.Object
net.minecraft.world.level.material.Fluid
- All Implemented Interfaces:
IFluidExtension
- Direct Known Subclasses:
EmptyFluid
,FlowingFluid
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Holder.Reference
<Fluid> private FluidState
static final IdMapper
<FluidState> private FluidType
protected final StateDefinition
<Fluid, FluidState> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
animateTick
(Level pLevel, BlockPos pPos, FluidState pState, RandomSource pRandom) Deprecated.protected abstract boolean
canBeReplacedWith
(FluidState pState, BlockGetter pLevel, BlockPos pPos, Fluid pFluid, Direction pDirection) protected void
protected abstract BlockState
createLegacyBlock
(FluidState pState) final FluidState
abstract int
getAmount
(FluidState pState) abstract Item
protected ParticleOptions
protected abstract float
protected abstract Vec3
getFlow
(BlockGetter pBlockReader, BlockPos pPos, FluidState pFluidState) Returns the type of this fluid.abstract float
getHeight
(FluidState pState, BlockGetter pLevel, BlockPos pPos) abstract float
getOwnHeight
(FluidState pState) abstract VoxelShape
getShape
(FluidState pState, BlockGetter pLevel, BlockPos pPos) abstract int
getTickDelay
(LevelReader pLevel) boolean
Deprecated.protected boolean
isEmpty()
protected boolean
boolean
abstract boolean
isSource
(FluidState pState) protected void
randomTick
(Level pLevel, BlockPos pPos, FluidState pState, RandomSource pRandom) protected final void
registerDefaultState
(FluidState pState) protected void
tick
(Level pLevel, BlockPos pPos, FluidState pState) toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.neoforged.neoforge.common.extensions.IFluidExtension
canConvertToSource, canExtinguish, canHydrate, getAdjacentBlockPathType, getBlockPathType, getExplosionResistance, move, supportsBoating
-
Field Details
-
FLUID_STATE_REGISTRY
-
stateDefinition
-
defaultFluidState
-
builtInRegistryHolder
-
forgeFluidType
-
-
Constructor Details
-
Fluid
protected Fluid()
-
-
Method Details
-
createFluidStateDefinition
-
getStateDefinition
-
registerDefaultState
-
defaultFluidState
-
getBucket
-
animateTick
-
tick
-
randomTick
-
getDripParticle
-
canBeReplacedWith
protected abstract boolean canBeReplacedWith(FluidState pState, BlockGetter pLevel, BlockPos pPos, Fluid pFluid, Direction pDirection) -
getFlow
-
getTickDelay
-
isRandomlyTicking
protected boolean isRandomlyTicking() -
isEmpty
protected boolean isEmpty() -
getExplosionResistance
protected abstract float getExplosionResistance() -
getHeight
-
getOwnHeight
-
createLegacyBlock
-
isSource
-
getAmount
-
isSame
-
is
Deprecated. -
getShape
-
toString
-
getFluidType
Description copied from interface:IFluidExtension
Returns the type of this fluid.Important: This MUST be overridden on your fluid, otherwise an error will be thrown.
- Specified by:
getFluidType
in interfaceIFluidExtension
- Returns:
- the type of this fluid
-
getPickupSound
-
builtInRegistryHolder
Deprecated.
-