From b2e6184276f1a31199424dcb173a1d9ee0a3a029 Mon Sep 17 00:00:00 2001 From: trinsdar <30245301+Trinsdar@users.noreply.github.com> Date: Sat, 8 Jun 2024 22:22:42 -0400 Subject: [PATCH] made mass storage renderer display 100% properly with the plastic storage box --- .../gtcore/client/MassStorageRenderer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/io/github/gregtechintergalactical/gtcore/client/MassStorageRenderer.java b/common/src/main/java/io/github/gregtechintergalactical/gtcore/client/MassStorageRenderer.java index 8d25df9..ee9df64 100644 --- a/common/src/main/java/io/github/gregtechintergalactical/gtcore/client/MassStorageRenderer.java +++ b/common/src/main/java/io/github/gregtechintergalactical/gtcore/client/MassStorageRenderer.java @@ -7,6 +7,7 @@ import com.mojang.math.Quaternion; import com.mojang.math.Vector3f; import io.github.gregtechintergalactical.gtcore.blockentity.BlockEntityMassStorage; +import io.github.gregtechintergalactical.gtcore.blockentity.BlockEntityPlasticBin; import io.github.gregtechintergalactical.gtcore.data.SlotTypes; import io.github.gregtechintergalactical.gtcore.machine.MassStorageMachine; import muramasa.antimatter.gui.SlotType; @@ -75,7 +76,7 @@ private void renderSlot(PoseStack matrix, MultiBufferSource bufferIn, int combin ItemStack stack = display.getItem(0); if (stack.isEmpty()) stack = storage.getItem(0); renderStack(matrix, bufferIn, combinedLightIn, combinedOverlayIn, stack, tile, 0.03f); - int max = ((MassStorageMachine)tile.getMachineType()).getCapacity(); + int max = tile instanceof BlockEntityPlasticBin bin ? bin.getMaxLimit() : ((MassStorageMachine)tile.getMachineType()).getCapacity(); int count = storage.getItem(0).getCount(); String text = "" + (count == max ? 100 + "%" : count); if (!stack.isEmpty())