mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 12:04:46 +00:00
Implemented no damage ticks
This commit is contained in:
@@ -566,6 +566,13 @@ abstract class Entity extends Location implements Metadatable{
|
||||
}
|
||||
}
|
||||
|
||||
if($this->noDamageTicks > 0){
|
||||
$this->noDamageTicks -= $tickDiff;
|
||||
if($this->noDamageTicks < 0){
|
||||
$this->noDamageTicks = 0;
|
||||
}
|
||||
}
|
||||
|
||||
$this->age += $tickDiff;
|
||||
$this->ticksLived += $tickDiff;
|
||||
|
||||
|
Reference in New Issue
Block a user