mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00: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
This commit is contained in:
parent
c3d4277ae6
commit
112f4ddb8d
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue