Skip to content

Commit

Permalink
Merge pull request #14 from AnvilloyDevStudio/plus-pr-704
Browse files Browse the repository at this point in the history
Fix unconstrained code for PlayerInvDisplay menu updating
  • Loading branch information
BenCheung0422 authored Dec 20, 2024
2 parents 1d916f3 + 6755179 commit f553d43
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/client/java/minicraft/screen/PlayerInvDisplay.java
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,11 @@ private int getOtherIdx() {

private void update() {
menus[0] = new InventoryMenu((InventoryMenu) menus[0]);
menus[1] = new InventoryMenu((InventoryMenu) menus[1]);
menus[1].translate(menus[0].getBounds().getWidth() + padding, 0);
onSelectionChange(0, selection);
if (creativeMode) {
menus[1] = new InventoryMenu((InventoryMenu) menus[1]);
menus[1].translate(menus[0].getBounds().getWidth() + padding, 0);
onSelectionChange(0, selection);
}
itemDescription = getDescription();
}
}

0 comments on commit f553d43

Please sign in to comment.