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
FieldsModifier and TypeFieldDescriptionprivate FluidStatestatic final ObjectIntIdentityMap<FluidState>private FluidAttributesprivate final ReverseTagWrapper<Fluid>protected final StateContainer<Fluid,FluidState> Fields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidanimateTick(World p_204522_1_, BlockPos p_204522_2_, FluidState p_204522_3_, Random p_204522_4_) protected abstract booleancanBeReplacedWith(FluidState p_215665_1_, IBlockReader p_215665_2_, BlockPos p_215665_3_, Fluid p_215665_4_, Direction p_215665_5_) protected FluidAttributesCreates the fluid attributes object, which will contain all the extended values for the fluid that aren't part of the vanilla system.protected voidcreateFluidStateDefinition(StateContainer.Builder<Fluid, FluidState> p_207184_1_) protected abstract BlockStatecreateLegacyBlock(FluidState p_204527_1_) final FluidStateabstract intgetAmount(FluidState p_207192_1_) final FluidAttributesRetrieves the non-vanilla fluid attributes, including localized name.abstract Itemprotected IParticleDataprotected abstract floatprotected abstract Vector3dgetFlow(IBlockReader p_215663_1_, BlockPos p_215663_2_, FluidState p_215663_3_) abstract floatgetHeight(FluidState p_215662_1_, IBlockReader p_215662_2_, BlockPos p_215662_3_) abstract floatgetOwnHeight(FluidState p_223407_1_) abstract VoxelShapegetShape(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 intgetTickDelay(IWorldReader p_205569_1_) booleanprotected booleanisEmpty()protected booleanbooleanabstract booleanisSource(FluidState p_207193_1_) protected voidrandomTick(World p_207186_1_, BlockPos p_207186_2_, FluidState p_207186_3_, Random p_207186_4_) protected final voidregisterDefaultState(FluidState p_207183_1_) protected voidtick(World p_207191_1_, BlockPos p_207191_2_, FluidState p_207191_3_) Methods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:IForgeFluidRetrieves 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:
getTagsin 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:IForgeFluidRetrieves the non-vanilla fluid attributes, including localized name.- Specified by:
getAttributesin interfaceIForgeFluid
-