Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-04 23:30:17 +01:00
Fix: Update inventory names (#4106)
Ensure inventory name updates used for e.g. JsonUI work properly.
Dieser Commit ist enthalten in:
Ursprung
acf24d4d6b
Commit
007edcbf11
@ -73,7 +73,8 @@ public class JavaOpenScreenTranslator extends PacketTranslator<ClientboundOpenSc
|
||||
if (openInventory != null) {
|
||||
// If the window type is the same, don't close.
|
||||
// In rare cases, inventories can do funny things where it keeps the same window type up but change the contents.
|
||||
if (openInventory.getContainerType() != packet.getType()) {
|
||||
// Or, inventory names can change (useful for JsonUI). In these cases, we need to close the old inventory.
|
||||
if (openInventory.getContainerType() != packet.getType() || !openInventory.getTitle().equals(name)) {
|
||||
// Sometimes the server can double-open an inventory with the same ID - don't confirm in that instance.
|
||||
InventoryUtils.closeInventory(session, openInventory.getJavaId(), openInventory.getJavaId() != packet.getContainerId());
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren