Implemented no damage ticks

This commit is contained in:
Shoghi Cervantes
2014-12-05 02:24:08 +01:00
parent 1a064d38b1
commit add7879720
2 changed files with 10 additions and 1 deletions

View File

@@ -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;