From 70390522525760b4faf5d1d162028e17cfdf13c9 Mon Sep 17 00:00:00 2001 From: slprime <31038811+slprime@users.noreply.github.com> Date: Fri, 27 Nov 2026 00:48:57 +0200 Subject: [PATCH] Add option to hide fluid amount tooltip on tanks (#1168) --- src/main/java/codechicken/nei/PositionedStack.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/codechicken/nei/PositionedStack.java b/src/main/java/codechicken/nei/PositionedStack.java index 400a1922..75a77f9f 100644 --- a/src/main/java/codechicken/nei/PositionedStack.java +++ b/src/main/java/codechicken/nei/PositionedStack.java @@ -238,6 +238,7 @@ public class PositionedStack implements Cloneable { /** The tank size the fill level is measured against, in mB. 0 means "always render full". */ protected int capacity = 0; protected boolean flowingTexture = false; + protected boolean amountTooltip = true; protected FillDirection fillDirection = FillDirection.AUTO; private ItemStack cachedFluidItem; @@ -276,6 +277,15 @@ public class PositionedStack implements Cloneable { return this; } + public boolean hasAmountTooltip() { + return this.amountTooltip; + } + + public Tank setAmountTooltip(boolean amountTooltip) { + this.amountTooltip = amountTooltip; + return this; + } + public FillDirection getFillDirection() { return this.fillDirection; } @@ -301,7 +311,7 @@ public class PositionedStack implements Cloneable { final List customTooltip = super.getTooltip(); final FluidStack fluidStack = getFluidStack(); - if (fluidStack != null && this.capacity > 0) { + if (fluidStack != null && this.amountTooltip) { tooltip.add( EnumChatFormatting.GRAY + NEIClientUtils.translate( "recipe.fluid.tank.amount",