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 p_230550_, BlockPos p_230551_, FluidState p_230552_, RandomSource p_230553_) Deprecated.protected abstract booleancanBeReplacedWith(FluidState p_76127_, BlockGetter p_76128_, BlockPos p_76129_, Fluid p_76130_, Direction p_76131_) protected voidprotected abstract BlockStatecreateLegacyBlock(FluidState p_76136_) final FluidStateabstract intgetAmount(FluidState p_76141_) abstract Itemprotected ParticleOptionsprotected abstract floatprotected abstract Vec3getFlow(BlockGetter p_76110_, BlockPos p_76111_, FluidState p_76112_) Returns the type of this fluid.abstract floatgetHeight(FluidState p_76124_, BlockGetter p_76125_, BlockPos p_76126_) abstract floatgetOwnHeight(FluidState p_76123_) abstract VoxelShapegetShape(FluidState p_76137_, BlockGetter p_76138_, BlockPos p_76139_) abstract intgetTickDelay(LevelReader p_76120_) booleanDeprecated.protected booleanisEmpty()protected booleanbooleanabstract booleanisSource(FluidState p_76140_) protected voidrandomTick(Level p_230554_, BlockPos p_230555_, FluidState p_230556_, RandomSource p_230557_) protected final voidregisterDefaultState(FluidState p_76143_) protected voidtick(Level p_76113_, BlockPos p_76114_, FluidState p_76115_) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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
protected void animateTick(Level p_230550_, BlockPos p_230551_, FluidState p_230552_, RandomSource p_230553_) -
tick
-
randomTick
protected void randomTick(Level p_230554_, BlockPos p_230555_, FluidState p_230556_, RandomSource p_230557_) -
getDripParticle
-
canBeReplacedWith
protected abstract boolean canBeReplacedWith(FluidState p_76127_, BlockGetter p_76128_, BlockPos p_76129_, Fluid p_76130_, Direction p_76131_) -
getFlow
-
getTickDelay
-
isRandomlyTicking
protected boolean isRandomlyTicking() -
isEmpty
protected boolean isEmpty() -
getExplosionResistance
protected abstract float getExplosionResistance() -
getHeight
-
getOwnHeight
-
createLegacyBlock
-
isSource
-
getAmount
-
isSame
-
is
Deprecated. -
getShape
-
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.
-