From 0d177d52191d92831a2d852ca0c4068192991ae0 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 4 Jun 2018 11:18:42 +0100 Subject: [PATCH] Entity: Clear dirty properties at the end of the constructor this prevents sending duplicate properties immediately after entity spawn (due to properties getting set in the constructor). --- src/pocketmine/entity/Entity.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index e07b7e4ccb..1b85f63403 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -556,6 +556,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{ $this->chunk->addEntity($this); $this->level->addEntity($this); $this->initEntity(); + $this->propertyManager->clearDirtyProperties(); //Prevents resending properties that were set during construction $this->lastUpdate = $this->server->getTick(); $this->server->getPluginManager()->callEvent(new EntitySpawnEvent($this));