Improved player spawn item in hand sending

This commit is contained in:
Shoghi Cervantes
2014-11-27 13:59:32 +01:00
parent dd3207cbd8
commit cd135b39ad
2 changed files with 7 additions and 8 deletions

View File

@ -169,8 +169,9 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
$pk->z = $this->z;
$pk->yaw = $this->yaw;
$pk->pitch = $this->pitch;
$pk->unknown1 = 0;
$pk->unknown2 = 0;
$item = $this->getInventory()->getItemInHand();
$pk->item = $item->getID();
$pk->meta = $item->getDamage();
$pk->metadata = $this->getData();
$player->dataPacket($pk);
@ -180,8 +181,6 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
];
$player->dataPacket($pk);
$this->inventory->sendHeldItem($player);
$this->inventory->sendArmorContents($player);
}
}