From 29183be2ec89ee54d748ac6ca64ed67f89f50f90 Mon Sep 17 00:00:00 2001 From: Jordan Byrne Date: Fri, 29 Dec 2017 14:12:35 +1000 Subject: + Add Gadolinium, Samarium, Ytterbium & Lanthanum if they do not exist. + Added new recipe for production of Fluorite. % Some Alloys now use Phosphor instead of Phosphorus. % Changed Ore Block unlocalized name. $ Fixed ore itemblock not showing Chemical Formula. $ Greatly improved radiation handler. $ Fixed old fluorite ore not generating properly. --- .../gtPlusPlus/core/util/entity/EntityUtils.java | 25 ++++++++++++---------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'src/Java/gtPlusPlus/core/util') diff --git a/src/Java/gtPlusPlus/core/util/entity/EntityUtils.java b/src/Java/gtPlusPlus/core/util/entity/EntityUtils.java index 90b4b2b22c..79c643a95d 100644 --- a/src/Java/gtPlusPlus/core/util/entity/EntityUtils.java +++ b/src/Java/gtPlusPlus/core/util/entity/EntityUtils.java @@ -11,6 +11,7 @@ import ic2.core.IC2Potion; import ic2.core.item.armor.ItemArmorHazmat; import net.minecraft.block.Block; import net.minecraft.entity.*; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.world.World; @@ -58,18 +59,20 @@ public class EntityUtils { if (!world.isRemote){ if ((radiationLevel > 0) && (entityHolding instanceof EntityLivingBase)) { final EntityLivingBase entityLiving = (EntityLivingBase) entityHolding; - if (!ItemArmorHazmat.hasCompleteHazmat(entityLiving) || !GT_Utility.isWearingFullRadioHazmat(entityLiving)) { - int duration; - if (entityLiving.getActivePotionEffect(IC2Potion.radiation) != null){ - //Utils.LOG_INFO("t"); - duration = (radiationLevel*5)+entityLiving.getActivePotionEffect(IC2Potion.radiation).getDuration(); + if (!((EntityPlayer) entityHolding).capabilities.isCreativeMode){ + if (!ItemArmorHazmat.hasCompleteHazmat(entityLiving) && !GT_Utility.isWearingFullRadioHazmat(entityLiving)) { + int duration; + if (entityLiving.getActivePotionEffect(IC2Potion.radiation) != null){ + //Utils.LOG_INFO("t"); + duration = (radiationLevel*5)+entityLiving.getActivePotionEffect(IC2Potion.radiation).getDuration(); + } + else { + //Utils.LOG_INFO("f"); + duration = radiationLevel*30; + } + //IC2Potion.radiation.applyTo(entityLiving, duration, damage * 15); + GT_Utility.applyRadioactivity(entityLiving, radiationLevel, stackSize); } - else { - //Utils.LOG_INFO("f"); - duration = radiationLevel*30; - } - //IC2Potion.radiation.applyTo(entityLiving, duration, damage * 15); - GT_Utility.applyRadioactivity(entityLiving, radiationLevel, stackSize); } } return true; -- cgit