Fixed netherite items burning in lava

This commit is contained in:
Dylan K. Taylor 2023-07-19 11:49:52 +01:00
parent 4637aae621
commit 8414c78969
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -519,7 +519,12 @@ abstract class Entity{
}
public function attack(EntityDamageEvent $source) : void{
if($this->isFireProof() && ($source->getCause() === EntityDamageEvent::CAUSE_FIRE || $source->getCause() === EntityDamageEvent::CAUSE_FIRE_TICK)){
if($this->isFireProof() && (
$source->getCause() === EntityDamageEvent::CAUSE_FIRE ||
$source->getCause() === EntityDamageEvent::CAUSE_FIRE_TICK ||
$source->getCause() === EntityDamageEvent::CAUSE_LAVA
)
){
$source->cancel();
}
$source->call();