aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTechnus <daniel112092@gmail.com>2016-10-02 17:49:12 +0200
committerTechnus <daniel112092@gmail.com>2016-10-02 17:49:12 +0200
commitc9cf78f268c302d909255715904c9479d2c1485b (patch)
tree74d77a2add5336199d7d49e9198e9261ff094ba3
parent59631856e95b981dbf9ec39a88244c9abb0b1313 (diff)
downloadGT5-Unofficial-c9cf78f268c302d909255715904c9479d2c1485b.tar.gz
GT5-Unofficial-c9cf78f268c302d909255715904c9479d2c1485b.tar.bz2
GT5-Unofficial-c9cf78f268c302d909255715904c9479d2c1485b.zip
Pollution buff (yeah better like that)
-rw-r--r--src/main/java/gregtech/common/GT_Pollution.java16
1 files 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 054d91cc83..db9c201d0f 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<tPollution && tNPol*120 < tPollution*100){
+ if(tNPol*12 < tPollution*10){
int tDiff = tPollution - tNPol;
tDiff = tDiff/10;
tNPol += tDiff;
@@ -71,12 +71,18 @@ public class GT_Pollution {
//Create Pollution effects
// Smog filter TODO
if(tPollution > 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<EntityLiving> 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<EntityLiving> 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));
}