From d03b2b28be11c4ad9e5188efad949c88c06036f9 Mon Sep 17 00:00:00 2001 From: "Aidan C. Brady" Date: Wed, 15 Jan 2014 07:22:50 -0500 Subject: [PATCH] Fix Gas Masks making you completely invincible --- common/mekanism/common/item/ItemGasMask.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/mekanism/common/item/ItemGasMask.java b/common/mekanism/common/item/ItemGasMask.java index 8d8f8afba..8d636d097 100644 --- a/common/mekanism/common/item/ItemGasMask.java +++ b/common/mekanism/common/item/ItemGasMask.java @@ -9,6 +9,7 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; +import net.minecraft.util.DamageSource; import net.minecraftforge.common.EnumHelper; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.ForgeSubscribe; @@ -65,7 +66,10 @@ public class ItemGasMask extends ItemArmor if(tank.getFlowing(base.getCurrentItemOrArmor(3)) && tank.getGas(base.getCurrentItemOrArmor(3)) != null) { - event.setCanceled(true); + if(event.source == DamageSource.magic) + { + event.setCanceled(true); + } } } }