diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index ba3618fab..fc60f0ed9 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -1235,6 +1235,10 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade return $this->gamemode === Player::SPECTATOR; } + public function isFireProof() : bool{ + return $this->isCreative(); + } + public function getDrops(){ if(!$this->isCreative()){ return parent::getDrops(); diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index bd9e54c18..867852e45 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -251,7 +251,6 @@ abstract class Entity extends Location implements Metadatable{ public $noDamageTicks; protected $justCreated; - protected $fireProof; private $invulnerable; /** @var AttributeMap */ @@ -937,10 +936,11 @@ abstract class Entity extends Location implements Metadatable{ } if($this->fireTicks > 0){ - if($this->fireProof){ - $this->fireTicks -= 4 * $tickDiff; - if($this->fireTicks < 0){ - $this->fireTicks = 0; + if($this->isFireProof()){ + if($this->fireTicks > 1){ + $this->fireTicks = 1; + }else{ + $this->fireTicks -= 1; } }else{ if(!$this->hasEffect(Effect::FIRE_RESISTANCE) and (($this->fireTicks % 20) === 0 or $tickDiff > 20)){ @@ -1066,6 +1066,10 @@ abstract class Entity extends Location implements Metadatable{ } } + public function isFireProof() : bool{ + return false; + } + public function getDirection(){ $rotation = ($this->yaw - 90) % 360; if($rotation < 0){