Things and stuff about pollution
This commit is contained in:
parent
b476b0d54a
commit
299c54f6b2
6 changed files with 17 additions and 16 deletions
|
@ -69,7 +69,7 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch {
|
|||
}
|
||||
|
||||
public int calculatePollutionReduction(int aPollution){
|
||||
return (int) (aPollution *(Math.pow(0.5, mTier-1)));
|
||||
return (int) (aPollution *(Math.pow(0.8, mTier-1)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -95,11 +95,12 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch {
|
|||
double xPos=aDir.offsetX+aMuffler.getXCoord()+0.25F;
|
||||
double yPos=aDir.offsetX+aMuffler.getYCoord()+0.05F;
|
||||
double zPos=aDir.offsetX+aMuffler.getZCoord()+0.25F;
|
||||
|
||||
aWorld.spawnParticle("largesmoke", xPos + (new XSTR()).nextFloat()*0.5F, yPos, zPos + (new XSTR()).nextFloat()*0.5F, 0.0D, 0.3D, 0.0D);
|
||||
if(GT_Pollution.getPollutionAtCoords(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getZCoord())>= GT_Mod.gregtechproxy.mPollutionSmogLimit) {
|
||||
aWorld.spawnParticle("largesmoke", xPos + (new XSTR()).nextFloat()*0.5F, yPos, zPos + (new XSTR()).nextFloat()*0.5F, 0.0D, 0.45D, 0.0D);
|
||||
aWorld.spawnParticle("largesmoke", xPos + (new XSTR()).nextFloat()*0.5F, yPos, zPos + (new XSTR()).nextFloat()*0.5F, 0.0D, 0.6D, 0.0D);
|
||||
if((new XSTR()).nextFloat()*100<calculatePollutionReduction(100)){
|
||||
aWorld.spawnParticle("largesmoke", xPos + (new XSTR()).nextFloat()*0.5F, yPos, zPos + (new XSTR()).nextFloat()*0.5F, 0.0D, 0.3D, 0.0D);
|
||||
if(GT_Pollution.getPollutionAtCoords(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getZCoord())>= GT_Mod.gregtechproxy.mPollutionSmogLimit) {
|
||||
aWorld.spawnParticle("largesmoke", xPos + (new XSTR()).nextFloat()*0.5F, yPos, zPos + (new XSTR()).nextFloat()*0.5F, 0.0D, 0.45D, 0.0D);
|
||||
aWorld.spawnParticle("largesmoke", xPos + (new XSTR()).nextFloat()*0.5F, yPos, zPos + (new XSTR()).nextFloat()*0.5F, 0.0D, 0.6D, 0.0D);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -846,7 +846,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
|
|||
int mPollutionReduction=0;
|
||||
for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) {
|
||||
if (isValidMetaTileEntity(tHatch)) {
|
||||
mPollutionReduction+=tHatch.getPollutionReduction();
|
||||
mPollutionReduction=Math.max(tHatch.calculatePollutionReduction(100),mPollutionReduction);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -865,7 +865,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
|
|||
EnumChatFormatting.RED+ (getIdealStatus() - getRepairStatus())+EnumChatFormatting.RESET+
|
||||
" Efficiency: "+
|
||||
EnumChatFormatting.YELLOW+Float.toString(mEfficiency / 100.0F)+EnumChatFormatting.RESET + " %",
|
||||
"Pollution reduced by: "+ EnumChatFormatting.GREEN + mPollutionReduction+ EnumChatFormatting.RESET+" %"
|
||||
"Pollution reduced to: "+ EnumChatFormatting.GREEN + mPollutionReduction+ EnumChatFormatting.RESET+" %"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -234,7 +234,7 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock
|
|||
int mPollutionReduction=0;
|
||||
for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) {
|
||||
if (isValidMetaTileEntity(tHatch)) {
|
||||
mPollutionReduction+=tHatch.getPollutionReduction();
|
||||
mPollutionReduction=Math.max(tHatch.calculatePollutionReduction(100),mPollutionReduction);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -245,7 +245,7 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock
|
|||
"Fuel Value: "+EnumChatFormatting.YELLOW+fuelValue+EnumChatFormatting.RESET+" EU/L",
|
||||
"Fuel Remaining: "+EnumChatFormatting.GOLD+fuelRemaining+EnumChatFormatting.RESET+" L",
|
||||
"Current Efficiency: "+EnumChatFormatting.YELLOW+(mEfficiency/100F)+EnumChatFormatting.YELLOW+" %",
|
||||
"Pollution reduced by: "+ EnumChatFormatting.GREEN + mPollutionReduction+ EnumChatFormatting.RESET+" %"
|
||||
"Pollution reduced to: "+ EnumChatFormatting.GREEN + mPollutionReduction+ EnumChatFormatting.RESET+" %"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -263,7 +263,7 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
|
|||
int mPollutionReduction=0;
|
||||
for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) {
|
||||
if (isValidMetaTileEntity(tHatch)) {
|
||||
mPollutionReduction+=tHatch.getPollutionReduction();
|
||||
mPollutionReduction=Math.max(tHatch.calculatePollutionReduction(100),mPollutionReduction);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -284,7 +284,7 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
|
|||
EnumChatFormatting.YELLOW+Float.toString(mEfficiency / 100.0F)+EnumChatFormatting.RESET + " %",
|
||||
"Heat capacity: "+
|
||||
EnumChatFormatting.GREEN+mHeatingCapacity+EnumChatFormatting.RESET+" K",
|
||||
"Pollution reduced by: "+ EnumChatFormatting.GREEN + mPollutionReduction+ EnumChatFormatting.RESET+" %"
|
||||
"Pollution reduced to: "+ EnumChatFormatting.GREEN + mPollutionReduction+ EnumChatFormatting.RESET+" %"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -204,7 +204,7 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_M
|
|||
int mPollutionReduction=0;
|
||||
for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) {
|
||||
if (isValidMetaTileEntity(tHatch)) {
|
||||
mPollutionReduction+=tHatch.getPollutionReduction();
|
||||
mPollutionReduction=Math.max(tHatch.calculatePollutionReduction(100),mPollutionReduction);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -229,7 +229,7 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_M
|
|||
"Current Speed: "+EnumChatFormatting.YELLOW+(mEfficiency/100F)+EnumChatFormatting.RESET+"%",
|
||||
"Turbine Damage: "+EnumChatFormatting.RED+Integer.toString(tDura)+EnumChatFormatting.RESET+"%",
|
||||
tMaintainance,
|
||||
"Pollution reduced by: "+ EnumChatFormatting.GREEN + mPollutionReduction+ EnumChatFormatting.RESET+" %"
|
||||
"Pollution reduced to: "+ EnumChatFormatting.GREEN + mPollutionReduction+ EnumChatFormatting.RESET+" %"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -237,7 +237,7 @@ public class GT_MetaTileEntity_MultiFurnace
|
|||
int mPollutionReduction=0;
|
||||
for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) {
|
||||
if (isValidMetaTileEntity(tHatch)) {
|
||||
mPollutionReduction+=tHatch.getPollutionReduction();
|
||||
mPollutionReduction=Math.max(tHatch.calculatePollutionReduction(100),mPollutionReduction);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -258,7 +258,7 @@ public class GT_MetaTileEntity_MultiFurnace
|
|||
EnumChatFormatting.YELLOW+Float.toString(mEfficiency / 100.0F)+EnumChatFormatting.RESET + " %",
|
||||
"Multi smelting: "+
|
||||
EnumChatFormatting.GREEN+mLevel*8+EnumChatFormatting.RESET+" Discount: "+EnumChatFormatting.GREEN+"(EU/t) / "+mCostDiscount+EnumChatFormatting.RESET,
|
||||
"Pollution reduced by: "+ EnumChatFormatting.GREEN + mPollutionReduction+ EnumChatFormatting.RESET+" %"
|
||||
"Pollution reduced to: "+ EnumChatFormatting.GREEN + mPollutionReduction+ EnumChatFormatting.RESET+" %"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue