Package net.minecraft.fluid
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 final ObjectIntIdentityMap<FluidState>
private FluidAttributes
private final ReverseTagWrapper<Fluid>
protected final StateContainer<Fluid,
FluidState> Fields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
animateTick
(World p_204522_1_, BlockPos p_204522_2_, FluidState p_204522_3_, Random p_204522_4_) protected abstract boolean
canBeReplacedWith
(FluidState p_215665_1_, IBlockReader p_215665_2_, BlockPos p_215665_3_, Fluid p_215665_4_, Direction p_215665_5_) 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
(StateContainer.Builder<Fluid, FluidState> p_207184_1_) protected abstract BlockState
createLegacyBlock
(FluidState p_204527_1_) final FluidState
abstract int
getAmount
(FluidState p_207192_1_) final FluidAttributes
Retrieves the non-vanilla fluid attributes, including localized name.abstract Item
protected IParticleData
protected abstract float
protected abstract Vector3d
getFlow
(IBlockReader p_215663_1_, BlockPos p_215663_2_, FluidState p_215663_3_) abstract float
getHeight
(FluidState p_215662_1_, IBlockReader p_215662_2_, BlockPos p_215662_3_) abstract float
getOwnHeight
(FluidState p_223407_1_) abstract VoxelShape
getShape
(FluidState p_215664_1_, IBlockReader p_215664_2_, BlockPos p_215664_3_) getTags()
Retrieves a list of tags names this is known to be associated with.abstract int
getTickDelay
(IWorldReader p_205569_1_) boolean
protected boolean
isEmpty()
protected boolean
boolean
abstract boolean
isSource
(FluidState p_207193_1_) protected void
randomTick
(World p_207186_1_, BlockPos p_207186_2_, FluidState p_207186_3_, Random p_207186_4_) protected final void
registerDefaultState
(FluidState p_207183_1_) protected void
tick
(World p_207191_1_, BlockPos p_207191_2_, FluidState p_207191_3_) 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, getFluid, 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(World p_204522_1_, BlockPos p_204522_2_, FluidState p_204522_3_, Random p_204522_4_) -
tick
-
randomTick
protected void randomTick(World p_207186_1_, BlockPos p_207186_2_, FluidState p_207186_3_, Random p_207186_4_) -
getDripParticle
-
canBeReplacedWith
protected abstract boolean canBeReplacedWith(FluidState p_215665_1_, IBlockReader p_215665_2_, BlockPos p_215665_3_, Fluid p_215665_4_, Direction p_215665_5_) -
getFlow
protected abstract Vector3d getFlow(IBlockReader p_215663_1_, BlockPos p_215663_2_, FluidState p_215663_3_) -
getTickDelay
-
isRandomlyTicking
protected boolean isRandomlyTicking() -
isEmpty
protected boolean isEmpty() -
getExplosionResistance
protected abstract float getExplosionResistance() -
getHeight
public abstract float getHeight(FluidState p_215662_1_, IBlockReader p_215662_2_, BlockPos p_215662_3_) -
getOwnHeight
-
createLegacyBlock
-
isSource
-
getAmount
-
isSame
-
is
-
getShape
public abstract VoxelShape getShape(FluidState p_215664_1_, IBlockReader p_215664_2_, BlockPos p_215664_3_) -
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
-