Class Fluid

All Implemented Interfaces:
IForgeFluid, IForgeRegistryEntry<Fluid>
Direct Known Subclasses:
EmptyFluid, FlowingFluid

public abstract class Fluid extends ForgeRegistryEntry<Fluid> implements IForgeFluid
  • Field Details

  • Constructor Details

    • Fluid

      protected Fluid()
  • Method Details

    • 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_, 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_, 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_)
    • is

      public boolean is(ITag<Fluid> p_207185_1_)
    • getShape

      public abstract VoxelShape getShape(FluidState p_215664_1_, IBlockReader p_215664_2_, BlockPos p_215664_3_)
    • getTags

      public 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 interface IForgeFluid
    • 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 use getAttributes()
    • getAttributes

      public final FluidAttributes getAttributes()
      Description copied from interface: IForgeFluid
      Retrieves the non-vanilla fluid attributes, including localized name.
      Specified by:
      getAttributes in interface IForgeFluid