mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-26 13:19:55 +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:
parent
fe21f0e916
commit
0d177d5219
@ -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));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user