InGamePacketHandler: fixed transaction predictions not getting rolled back for failed use/release/interact transactions

this was caused by b5cfab497dc75ff884b5d91831d5a2f7a5016d99.
This commit is contained in:
Dylan K. Taylor 2022-12-10 21:16:08 +00:00
parent 8bf85d4a18
commit 1cefe24414
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -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){