aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/util
diff options
context:
space:
mode:
authorJordan Byrne <draknyte1@hotmail.com>2017-12-29 14:12:35 +1000
committerJordan Byrne <draknyte1@hotmail.com>2017-12-29 14:12:35 +1000
commit29183be2ec89ee54d748ac6ca64ed67f89f50f90 (patch)
tree5329e51436cff7a2b4b3af507d88eb971583cfa0 /src/Java/gtPlusPlus/core/util
parentd1963f3f97fb6478fdfb0a5c64dd7c5a2d156c93 (diff)
downloadGT5-Unofficial-29183be2ec89ee54d748ac6ca64ed67f89f50f90.tar.gz
GT5-Unofficial-29183be2ec89ee54d748ac6ca64ed67f89f50f90.tar.bz2
GT5-Unofficial-29183be2ec89ee54d748ac6ca64ed67f89f50f90.zip
+ 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.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util')
-rw-r--r--src/Java/gtPlusPlus/core/util/entity/EntityUtils.java25
1 files changed, 14 insertions, 11 deletions
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;