Package dev.architectury.hooks.fluid
Class FluidStackHooks
java.lang.Object
dev.architectury.hooks.fluid.FluidStackHooks
-
Method Summary
Modifier and TypeMethodDescriptionstatic longPlatform-specific bucket amount.static intgetColor(@Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable net.minecraft.core.BlockPos pos, net.minecraft.world.level.material.FluidState state) static intgetColor(FluidStack stack) static intgetColor(net.minecraft.world.level.material.Fluid fluid) static @Nullable net.minecraft.client.renderer.texture.TextureAtlasSpritegetFlowingTexture(@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.TextureAtlasSpritegetFlowingTexture(FluidStack stack) static @Nullable net.minecraft.client.renderer.texture.TextureAtlasSpritegetFlowingTexture(net.minecraft.world.level.material.Fluid fluid) static intgetLuminosity(FluidStack fluid, @Nullable net.minecraft.world.level.Level level, @Nullable net.minecraft.core.BlockPos pos) Returns the luminosity of the fluid.static intgetLuminosity(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.ComponentgetName(FluidStack stack) static @Nullable net.minecraft.client.renderer.texture.TextureAtlasSpritegetStillTexture(@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.TextureAtlasSpritegetStillTexture(FluidStack stack) static @Nullable net.minecraft.client.renderer.texture.TextureAtlasSpritegetStillTexture(net.minecraft.world.level.material.Fluid fluid) static intgetTemperature(FluidStack fluid, @Nullable net.minecraft.world.level.Level level, @Nullable net.minecraft.core.BlockPos pos) Returns the temperature of the fluid.static intgetTemperature(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 StringgetTranslationKey(FluidStack stack) static intgetViscosity(FluidStack fluid, @Nullable net.minecraft.world.level.Level level, @Nullable net.minecraft.core.BlockPos pos) Returns the viscosity of the fluid.static intgetViscosity(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 FluidStackread(net.minecraft.nbt.CompoundTag tag) Platform-specific FluidStack read.static FluidStackread(net.minecraft.network.FriendlyByteBuf buf) Platform-specific FluidStack read.static net.minecraft.nbt.CompoundTagwrite(FluidStack stack, net.minecraft.nbt.CompoundTag tag) Platform-specific FluidStack write.static voidwrite(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 benullpos- 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 benullpos- 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 benullpos- 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 benullpos- 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 benullpos- 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 benullpos- the block position, can benull- Returns:
- the viscosity of the fluid
-