Skip to content

Commit

Permalink
Fixed fire resistance filter not accounting for potion effect. Thanks…
Browse files Browse the repository at this point in the history
… to alexbobp.
  • Loading branch information
alexbobp authored and Darkhax committed Mar 30, 2019
1 parent 53a24c1 commit ca0bd0f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.init.MobEffects;
import net.minecraft.potion.Potion;
import net.minecraft.util.IStringSerializable;

public enum FilterType implements IStringSerializable {
Expand Down Expand Up @@ -117,7 +119,8 @@ public static boolean isValidTarget (EntityLivingBase living, int meta) {
return living instanceof EntitySlime;

case 9:
return living.isImmuneToFire();
return living.isImmuneToFire() ||
living.getActivePotionEffect(MobEffects.FIRE_RESISTANCE) != null;

case 10:
return !living.isNonBoss();
Expand Down

0 comments on commit ca0bd0f

Please sign in to comment.