ItemStackResponseBuilder: fixed durability appearing to reset when moving durables around the inventory

closes #5656
This commit is contained in:
Dylan K. Taylor 2023-03-29 23:31:46 +01:00
parent beb0713a40
commit c3a16d9b1f
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -24,6 +24,7 @@ declare(strict_types=1);
namespace pocketmine\network\mcpe\handler;
use pocketmine\inventory\Inventory;
use pocketmine\item\Durable;
use pocketmine\network\mcpe\InventoryManager;
use pocketmine\network\mcpe\protocol\types\inventory\ContainerUIIds;
use pocketmine\network\mcpe\protocol\types\inventory\stackresponse\ItemStackResponse;
@ -91,7 +92,7 @@ final class ItemStackResponseBuilder{
$item->getCount(),
$itemStackInfo->getStackId(),
$item->getCustomName(),
0
$item instanceof Durable ? $item->getDamage() : 0,
);
}
}