Entity: don't rebuild metadata every tick unless an associated property changed

this should improve performance back to PM3 levels.
This commit is contained in:
Dylan K. Taylor
2021-05-17 20:05:52 +01:00
parent bdce781c6d
commit 5a14c1cb89
8 changed files with 42 additions and 3 deletions

View File

@ -137,6 +137,7 @@ class ExperienceOrb extends Entity{
throw new \InvalidArgumentException("XP amount must be greater than 0, got $amount");
}
$this->xpValue = $amount;
$this->networkPropertiesDirty = true;
}
public function hasTargetPlayer() : bool{