mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Open advancement tab regardless of currently open tab (#4665)
This commit is contained in:
parent
8b7703154e
commit
a780eeaae8
1 changed files with 4 additions and 6 deletions
|
@ -91,15 +91,13 @@ public class AdvancementsCache {
|
||||||
builder.validResultHandler((response) -> {
|
builder.validResultHandler((response) -> {
|
||||||
String id = rootAdvancementIds.get(response.clickedButtonId());
|
String id = rootAdvancementIds.get(response.clickedButtonId());
|
||||||
if (!id.equals("")) {
|
if (!id.equals("")) {
|
||||||
if (id.equals(currentAdvancementCategoryId)) {
|
if (!id.equals(currentAdvancementCategoryId)) {
|
||||||
// The server thinks we are already on this tab
|
// Send a packet indicating that we are opening this particular advancement window
|
||||||
buildAndShowListForm();
|
|
||||||
} else {
|
|
||||||
// Send a packet indicating that we intend to open this particular advancement window
|
|
||||||
ServerboundSeenAdvancementsPacket packet = new ServerboundSeenAdvancementsPacket(id);
|
ServerboundSeenAdvancementsPacket packet = new ServerboundSeenAdvancementsPacket(id);
|
||||||
session.sendDownstreamGamePacket(packet);
|
session.sendDownstreamGamePacket(packet);
|
||||||
// Wait for a response there
|
|
||||||
}
|
}
|
||||||
|
currentAdvancementCategoryId = id;
|
||||||
|
buildAndShowListForm();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue