mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 10:49:10 +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){
|
public function attack($damage, EntityDamageEvent $source){
|
||||||
if($this->hasEffect(Effect::FIRE_RESISTANCE)
|
if($this->hasEffect(Effect::FIRE_RESISTANCE) and (
|
||||||
and $source->getCause() === EntityDamageEvent::CAUSE_FIRE
|
$source->getCause() === EntityDamageEvent::CAUSE_FIRE
|
||||||
and $source->getCause() === EntityDamageEvent::CAUSE_FIRE_TICK
|
or $source->getCause() === EntityDamageEvent::CAUSE_FIRE_TICK
|
||||||
and $source->getCause() === EntityDamageEvent::CAUSE_LAVA
|
or $source->getCause() === EntityDamageEvent::CAUSE_LAVA
|
||||||
|
)
|
||||||
){
|
){
|
||||||
$source->setCancelled();
|
$source->setCancelled();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user