fix armour not being set correctly on entity spawn

This commit is contained in:
Dylan K. Taylor 2019-05-20 15:31:23 +01:00
parent d9bc48bb01
commit c13b352b76
2 changed files with 2 additions and 2 deletions

View File

@ -866,7 +866,7 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
//TODO: Hack for MCPE 1.2.13: DATA_NAMETAG is useless in AddPlayerPacket, so it has to be sent separately
$this->sendData($player, [EntityMetadataProperties::NAMETAG => [EntityMetadataTypes::STRING, $this->getNameTag()]]);
$this->armorInventory->sendContents($player);
$player->getNetworkSession()->onMobArmorChange($this);
if(!($this instanceof Player)){
$pk = new PlayerListPacket();

View File

@ -923,7 +923,7 @@ abstract class Living extends Entity implements Damageable{
protected function sendSpawnPacket(Player $player) : void{
parent::sendSpawnPacket($player);
$this->armorInventory->sendContents($player);
$player->getNetworkSession()->onMobArmorChange($this);
}
protected function onDispose() : void{