3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-10-01 23:50:11 +02:00

Open advancement tab regardless of currently open tab (#4665)

Dieser Commit ist enthalten in:
gecko10000 2024-05-20 10:52:41 -07:00 committet von GitHub
Ursprung 8b7703154e
Commit a780eeaae8
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194

Datei anzeigen

@ -91,15 +91,13 @@ public class AdvancementsCache {
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();
}
});