From 1cefe2441459643e768ae0fc57dd8c9e62112808 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 10 Dec 2022 21:16:08 +0000 Subject: [PATCH] InGamePacketHandler: fixed transaction predictions not getting rolled back for failed use/release/interact transactions this was caused by b5cfab497dc75ff884b5d91831d5a2f7a5016d99. --- src/network/mcpe/handler/InGamePacketHandler.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/network/mcpe/handler/InGamePacketHandler.php b/src/network/mcpe/handler/InGamePacketHandler.php index 970cebdc56..2c8451839c 100644 --- a/src/network/mcpe/handler/InGamePacketHandler.php +++ b/src/network/mcpe/handler/InGamePacketHandler.php @@ -310,6 +310,8 @@ class InGamePacketHandler extends PacketHandler{ public function handleInventoryTransaction(InventoryTransactionPacket $packet) : bool{ $result = true; + $this->inventoryManager->addPredictedSlotChanges($packet->trData->getActions()); + if($packet->trData instanceof NormalTransactionData){ $result = $this->handleNormalTransaction($packet->trData); }elseif($packet->trData instanceof MismatchTransactionData){ @@ -359,7 +361,6 @@ class InGamePacketHandler extends PacketHandler{ return false; } } - $this->inventoryManager->addPredictedSlotChanges($data->getActions()); if($isCraftingPart){ if($this->craftingTransaction === null){