Skip to content

Commit

Permalink
Open advancement tab regardless of currently open tab (#4665)
Browse files Browse the repository at this point in the history
  • Loading branch information
gecko10000 committed May 20, 2024
1 parent 8b77031 commit a780eea
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,13 @@ public void buildAndShowMenuForm() {
builder.validResultHandler((response) -> {
String id = rootAdvancementIds.get(response.clickedButtonId());
if (!id.equals("")) {
if (id.equals(currentAdvancementCategoryId)) {
// The server thinks we are already on this tab
buildAndShowListForm();
} else {
// Send a packet indicating that we intend to open this particular advancement window
if (!id.equals(currentAdvancementCategoryId)) {
// Send a packet indicating that we are opening this particular advancement window
ServerboundSeenAdvancementsPacket packet = new ServerboundSeenAdvancementsPacket(id);
session.sendDownstreamGamePacket(packet);
// Wait for a response there
}
currentAdvancementCategoryId = id;
buildAndShowListForm();
}
});

Expand Down

0 comments on commit a780eea

Please sign in to comment.