limit fluid texture scaling

This commit is contained in:
PrototypeTrousers
2022-10-12 03:04:30 -03:00
parent f57a8cefda
commit 88e3df897e
2 changed files with 3 additions and 2 deletions
@@ -441,7 +441,7 @@ public class GuiFluidInterfaceConfigurationTerminal extends AEBaseGui implements
ClientDCInternalFluidInv o = this.byId.get(id); ClientDCInternalFluidInv o = this.byId.get(id);
if (o == null) { if (o == null) {
this.byId.put(id, o = new ClientDCInternalFluidInv(5, id, sortBy, string, 64)); this.byId.put(id, o = new ClientDCInternalFluidInv(5, id, sortBy, string, 1000));
this.refreshList = true; this.refreshList = true;
} }
@@ -69,7 +69,8 @@ public class GuiFluidTank extends GuiCustomSlot implements ITooltip {
GlStateManager.color(red, green, blue); GlStateManager.color(red, green, blue);
TextureAtlasSprite sprite = mc.getTextureMapBlocks().getAtlasSprite(fluid.getFluid().getStill().toString()); TextureAtlasSprite sprite = mc.getTextureMapBlocks().getAtlasSprite(fluid.getFluid().getStill().toString());
final int scaledHeight = (int) (this.height * ((float) fluid.getStackSize() / this.tank.getTankProperties()[this.slot].getCapacity())); int scaledHeight = (int) (this.height * ((float) fluid.getStackSize() / this.tank.getTankProperties()[this.slot].getCapacity()));
scaledHeight = Math.min(this.height, scaledHeight);
int iconHeightRemainder = scaledHeight % 16; int iconHeightRemainder = scaledHeight % 16;
if (iconHeightRemainder > 0) { if (iconHeightRemainder > 0) {