Class Fluid
- All Implemented Interfaces:
IForgeFluid
,IForgeRegistryEntry<Fluid>
- Direct Known Subclasses:
EmptyFluid
,FlowingFluid
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>>
-
Field Summary
Modifier and TypeFieldDescriptionprivate FluidState
static IdMapper<FluidState>
private FluidAttributes
private ReverseTagWrapper<Fluid>
protected StateDefinition<Fluid,FluidState>
Fields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
animateTick(Level p_76116_, BlockPos p_76117_, FluidState p_76118_, Random p_76119_)
protected abstract boolean
canBeReplacedWith(FluidState p_76127_, BlockGetter p_76128_, BlockPos p_76129_, Fluid p_76130_, Direction p_76131_)
protected FluidAttributes
Creates the fluid attributes object, which will contain all the extended values for the fluid that aren't part of the vanilla system.protected void
createFluidStateDefinition(StateDefinition.Builder<Fluid,FluidState> p_76121_)
protected abstract BlockState
createLegacyBlock(FluidState p_76136_)
abstract int
getAmount(FluidState p_76141_)
Retrieves the non-vanilla fluid attributes, including localized name.abstract Item
protected ParticleOptions
protected abstract float
protected abstract Vec3
getFlow(BlockGetter p_76110_, BlockPos p_76111_, FluidState p_76112_)
abstract float
getHeight(FluidState p_76124_, BlockGetter p_76125_, BlockPos p_76126_)
abstract float
getOwnHeight(FluidState p_76123_)
abstract VoxelShape
getShape(FluidState p_76137_, BlockGetter p_76138_, BlockPos p_76139_)
getTags()
Retrieves a list of tags names this is known to be associated with.abstract int
getTickDelay(LevelReader p_76120_)
boolean
protected boolean
isEmpty()
protected boolean
boolean
abstract boolean
isSource(FluidState p_76140_)
protected void
randomTick(Level p_76132_, BlockPos p_76133_, FluidState p_76134_, Random p_76135_)
protected void
registerDefaultState(FluidState p_76143_)
protected void
tick(Level p_76113_, BlockPos p_76114_, FluidState p_76115_)
Methods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraftforge.common.extensions.IForgeFluid
getExplosionResistance, isAABBInsideLiquid, isAABBInsideMaterial, isEntityInside
-
Field Details
-
FLUID_STATE_REGISTRY
-
stateDefinition
-
defaultFluidState
-
reverseTags
-
forgeFluidAttributes
-
-
Constructor Details
-
Fluid
protected Fluid()
-
-
Method Details
-
createFluidStateDefinition
-
getStateDefinition
-
registerDefaultState
-
defaultFluidState
-
getBucket
-
animateTick
protected void animateTick(Level p_76116_, BlockPos p_76117_, FluidState p_76118_, Random p_76119_) -
tick
-
randomTick
-
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
-
getShape
-
getTags
Description copied from interface:IForgeFluid
Retrieves a list of tags names this is known to be associated with. This should be used in favor of TagCollection.getOwningTags, as this caches the result and automatically updates when the TagCollection changes.- Specified by:
getTags
in interfaceIForgeFluid
-
createAttributes
Creates the fluid attributes object, which will contain all the extended values for the fluid that aren't part of the vanilla system. Do not call this from outside. To retrieve the values usegetAttributes()
-
getAttributes
Description copied from interface:IForgeFluid
Retrieves the non-vanilla fluid attributes, including localized name.- Specified by:
getAttributes
in interfaceIForgeFluid
-
getPickupSound
-