Fixed burning animations for fireproof entities

creative players are not technically fireproof; they just don't take any damage from fire
This commit is contained in:
Dylan K. Taylor
2023-07-19 12:32:00 +01:00
parent 8414c78969
commit 763241b11f
2 changed files with 13 additions and 10 deletions

View File

@ -1195,10 +1195,6 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
return !$this->gamemode->equals(GameMode::CREATIVE());
}
public function isFireProof() : bool{
return $this->isCreative();
}
public function getDrops() : array{
if($this->hasFiniteResources()){
return parent::getDrops();
@ -1436,6 +1432,10 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
$this->entityBaseTick($tickDiff);
Timings::$entityBaseTick->stopTiming();
if($this->isCreative() && $this->fireTicks > 1){
$this->fireTicks = 1;
}
if(!$this->isSpectator() && $this->isAlive()){
Timings::$playerCheckNearEntities->startTiming();
$this->checkNearEntities();