mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
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:
@ -96,6 +96,7 @@ class Arrow extends Projectile{
|
||||
|
||||
public function setCritical(bool $value = true) : void{
|
||||
$this->critical = $value;
|
||||
$this->networkPropertiesDirty = true;
|
||||
}
|
||||
|
||||
public function getResultDamage() : int{
|
||||
|
@ -150,6 +150,7 @@ class SplashPotion extends Throwable{
|
||||
|
||||
public function setPotionId(int $id) : void{
|
||||
$this->potionId = $id; //TODO: validation
|
||||
$this->networkPropertiesDirty = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -164,6 +165,7 @@ class SplashPotion extends Throwable{
|
||||
*/
|
||||
public function setLinger(bool $value = true) : void{
|
||||
$this->linger = $value;
|
||||
$this->networkPropertiesDirty = true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user