FluidTank¶
A themed fluid-level indicator (looked up in the current theme as "fluid_tank"): a tank frame sprite with the real fluid texture and tint (via FluidStackHooks) filling it bottom-up to fluid.amount / capacity.
The fluid sprite is tiled at its own size, anchored to the bottom of the tank, and clipped with a scissor at the waterline. Stretching one 16px texture over a tank several times taller smears it into vertical streaks that read as a gradient rather than as a fluid. See The appearance comes from Architectury's FluidStackHooks rather than from either loader's own API: Fabric's FluidRenderHandlerRegistry and NeoForge's IClientFluidTypeExtensions expose the same two facts through unrelated types, and Architectury already bridges them.
Parameters¶
-
fluid: The fluid and amount to display; an empty stack renders just the tank frame.
-
capacity: The tank's total capacity; a non-positive value renders as empty rather than dividing by zero.
-
modifier: Additional modifiers applied to the outer container.
-
variant: The theme variant used for the tank frame texture.