Package net.minecraft.fluid
Class Fluid
- java.lang.Object
-
- net.minecraftforge.registries.ForgeRegistryEntry<Fluid>
-
- net.minecraft.fluid.Fluid
-
- All Implemented Interfaces:
IForgeFluid
,IForgeRegistryEntry<Fluid>
- Direct Known Subclasses:
EmptyFluid
,FlowingFluid
public abstract class Fluid extends ForgeRegistryEntry<Fluid> implements IForgeFluid
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>>
-
-
Field Summary
Fields Modifier and Type Field Description private FluidState
defaultFluidState
static ObjectIntIdentityMap<FluidState>
FLUID_STATE_REGISTRY
private FluidAttributes
forgeFluidAttributes
private ReverseTagWrapper<Fluid>
reverseTags
protected StateContainer<Fluid,FluidState>
stateDefinition
-
Fields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Fluid()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
animateTick(World p_204522_1_, BlockPos p_204522_2_, FluidState p_204522_3_, java.util.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
createAttributes()
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_)
FluidState
defaultFluidState()
abstract int
getAmount(FluidState p_207192_1_)
FluidAttributes
getAttributes()
Retrieves the non-vanilla fluid attributes, including localized name.abstract Item
getBucket()
protected IParticleData
getDripParticle()
protected abstract float
getExplosionResistance()
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_)
StateContainer<Fluid,FluidState>
getStateDefinition()
java.util.Set<ResourceLocation>
getTags()
Retrieves a list of tags names this is known to be associated with.abstract int
getTickDelay(IWorldReader p_205569_1_)
boolean
is(ITag<Fluid> p_207185_1_)
protected boolean
isEmpty()
protected boolean
isRandomlyTicking()
boolean
isSame(Fluid p_207187_1_)
abstract boolean
isSource(FluidState p_207193_1_)
protected void
randomTick(World p_207186_1_, BlockPos p_207186_2_, FluidState p_207186_3_, java.util.Random p_207186_4_)
protected 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 Detail
-
FLUID_STATE_REGISTRY
public static final ObjectIntIdentityMap<FluidState> FLUID_STATE_REGISTRY
-
stateDefinition
protected final StateContainer<Fluid,FluidState> stateDefinition
-
defaultFluidState
private FluidState defaultFluidState
-
reverseTags
private final ReverseTagWrapper<Fluid> reverseTags
-
forgeFluidAttributes
private FluidAttributes forgeFluidAttributes
-
-
Method Detail
-
createFluidStateDefinition
protected void createFluidStateDefinition(StateContainer.Builder<Fluid,FluidState> p_207184_1_)
-
getStateDefinition
public StateContainer<Fluid,FluidState> getStateDefinition()
-
registerDefaultState
protected final void registerDefaultState(FluidState p_207183_1_)
-
defaultFluidState
public final FluidState defaultFluidState()
-
getBucket
public abstract Item getBucket()
-
animateTick
protected void animateTick(World p_204522_1_, BlockPos p_204522_2_, FluidState p_204522_3_, java.util.Random p_204522_4_)
-
tick
protected void tick(World p_207191_1_, BlockPos p_207191_2_, FluidState p_207191_3_)
-
randomTick
protected void randomTick(World p_207186_1_, BlockPos p_207186_2_, FluidState p_207186_3_, java.util.Random p_207186_4_)
-
getDripParticle
@Nullable protected IParticleData 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
public abstract int getTickDelay(IWorldReader p_205569_1_)
-
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
public abstract float getOwnHeight(FluidState p_223407_1_)
-
createLegacyBlock
protected abstract BlockState createLegacyBlock(FluidState p_204527_1_)
-
isSource
public abstract boolean isSource(FluidState p_207193_1_)
-
getAmount
public abstract int getAmount(FluidState p_207192_1_)
-
isSame
public boolean isSame(Fluid p_207187_1_)
-
getShape
public abstract VoxelShape getShape(FluidState p_215664_1_, IBlockReader p_215664_2_, BlockPos p_215664_3_)
-
getTags
public java.util.Set<ResourceLocation> 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
protected FluidAttributes 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
public final FluidAttributes getAttributes()
Description copied from interface:IForgeFluid
Retrieves the non-vanilla fluid attributes, including localized name.- Specified by:
getAttributes
in interfaceIForgeFluid
-
-