From c9cf78f268c302d909255715904c9479d2c1485b Mon Sep 17 00:00:00 2001 From: Technus Date: Sun, 2 Oct 2016 17:49:12 +0200 Subject: [PATCH] Pollution buff (yeah better like that) --- src/main/java/gregtech/common/GT_Pollution.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java index 054d91cc..db9c201d 100644 --- a/src/main/java/gregtech/common/GT_Pollution.java +++ b/src/main/java/gregtech/common/GT_Pollution.java @@ -40,7 +40,7 @@ public class GT_Pollution { int tPollution = GT_Proxy.chunkData.get(tPos)[1]; // System.out.println("process: "+tPos.chunkPosX+" "+tPos.chunkPosZ+" "+tPollution); //Reduce pollution in chunk - tPollution = (int)(0.99f*tPollution); + //tPollution = (int)(0.99f*tPollution); tPollution -= 1000; if(tPollution<=0){tPollution = 0;}else{ //Spread Pollution @@ -53,7 +53,7 @@ public class GT_Pollution { for(ChunkPosition tNPos : tNeighbor){ if(GT_Proxy.chunkData.containsKey(tNPos)){ int tNPol = GT_Proxy.chunkData.get(tNPos)[1]; - if(tNPol GT_Mod.gregtechproxy.mPollutionSmogLimit){ - -// Poison effects - if(tPollution > GT_Mod.gregtechproxy.mPollutionPoisonLimit){ 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(EntityLiving tEnt : tEntitys){ + if(tRan.nextInt(tPollution/25000) > 20){ + tEnt.addPotionEffect(new PotionEffect(Potion.blindness.id, tPollution/25000, 1)); + } + } +// Poison effects + if(tPollution > GT_Mod.gregtechproxy.mPollutionPoisonLimit){ + //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(EntityLiving tEnt : tEntitys){ if(tRan.nextInt(tPollution/25000) > 20){ tEnt.addPotionEffect(new PotionEffect(Potion.poison.id, tPollution/25000, 1));