From 299c54f6b2fb41dc816e388cf8ca0c39efec17cf Mon Sep 17 00:00:00 2001 From: Technus Date: Tue, 25 Oct 2016 22:04:14 +0200 Subject: Things and stuff about pollution --- .../implementations/GT_MetaTileEntity_Hatch_Muffler.java | 13 +++++++------ .../implementations/GT_MetaTileEntity_MultiBlockBase.java | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity/implementations') diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java index 5272a53ca1..25b620d6ef 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java @@ -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= 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); + } } } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java index 97cbe95255..8be2c95aec 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java @@ -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+" %" }; } -- cgit