From 1d15e8ae8a9df54746a72d7010985f82d95bf40d Mon Sep 17 00:00:00 2001 From: Technus Date: Thu, 20 Oct 2016 13:17:18 +0200 Subject: [PATCH] Pollution effects detects Full hazmat now --- src/main/java/gregtech/common/GT_Pollution.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java index 9ded79ca..c6fc5942 100644 --- a/src/main/java/gregtech/common/GT_Pollution.java +++ b/src/main/java/gregtech/common/GT_Pollution.java @@ -76,7 +76,7 @@ public class GT_Pollution { AxisAlignedBB chunk = AxisAlignedBB.getBoundingBox(tPos.chunkPosX<<4, 0, tPos.chunkPosZ<<4, (tPos.chunkPosX<<4)+16, 256, (tPos.chunkPosZ<<4)+16); List tEntitys = aWorld.getEntitiesWithinAABB(EntityLivingBase.class, chunk); for(EntityLivingBase tEnt : tEntitys){ - if(tRan.nextInt(tPollution/25000) > 10){ + if(!GT_Utility.isWearingFullGasHazmat(tEnt) && tRan.nextInt(tPollution/25000) > 10){ tEnt.addPotionEffect(new PotionEffect(Potion.weakness.id, Math.min(tPollution/1000,1000), 1)); tEnt.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, Math.min(tPollution/1000,1000), 1)); tEnt.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, Math.min(tPollution/1000,1000), 1)); @@ -87,7 +87,7 @@ public class GT_Pollution { //AxisAlignedBB chunk = AxisAlignedBB.getBoundingBox(tPos.chunkPosX*16, 0, tPos.chunkPosZ*16, tPos.chunkPosX*16+16, 256, tPos.chunkPosZ*16+16); //List tEntitys = aWorld.getEntitiesWithinAABB(EntityLiving.class, chunk); for(EntityLivingBase tEnt : tEntitys){ - if(tRan.nextInt(tPollution/25000) > 20){ + if(!GT_Utility.isWearingFullGasHazmat(tEnt) && tRan.nextInt(tPollution/25000) > 20){ tEnt.addPotionEffect(new PotionEffect(Potion.confusion.id, Math.min(tPollution/2000,1000), 1)); tEnt.addPotionEffect(new PotionEffect(Potion.poison.id, Math.min(tPollution/4000,1000), 1)); tEnt.addPotionEffect(new PotionEffect(Potion.blindness.id, Math.min(tPollution/2000,1000), 1));