mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 10:53:05 +00:00
More new data properties
This commit is contained in:
@ -190,7 +190,7 @@ abstract class Living extends Entity implements Damageable{
|
||||
|
||||
if(!$this->hasEffect(Effect::WATER_BREATHING) and $this->isInsideOfWater()){
|
||||
if($this instanceof WaterAnimal){
|
||||
$this->setDataProperty(self::DATA_AIR, self::DATA_TYPE_SHORT, 300);
|
||||
$this->setDataProperty(self::DATA_AIR, self::DATA_TYPE_SHORT, 400);
|
||||
}else{
|
||||
$hasUpdate = true;
|
||||
$airTicks = $this->getDataProperty(self::DATA_AIR) - $tickDiff;
|
||||
@ -214,7 +214,7 @@ abstract class Living extends Entity implements Damageable{
|
||||
}
|
||||
$this->setDataProperty(self::DATA_AIR, self::DATA_TYPE_SHORT, $airTicks);
|
||||
}else{
|
||||
$this->setDataProperty(self::DATA_AIR, self::DATA_TYPE_SHORT, 300);
|
||||
$this->setDataProperty(self::DATA_AIR, self::DATA_TYPE_SHORT, 400);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user