mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 18:59:00 +00:00
Closes #3548
This commit is contained in:
parent
08e6caad88
commit
df7eaa7242
@ -602,10 +602,11 @@ abstract class Entity extends Location implements Metadatable{
|
||||
*
|
||||
*/
|
||||
public function attack($damage, EntityDamageEvent $source){
|
||||
if($this->hasEffect(Effect::FIRE_RESISTANCE)
|
||||
and $source->getCause() === EntityDamageEvent::CAUSE_FIRE
|
||||
and $source->getCause() === EntityDamageEvent::CAUSE_FIRE_TICK
|
||||
and $source->getCause() === EntityDamageEvent::CAUSE_LAVA
|
||||
if($this->hasEffect(Effect::FIRE_RESISTANCE) and (
|
||||
$source->getCause() === EntityDamageEvent::CAUSE_FIRE
|
||||
or $source->getCause() === EntityDamageEvent::CAUSE_FIRE_TICK
|
||||
or $source->getCause() === EntityDamageEvent::CAUSE_LAVA
|
||||
)
|
||||
){
|
||||
$source->setCancelled();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user