Skip to content

Commit

Permalink
fix: Add default for button alignment as fallback #195
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Dec 8, 2023
1 parent 900980e commit 8bf3353
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public int getGridStartSlot(Player player, AbstractContainerMenu menu) {
int buttonOffsetX = tagCompound.contains("ButtonOffsetX") ? tagCompound.getInt("ButtonOffsetX") : -16;
int buttonOffsetY = tagCompound.contains("ButtonOffsetY") ? tagCompound.getInt("ButtonOffsetY") : 16;

ButtonAlignment alignToGrid = null;
ButtonAlignment alignToGrid = ButtonAlignment.LEFT;
String alignToGridName = tagCompound.getString("AlignToGrid");
switch (alignToGridName.toLowerCase()) {
case "north", "up" -> alignToGrid = ButtonAlignment.TOP;
Expand Down

0 comments on commit 8bf3353

Please sign in to comment.