Improved metadata sending and made it less spammy

Add changed properties to a list to send in a group on tick in a single packet
This commit is contained in:
Dylan K. Taylor
2017-06-17 20:00:45 +01:00
parent 8637e0224f
commit be7b057fa5
2 changed files with 12 additions and 5 deletions

View File

@ -874,6 +874,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
$this->sendSettings();
$this->sendPotionEffects($this);
$this->sendData($this);
$this->inventory->sendContents($this);
$this->inventory->sendArmorContents($this);
@ -2730,7 +2731,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
$this->setSneaking(false);
$this->extinguish();
$this->setDataProperty(self::DATA_AIR, self::DATA_TYPE_SHORT, 400, false);
$this->setDataProperty(self::DATA_AIR, self::DATA_TYPE_SHORT, 400);
$this->deadTicks = 0;
$this->noDamageTicks = 60;