Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
made mass storage renderer display 100% properly with the plastic sto…
Browse files Browse the repository at this point in the history
…rage box
  • Loading branch information
Trinsdar committed Jun 9, 2024
1 parent 3f6ff2f commit b2e6184
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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())
Expand Down

0 comments on commit b2e6184

Please sign in to comment.