mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
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).
This commit is contained in:
@ -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));
|
||||
|
||||
|
Reference in New Issue
Block a user