Added AsyncTasks timings

This commit is contained in:
Shoghi Cervantes
2015-04-24 17:21:39 +02:00
parent 529f9b148b
commit d4cae729c3
3 changed files with 20 additions and 8 deletions

View File

@ -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)
]);