diff options
author | basdxz <tudurap.com@gmail.com> | 2021-03-09 02:23:24 +0000 |
---|---|---|
committer | Léa Gris <lea.gris@noiraude.net> | 2021-03-09 18:27:11 +0100 |
commit | 52d52be168460264682ca046c744114f47969579 (patch) | |
tree | f81b7812611ead471e4a0d014fb02c049287d929 /src/main/java/gregtech | |
parent | 4b6e7cbbe8a2acde5acf93ec176acd3e4d79a338 (diff) | |
download | GT5-Unofficial-52d52be168460264682ca046c744114f47969579.tar.gz GT5-Unofficial-52d52be168460264682ca046c744114f47969579.tar.bz2 GT5-Unofficial-52d52be168460264682ca046c744114f47969579.zip |
Changes 4 Bart
Diffstat (limited to 'src/main/java/gregtech')
-rw-r--r-- | src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java | 26 |
1 files changed, 13 insertions, 13 deletions
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 3c967f5552..4c48fe09f1 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 @@ -61,21 +61,19 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { return true; } - //API Code, Bartworks relies on this. It's marked here, not anywhere else. + //API Code, BartWorks/TecTech based EBF relies on this. It's marked here, not anywhere else. public void setInValidFacings(ForgeDirection... aFacings) { mFacings = Arrays.stream(aFacings).mapToInt(Enum::ordinal).toArray(); } @Override public boolean isFacingValid(byte aFacing) { - boolean valid = true; for (int x : mFacings) { if (x == aFacing) { - valid = false; - break; + return true; } } - return valid; + return false; } @Override @@ -93,23 +91,25 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { return new GT_MetaTileEntity_Hatch_Muffler(mName, mTier, mDescriptionArray, mTextures); } + //MetaTileEntity is passed so newer muffler hatches can do wacky things with the multis public boolean polluteEnvironment(MetaTileEntity mte) { - boolean doPollute = false; if (getBaseMetaTileEntity().getAirAtSide(getBaseMetaTileEntity().getFrontFacing())) { GT_Pollution.addPollution(getBaseMetaTileEntity(), calculatePollutionReduction(10000)); - doPollute = true; + return true; } - return doPollute; + return false; + } + + @Deprecated + public boolean polluteEnvironment() { + return polluteEnvironment(null); } public int calculatePollutionReduction(int aPollution) { - int pollutionReduction; if ((float) mTier < 2) { - pollutionReduction = aPollution; - } else { - pollutionReduction = (int) ((float) aPollution * ((100F - (12.5F * ((float) mTier - 1F))) / 100F)); + return aPollution; } - return pollutionReduction; + return (int) ((float) aPollution * ((100F - (12.5F * ((float) mTier - 1F))) / 100F)); } @Override |