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 FluidStatestatic final IdMapper<FluidState> private FluidTypeprotected final StateDefinition<Fluid, FluidState> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidanimateTick(Level level, BlockPos pos, FluidState state, RandomSource random) Deprecated.protected abstract booleancanBeReplacedWith(FluidState state, BlockGetter level, BlockPos pos, Fluid fluid, Direction direction) protected voidprotected abstract BlockStatecreateLegacyBlock(FluidState state) final FluidStateabstract intgetAmount(FluidState state) abstract Itemprotected ParticleOptionsprotected abstract floatprotected abstract Vec3getFlow(BlockGetter blockReader, BlockPos pos, FluidState fluidState) Returns the type of this fluid.abstract floatgetHeight(FluidState state, BlockGetter level, BlockPos pos) abstract floatgetOwnHeight(FluidState state) abstract VoxelShapegetShape(FluidState state, BlockGetter level, BlockPos pos) abstract intgetTickDelay(LevelReader level) booleanDeprecated.protected booleanisEmpty()protected booleanbooleanabstract booleanisSource(FluidState state) protected voidrandomTick(Level level, BlockPos pos, FluidState state, RandomSource random) protected final voidregisterDefaultState(FluidState state) protected voidtick(Level level, BlockPos pos, FluidState state) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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 state, BlockGetter level, BlockPos pos, Fluid fluid, Direction direction) -
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:IFluidExtensionReturns the type of this fluid.Important: This MUST be overridden on your fluid, otherwise an error will be thrown.
- Specified by:
getFluidTypein interfaceIFluidExtension- Returns:
- the type of this fluid
-
getPickupSound
-
builtInRegistryHolder
Deprecated.
-