mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-16 19:59:11 +00:00
ContainerTrait: Add PhpDoc for ListTag iteration
This commit is contained in:
@@ -47,6 +47,7 @@ trait ContainerTrait{
|
|||||||
$inventoryTag = $this->getNBT()->getListTag(Container::TAG_ITEMS);
|
$inventoryTag = $this->getNBT()->getListTag(Container::TAG_ITEMS);
|
||||||
|
|
||||||
$inventory = $this->getRealInventory();
|
$inventory = $this->getRealInventory();
|
||||||
|
/** @var CompoundTag $itemNBT */
|
||||||
foreach($inventoryTag as $itemNBT){
|
foreach($inventoryTag as $itemNBT){
|
||||||
$inventory->setItem($itemNBT->getByte("Slot"), Item::nbtDeserialize($itemNBT));
|
$inventory->setItem($itemNBT->getByte("Slot"), Item::nbtDeserialize($itemNBT));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user