mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Improved player spawn item in hand sending
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user