diff options
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java index 4e353003f4..3a79b2a446 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java @@ -421,61 +421,4 @@ GT_MetaTileEntity_MultiBlockBase { return 0; } - public boolean polluteEnvironment(int aPollutionLevel) { - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ - try { - Integer mPollution = 0; - Field f = ReflectionUtils.getField(this.getClass(), "mPollution"); - if (f != null){ - try { - mPollution = (Integer) f.get(this); - } - catch (IllegalArgumentException | IllegalAccessException e) {} - } - if (f != null){ - try { - if (mPollution != null){ - //Reflectively set the pollution back to the TE - int temp = (mPollution += aPollutionLevel); - f.set(this, temp); - Logger.REFLECTION("Set pollution to "+temp+", it was "+mPollution+" before."); - - //Iterate Mufflers - for (final GT_MetaTileEntity_Hatch_Muffler tHatch : this.mMufflerHatches) { - if (isValidMetaTileEntity(tHatch)) { - if (mPollution < 10000) { - break; - } - if (!polluteEnvironmentHatch(tHatch)) { - continue; - } - mPollution -= 10000; - } - } - return mPollution < 10000; - - } - } - catch (IllegalArgumentException | IllegalAccessException e) {} - } - } - catch (Throwable t){} - } - return false; - } - - public boolean polluteEnvironmentHatch(GT_MetaTileEntity_Hatch_Muffler tHatch) { - if (tHatch.getBaseMetaTileEntity().getAirAtSide(tHatch.getBaseMetaTileEntity().getFrontFacing())) { - Logger.REFLECTION("doing pollution"); - PollutionUtils.addPollution(tHatch.getBaseMetaTileEntity(), calculatePollutionReduction(tHatch, 10000)); - return true; - } else { - return false; - } - } - - public int calculatePollutionReduction(GT_MetaTileEntity_Hatch_Muffler tHatch, int aPollution) { - return (int) ((double) aPollution * Math.pow(0.7D, (double) (tHatch.mTier - 1))); - } - } |