aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/util
diff options
context:
space:
mode:
authorAlkalus <draknyte1@hotmail.com>2017-08-24 08:31:06 +1000
committerAlkalus <draknyte1@hotmail.com>2017-08-24 08:31:06 +1000
commit95120840ce1b142648e86659e00e94fe49e628ba (patch)
tree05feaee883e5985581d878280337f6c655a54f10 /src/Java/gtPlusPlus/core/util
parent3162fe2ce21d5a2905854b0e313d997a240944c0 (diff)
downloadGT5-Unofficial-95120840ce1b142648e86659e00e94fe49e628ba.tar.gz
GT5-Unofficial-95120840ce1b142648e86659e00e94fe49e628ba.tar.bz2
GT5-Unofficial-95120840ce1b142648e86659e00e94fe49e628ba.zip
% Tweaked Lava Filter Recipe.
% Changed handling of Radiation to better align with Gregtech.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util')
-rw-r--r--src/Java/gtPlusPlus/core/util/entity/EntityUtils.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/Java/gtPlusPlus/core/util/entity/EntityUtils.java b/src/Java/gtPlusPlus/core/util/entity/EntityUtils.java
index e5c52939ac..a10c0ce4d1 100644
--- a/src/Java/gtPlusPlus/core/util/entity/EntityUtils.java
+++ b/src/Java/gtPlusPlus/core/util/entity/EntityUtils.java
@@ -1,6 +1,7 @@
package gtPlusPlus.core.util.entity;
import cpw.mods.fml.common.registry.EntityRegistry;
+import gregtech.api.util.GT_Utility;
import ic2.core.IC2Potion;
import ic2.core.item.armor.ItemArmorHazmat;
import net.minecraft.block.Block;
@@ -40,21 +41,22 @@ public class EntityUtils {
EntityRegistry.addSpawn(classy, 6, 1, 5, EntityType, baseBiomeGen); //change the values to vary the spawn rarity, biome, etc.
}
- public static boolean applyRadiationDamageToEntity(final int damage, final World world, final Entity entityHolding){
+ public static boolean applyRadiationDamageToEntity(final int stackSize, final int radiationLevel, final World world, final Entity entityHolding){
if (!world.isRemote){
- if ((damage > 0) && (entityHolding instanceof EntityLivingBase)) {
+ if ((radiationLevel > 0) && (entityHolding instanceof EntityLivingBase)) {
final EntityLivingBase entityLiving = (EntityLivingBase) entityHolding;
- if (!ItemArmorHazmat.hasCompleteHazmat(entityLiving)) {
+ if (!ItemArmorHazmat.hasCompleteHazmat(entityLiving) || !GT_Utility.isWearingFullRadioHazmat(entityLiving)) {
int duration;
if (entityLiving.getActivePotionEffect(IC2Potion.radiation) != null){
//Utils.LOG_INFO("t");
- duration = (damage*5)+entityLiving.getActivePotionEffect(IC2Potion.radiation).getDuration();
+ duration = (radiationLevel*5)+entityLiving.getActivePotionEffect(IC2Potion.radiation).getDuration();
}
else {
//Utils.LOG_INFO("f");
- duration = damage*30;
+ duration = radiationLevel*30;
}
- IC2Potion.radiation.applyTo(entityLiving, duration, damage * 15);
+ //IC2Potion.radiation.applyTo(entityLiving, duration, damage * 15);
+ GT_Utility.applyRadioactivity(entityLiving, radiationLevel, stackSize);
}
}
return true;