mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-05 01:29:55 +00:00
ContainerTrait: Add PhpDoc for ListTag iteration
This commit is contained in:
parent
e7e4645c0b
commit
dc84484c2b
@ -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));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user