mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Added AsyncTasks timings
This commit is contained in:
@ -105,13 +105,15 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
|
||||
$this->nameTag = $this->namedtag["NameTag"];
|
||||
}
|
||||
|
||||
foreach($this->namedtag->Inventory as $item){
|
||||
if($item["Slot"] >= 0 and $item["Slot"] < 9){ //Hotbar
|
||||
$this->inventory->setHotbarSlotIndex($item["Slot"], isset($item["TrueSlot"]) ? $item["TrueSlot"] : -1);
|
||||
}elseif($item["Slot"] >= 100 and $item["Slot"] < 104){ //Armor
|
||||
$this->inventory->setItem($this->inventory->getSize() + $item["Slot"] - 100, ItemItem::get($item["id"], $item["Damage"], $item["Count"]));
|
||||
}else{
|
||||
$this->inventory->setItem($item["Slot"] - 9, ItemItem::get($item["id"], $item["Damage"], $item["Count"]));
|
||||
if(isset($this->namedtag->Inventory) and $this->namedtag->Inventory instanceof Enum){
|
||||
foreach($this->namedtag->Inventory as $item){
|
||||
if($item["Slot"] >= 0 and $item["Slot"] < 9){ //Hotbar
|
||||
$this->inventory->setHotbarSlotIndex($item["Slot"], isset($item["TrueSlot"]) ? $item["TrueSlot"] : -1);
|
||||
}elseif($item["Slot"] >= 100 and $item["Slot"] < 104){ //Armor
|
||||
$this->inventory->setItem($this->inventory->getSize() + $item["Slot"] - 100, ItemItem::get($item["id"], $item["Damage"], $item["Count"]));
|
||||
}else{
|
||||
$this->inventory->setItem($item["Slot"] - 9, ItemItem::get($item["id"], $item["Damage"], $item["Count"]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -194,7 +196,7 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
|
||||
}
|
||||
|
||||
|
||||
$this->namedtag->Skin = new Compound("Inventory", [
|
||||
$this->namedtag->Skin = new Compound("Skin", [
|
||||
"Data" => new String("Data", $this->getSkinData()),
|
||||
"Slim" => new Byte("Slim", $this->isSkinSlim() ? 1 : 0)
|
||||
]);
|
||||
|
Reference in New Issue
Block a user