Numbers Crunched For Simulated Pollution
This commit is contained in:
parent
2607649cf6
commit
97cafed13b
3 changed files with 12 additions and 12 deletions
|
@ -60,7 +60,7 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch {
|
|||
}
|
||||
|
||||
public boolean polluteEnvironment() {
|
||||
GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 1000 - (60*mTier));
|
||||
GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 10000 - (600*mTier));
|
||||
return (mTier > 1 && getBaseMetaTileEntity().getRandomNumber(mTier) != 0) || getBaseMetaTileEntity().getAirAtSide(getBaseMetaTileEntity().getFrontFacing());
|
||||
}
|
||||
|
||||
|
|
|
@ -41,10 +41,10 @@ public class GT_Pollution {
|
|||
// System.out.println("process: "+tPos.chunkPosX+" "+tPos.chunkPosZ+" "+tPollution);
|
||||
//Reduce pollution in chunk
|
||||
//tPollution = (int)(0.99f*tPollution);
|
||||
tPollution -= 1000;
|
||||
tPollution -= 3000;
|
||||
if(tPollution<=0){tPollution = 0;}else{
|
||||
//Spread Pollution
|
||||
if(tPollution>50000){
|
||||
if(tPollution>500000){
|
||||
List<ChunkPosition> tNeighbor = new ArrayList();
|
||||
tNeighbor.add(new ChunkPosition(tPos.chunkPosX+1, 1, tPos.chunkPosZ));
|
||||
tNeighbor.add(new ChunkPosition(tPos.chunkPosX-1, 1, tPos.chunkPosZ));
|
||||
|
@ -55,8 +55,8 @@ public class GT_Pollution {
|
|||
int tNPol = GT_Proxy.chunkData.get(tNPos)[1];
|
||||
if(tNPol*12 < tPollution*10){
|
||||
int tDiff = tPollution - tNPol;
|
||||
tDiff = tDiff/10;
|
||||
tNPol += tDiff;
|
||||
tDiff = tDiff/20;
|
||||
tNPol = GT_Utility.safeInt((long)tNPol+tDiff);//tNPol += tDiff;
|
||||
tPollution -= tDiff;
|
||||
GT_Proxy.chunkData.get(tNPos)[1] = tNPol;
|
||||
}
|
||||
|
@ -74,7 +74,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<EntityLiving> tEntitys = aWorld.getEntitiesWithinAABB(EntityLiving.class, chunk);
|
||||
for(EntityLiving tEnt : tEntitys){
|
||||
if(tRan.nextInt(tPollution/25000) > 20){
|
||||
if(tRan.nextInt(tPollution/25000) > 10){
|
||||
tEnt.addPotionEffect(new PotionEffect(Potion.blindness.id, tPollution/25000, 1));
|
||||
}
|
||||
}
|
||||
|
@ -162,10 +162,10 @@ public class GT_Pollution {
|
|||
if(GT_Proxy.chunkData.containsKey(tPos)){
|
||||
tData = GT_Proxy.chunkData.get(tPos);
|
||||
if(tData.length>1){
|
||||
tData[1] += aPollution;
|
||||
tData[1]=GT_Utility.safeInt((long)tData[1]+aPollution);//tData[1] += aPollution;
|
||||
}
|
||||
}else{
|
||||
tData[1] += aPollution;
|
||||
tData[1]=GT_Utility.safeInt((long)tData[1]+aPollution);//tData[1] += aPollution;
|
||||
GT_Proxy.chunkData.put(tPos, tData);
|
||||
}
|
||||
}catch(Exception e){
|
||||
|
|
|
@ -166,10 +166,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
|
|||
public int mGraniteHavestLevel=3;
|
||||
public int mMaxHarvestLevel=7;
|
||||
public int mWireHeatingTicks = 4;
|
||||
public int mPollutionSmogLimit = 40000;
|
||||
public int mPollutionPoisonLimit = 75000;
|
||||
public int mPollutionVegetationLimit = 100000;
|
||||
public int mPollutionSourRainLimit = 200000;
|
||||
public int mPollutionSmogLimit = 550000;
|
||||
public int mPollutionPoisonLimit = 750000;
|
||||
public int mPollutionVegetationLimit = 1000000;
|
||||
public int mPollutionSourRainLimit = 2000000;
|
||||
//public double mMagneticraftBonusOutputPercent = 100.0d;
|
||||
private World mUniverse = null;
|
||||
private final String aTextThermalExpansion = "ThermalExpansion";
|
||||
|
|
Loading…
Reference in a new issue