mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Removed the need for paintings to check for destruction on schedule
Since we have a mechanism for triggering things on entities anyway, make use of it to do more than just forcing movement updates.
This commit is contained in:
@ -1375,6 +1375,11 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
||||
$this->level->updateEntities[$this->id] = $this;
|
||||
}
|
||||
|
||||
public function onNearbyBlockChange() : void{
|
||||
$this->setForceMovementUpdate();
|
||||
$this->scheduleUpdate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Flags the entity as needing a movement update on the next tick. Setting this forces a movement update even if the
|
||||
* entity's motion is zero. Used to trigger movement updates when blocks change near entities.
|
||||
|
Reference in New Issue
Block a user