From ee72e80fbbdd138e0f7130e2ea557e4ae6dd3a42 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 20 Mar 2023 23:21:24 +0000 Subject: [PATCH] ItemStackResponseBuilder: removed incorrect code the client expects that all itemstacks must be acked by ItemStackResponse, regardless of whether the server changed them to some other item. We'll overwrite the item to the correct thing at the end of the tick anyway. --- src/network/mcpe/handler/ItemStackResponseBuilder.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/network/mcpe/handler/ItemStackResponseBuilder.php b/src/network/mcpe/handler/ItemStackResponseBuilder.php index 1c742077f..325a2b108 100644 --- a/src/network/mcpe/handler/ItemStackResponseBuilder.php +++ b/src/network/mcpe/handler/ItemStackResponseBuilder.php @@ -83,12 +83,6 @@ final class ItemStackResponseBuilder{ if($itemStackInfo === null){ throw new AssumptionFailedError("ItemStackInfo should never be null for an open inventory"); } - if($itemStackInfo->getRequestId() !== $this->requestId){ - //the itemstack may have been synced due to transaction producing results that the client did not - //predict correctly, which will wipe out the tracked request ID (intentionally) - //TODO: is this the correct behaviour? - continue; - } $item = $inventory->getItem($slot); $responseInfosByContainer[$containerInterfaceId][] = new ItemStackResponseSlotInfo(