Package dev.architectury.hooks.fluid
Class FluidStackHooks
java.lang.Object
dev.architectury.hooks.fluid.FluidStackHooks
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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
getColor
(FluidStack stack) 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
getFlowingTexture
(FluidStack stack) 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
getName
(FluidStack stack) 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
getStillTexture
(FluidStack stack) 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
getTranslationKey
(FluidStack stack) 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.
-
Method Details
-
getName
-
getTranslationKey
-
read
Platform-specific FluidStack read. -
write
Platform-specific FluidStack write. -
read
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
-
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 fluidlevel
- the level, can benull
pos
- the block position, can benull
- 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 fluidlevel
- the level, can benull
pos
- the block position, can benull
- 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 fluidlevel
- the level, can benull
pos
- the block position, can benull
- 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 fluidlevel
- the level, can benull
pos
- the block position, can benull
- 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 fluidlevel
- the level, can benull
pos
- the block position, can benull
- 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 fluidlevel
- the level, can benull
pos
- the block position, can benull
- Returns:
- the viscosity of the fluid
-