Class FluidStackHooks

java.lang.Object
dev.architectury.hooks.fluid.FluidStackHooks

public class FluidStackHooks extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static long
    Platform-specific bucket amount.
    static int
    getColor(@Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable net.minecraft.core.BlockPos pos, net.minecraft.world.level.material.FluidState state)
     
    static int
     
    static int
    getColor(net.minecraft.world.level.material.Fluid fluid)
     
    static @Nullable net.minecraft.client.renderer.texture.TextureAtlasSprite
    getFlowingTexture(@Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable net.minecraft.core.BlockPos pos, net.minecraft.world.level.material.FluidState state)
     
    static @Nullable net.minecraft.client.renderer.texture.TextureAtlasSprite
     
    static @Nullable net.minecraft.client.renderer.texture.TextureAtlasSprite
    getFlowingTexture(net.minecraft.world.level.material.Fluid fluid)
     
    static int
    getLuminosity(FluidStack fluid, @Nullable net.minecraft.world.level.Level level, @Nullable net.minecraft.core.BlockPos pos)
    Returns the luminosity of the fluid.
    static int
    getLuminosity(net.minecraft.world.level.material.Fluid fluid, @Nullable net.minecraft.world.level.Level level, @Nullable net.minecraft.core.BlockPos pos)
    Returns the luminosity of the fluid.
    static net.minecraft.network.chat.Component
     
    static @Nullable net.minecraft.client.renderer.texture.TextureAtlasSprite
    getStillTexture(@Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable net.minecraft.core.BlockPos pos, net.minecraft.world.level.material.FluidState state)
     
    static @Nullable net.minecraft.client.renderer.texture.TextureAtlasSprite
     
    static @Nullable net.minecraft.client.renderer.texture.TextureAtlasSprite
    getStillTexture(net.minecraft.world.level.material.Fluid fluid)
     
    static int
    getTemperature(FluidStack fluid, @Nullable net.minecraft.world.level.Level level, @Nullable net.minecraft.core.BlockPos pos)
    Returns the temperature of the fluid.
    static int
    getTemperature(net.minecraft.world.level.material.Fluid fluid, @Nullable net.minecraft.world.level.Level level, @Nullable net.minecraft.core.BlockPos pos)
    Returns the temperature of the fluid.
    static String
     
    static int
    getViscosity(FluidStack fluid, @Nullable net.minecraft.world.level.Level level, @Nullable net.minecraft.core.BlockPos pos)
    Returns the viscosity of the fluid.
    static int
    getViscosity(net.minecraft.world.level.material.Fluid fluid, @Nullable net.minecraft.world.level.Level level, @Nullable net.minecraft.core.BlockPos pos)
    Returns the viscosity of the fluid.
    static FluidStack
    read(net.minecraft.nbt.CompoundTag tag)
    Platform-specific FluidStack read.
    static FluidStack
    read(net.minecraft.network.FriendlyByteBuf buf)
    Platform-specific FluidStack read.
    static net.minecraft.nbt.CompoundTag
    write(FluidStack stack, net.minecraft.nbt.CompoundTag tag)
    Platform-specific FluidStack write.
    static void
    write(FluidStack stack, net.minecraft.network.FriendlyByteBuf buf)
    Platform-specific FluidStack write.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getName

      public static net.minecraft.network.chat.Component getName(FluidStack stack)
    • getTranslationKey

      public static String getTranslationKey(FluidStack stack)
    • read

      public static FluidStack read(net.minecraft.network.FriendlyByteBuf buf)
      Platform-specific FluidStack read.
    • write

      public static void write(FluidStack stack, net.minecraft.network.FriendlyByteBuf buf)
      Platform-specific FluidStack write.
    • read

      public static FluidStack read(net.minecraft.nbt.CompoundTag tag)
      Platform-specific FluidStack read.
    • write

      public static net.minecraft.nbt.CompoundTag write(FluidStack stack, net.minecraft.nbt.CompoundTag tag)
      Platform-specific FluidStack write.
    • bucketAmount

      public static long bucketAmount()
      Platform-specific bucket amount. Forge: 1000 Fabric: 81000
    • getStillTexture

      @Environment(CLIENT) @Nullable public static @Nullable net.minecraft.client.renderer.texture.TextureAtlasSprite getStillTexture(@Nullable @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable @Nullable net.minecraft.core.BlockPos pos, net.minecraft.world.level.material.FluidState state)
    • getStillTexture

      @Environment(CLIENT) @Nullable public static @Nullable net.minecraft.client.renderer.texture.TextureAtlasSprite getStillTexture(FluidStack stack)
    • getStillTexture

      @Environment(CLIENT) @Nullable public static @Nullable net.minecraft.client.renderer.texture.TextureAtlasSprite getStillTexture(net.minecraft.world.level.material.Fluid fluid)
    • getFlowingTexture

      @Environment(CLIENT) @Nullable public static @Nullable net.minecraft.client.renderer.texture.TextureAtlasSprite getFlowingTexture(@Nullable @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable @Nullable net.minecraft.core.BlockPos pos, net.minecraft.world.level.material.FluidState state)
    • getFlowingTexture

      @Environment(CLIENT) @Nullable public static @Nullable net.minecraft.client.renderer.texture.TextureAtlasSprite getFlowingTexture(FluidStack stack)
    • getFlowingTexture

      @Environment(CLIENT) @Nullable public static @Nullable net.minecraft.client.renderer.texture.TextureAtlasSprite getFlowingTexture(net.minecraft.world.level.material.Fluid fluid)
    • getColor

      @Environment(CLIENT) public static int getColor(@Nullable @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable @Nullable net.minecraft.core.BlockPos pos, net.minecraft.world.level.material.FluidState state)
    • getColor

      @Environment(CLIENT) public static int getColor(FluidStack stack)
    • getColor

      @Environment(CLIENT) public static int getColor(net.minecraft.world.level.material.Fluid fluid)
    • getLuminosity

      public static int getLuminosity(FluidStack fluid, @Nullable @Nullable net.minecraft.world.level.Level level, @Nullable @Nullable net.minecraft.core.BlockPos pos)
      Returns the luminosity of the fluid.
      Parameters:
      fluid - the fluid
      level - the level, can be null
      pos - the block position, can be null
      Returns:
      the luminosity of the fluid, this ranges from 0 to 15
    • getLuminosity

      public static int getLuminosity(net.minecraft.world.level.material.Fluid fluid, @Nullable @Nullable net.minecraft.world.level.Level level, @Nullable @Nullable net.minecraft.core.BlockPos pos)
      Returns the luminosity of the fluid.
      Parameters:
      fluid - the fluid
      level - the level, can be null
      pos - the block position, can be null
      Returns:
      the luminosity of the fluid, this ranges from 0 to 15
    • getTemperature

      public static int getTemperature(FluidStack fluid, @Nullable @Nullable net.minecraft.world.level.Level level, @Nullable @Nullable net.minecraft.core.BlockPos pos)
      Returns the temperature of the fluid. The temperature is in kelvin, for example, 300 kelvin is equal to room temperature.
      Parameters:
      fluid - the fluid
      level - the level, can be null
      pos - the block position, can be null
      Returns:
      the temperature of the fluid
    • getTemperature

      public static int getTemperature(net.minecraft.world.level.material.Fluid fluid, @Nullable @Nullable net.minecraft.world.level.Level level, @Nullable @Nullable net.minecraft.core.BlockPos pos)
      Returns the temperature of the fluid. The temperature is in kelvin, for example, 300 kelvin is equal to room temperature.
      Parameters:
      fluid - the fluid
      level - the level, can be null
      pos - the block position, can be null
      Returns:
      the temperature of the fluid
    • getViscosity

      public static int getViscosity(FluidStack fluid, @Nullable @Nullable net.minecraft.world.level.Level level, @Nullable @Nullable net.minecraft.core.BlockPos pos)
      Returns the viscosity of the fluid. A lower viscosity means that the fluid will flow faster. The default value is 1000 for water.
      Parameters:
      fluid - the fluid
      level - the level, can be null
      pos - the block position, can be null
      Returns:
      the viscosity of the fluid
    • getViscosity

      public static int getViscosity(net.minecraft.world.level.material.Fluid fluid, @Nullable @Nullable net.minecraft.world.level.Level level, @Nullable @Nullable net.minecraft.core.BlockPos pos)
      Returns the viscosity of the fluid. A lower viscosity means that the fluid will flow faster. The default value is 1000 for water.
      Parameters:
      fluid - the fluid
      level - the level, can be null
      pos - the block position, can be null
      Returns:
      the viscosity of the fluid