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

Fix: Inventory handling when client tries to open the player inventory when it shouldn't (#4499)

* attempt at fixing <https://github.com/GeyserMC/Geyser/issues/4497>

* Fix wrong handling of OPEN_INVENTORY case in BedrockInteractTranslator
Dieser Commit ist enthalten in:
chris 2024-03-15 17:33:48 +01:00 committet von GitHub
Ursprung c3d4277ae6
Commit 112f4ddb8d
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194

Datei anzeigen

@ -127,9 +127,9 @@ public class BedrockInteractTranslator extends PacketTranslator<InteractPacket>
InventoryUtils.openInventory(session, session.getPlayerInventory());
}
} else {
// Case: Player opens a player inventory, while we think it shouldn't have!
// Close all inventories, reset to player inventory.
InventoryUtils.closeInventory(session, session.getOpenInventory().getJavaId(), false);
// Case: Player tries to open a player inventory, while we think it should be in a different inventory
// Now: Open the inventory that we're supposed to be in.
InventoryUtils.openInventory(session, session.getOpenInventory());
}
break;
}