Skip to content

Commit

Permalink
hotfix 10568
Browse files Browse the repository at this point in the history
  • Loading branch information
Raycoms committed Dec 30, 2024
1 parent 23e516f commit 2afd018
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public boolean stillValid(@NotNull Player playerIn) {
}

/**
* Handles the given Button-click on the server, currently only used by enchanting. Name is for legacy.
* Handles the given Button-click on the server.
*/
@Override
public boolean clickMenuButton(@NotNull Player playerIn, int id) {
Expand All @@ -196,6 +196,10 @@ public boolean clickMenuButton(@NotNull Player playerIn, int id) {
this.selectGroup(new ArrayList<>(ModBlocks.getInstance().getOrComputeItemGroups().keySet()).get(id));
return true;
}
else if (this.getCurrentGroup() == null)
{
this.selectGroup(new ArrayList<>(ModBlocks.getInstance().getOrComputeItemGroups().keySet()).get(ModBlocks.getInstance().getOrComputeItemGroups().size() - 1));
}

int dif = id - ModBlocks.getInstance().getOrComputeItemGroups().size();
if (dif < ModBlocks.getInstance().getOrComputeItemGroups().get(this.getCurrentGroup()).size())
Expand Down

0 comments on commit 2afd018

Please sign in to comment.