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.
This commit is contained in:
Dylan K. Taylor 2023-03-20 23:21:24 +00:00
parent 63310cf764
commit ee72e80fbb
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -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(