Class Fluid
java.lang.Object
net.minecraft.world.level.material.Fluid
- All Implemented Interfaces:
- IFluidExtension
- Direct Known Subclasses:
- EmptyFluid,- FlowingFluid
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final Holder.Reference<Fluid>private FluidStatestatic final IdMapper<FluidState>private FluidTypeprotected final StateDefinition<Fluid,FluidState> 
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.common.extensions.IFluidExtensioncanConvertToSource, canExtinguish, canHydrate, getAdjacentBlockPathType, getBlockPathType, getExplosionResistance, move, supportsBoating
- 
Field Details- 
FLUID_STATE_REGISTRY
- 
stateDefinition
- 
defaultFluidState
- 
builtInRegistryHolder
- 
forgeFluidType
 
- 
- 
Constructor Details- 
Fluidprotected Fluid()
 
- 
- 
Method Details- 
createFluidStateDefinition
- 
getStateDefinition
- 
registerDefaultState
- 
defaultFluidState
- 
getBucket
- 
animateTickprotected void animateTick(Level p_230550_, BlockPos p_230551_, FluidState p_230552_, RandomSource p_230553_) 
- 
tick
- 
randomTickprotected void randomTick(Level p_230554_, BlockPos p_230555_, FluidState p_230556_, RandomSource p_230557_) 
- 
getDripParticle
- 
canBeReplacedWithprotected abstract boolean canBeReplacedWith(FluidState p_76127_, BlockGetter p_76128_, BlockPos p_76129_, Fluid p_76130_, Direction p_76131_) 
- 
getFlow
- 
getTickDelay
- 
isRandomlyTickingprotected boolean isRandomlyTicking()
- 
isEmptyprotected boolean isEmpty()
- 
getExplosionResistanceprotected abstract float getExplosionResistance()
- 
getHeight
- 
getOwnHeight
- 
createLegacyBlock
- 
isSource
- 
getAmount
- 
isSame
- 
isDeprecated.
- 
getShape
- 
getFluidTypeDescription 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 interface- IFluidExtension
- Returns:
- the type of this fluid
 
- 
getPickupSound
- 
builtInRegistryHolderDeprecated.
 
-