InventoryManager: fixed armor slots hack

the correct condition for this should be an unsynced armor slot changed during a transaction, but conveying this information to syncSlot() is a bit of a hassle, so this will do for now.
This commit is contained in:
Dylan K. Taylor 2023-03-20 21:27:56 +00:00
parent ca6d51498f
commit 758b5ee500
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -440,7 +440,7 @@ class InventoryManager{
//BDS (Bedrock Dedicated Server) also seems to work this way.
$this->session->sendDataPacket(InventoryContentPacket::create($windowId, [$itemStackWrapper]));
}else{
if($this->currentItemStackRequestId !== null){
if($windowId === ContainerIds::ARMOR){
//TODO: HACK!
//When right-clicking to equip armour, the client predicts the content of the armour slot, but
//doesn't report it in the transaction packet. The server then sends an InventorySlotPacket to