From 8ac58626bd4caa9e49f58acc6b97ac031f6c2107 Mon Sep 17 00:00:00 2001 From: Raven Szewczyk Date: Mon, 10 Apr 2023 17:49:16 +0100 Subject: Update spotless config to 0.2.2 --- .../GT_MetaTileEntity_DieselGenerator.java | 178 ++++++++-------- .../generators/GT_MetaTileEntity_GasTurbine.java | 180 ++++++++-------- .../generators/GT_MetaTileEntity_LightningRod.java | 41 ++-- .../GT_MetaTileEntity_MagicEnergyConverter.java | 102 ++++----- .../GT_MetaTileEntity_MagicalEnergyAbsorber.java | 227 ++++++++++----------- .../GT_MetaTileEntity_NaquadahReactor.java | 113 +++++----- .../GT_MetaTileEntity_PlasmaGenerator.java | 50 ++--- .../generators/GT_MetaTileEntity_SteamTurbine.java | 145 +++++++------ 8 files changed, 506 insertions(+), 530 deletions(-) (limited to 'src/main/java/gregtech/common/tileentities/generators') diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java index 3db3a5eef9..e2aea182fb 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java @@ -31,15 +31,15 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe public GT_MetaTileEntity_DieselGenerator(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - new String[] { "Requires liquid Fuel", - "Causes " - + (int) (GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond - * GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier[aTier]) - + " Pollution per second" }); + aID, + aName, + aNameRegional, + aTier, + new String[] { "Requires liquid Fuel", + "Causes " + + (int) (GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond + * GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier[aTier]) + + " Pollution per second" }); onConfigLoad(); } @@ -75,9 +75,9 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe public void onConfigLoad() { this.mEfficiency = GregTech_API.sMachineFile.get( - ConfigCategories.machineconfig, - "DieselGenerator.efficiency.tier." + this.mTier, - (100 - this.mTier * 5)); + ConfigCategories.machineconfig, + "DieselGenerator.efficiency.tier." + this.mTier, + (100 - this.mTier * 5)); } @Override @@ -102,13 +102,13 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aTick % 100 == 0 && mFluid != null && mFluid.amount > this.getCapacity()) { GT_Log.err.println( - "Dupe Abuse: " + aBaseMetaTileEntity.getOwnerName() - + " Coords: " - + aBaseMetaTileEntity.getXCoord() - + " " - + aBaseMetaTileEntity.getYCoord() - + " " - + aBaseMetaTileEntity.getZCoord()); + "Dupe Abuse: " + aBaseMetaTileEntity.getOwnerName() + + " Coords: " + + aBaseMetaTileEntity.getXCoord() + + " " + + aBaseMetaTileEntity.getYCoord() + + " " + + aBaseMetaTileEntity.getZCoord()); aBaseMetaTileEntity.setToFire(); } super.onPostTick(aBaseMetaTileEntity, aTick); @@ -127,19 +127,19 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe final byte topFacing = (byte) ForgeDirection.UP.ordinal(); if (aBaseMetaTileEntity.getCoverIDAtSide(topFacing) == 0 - && !aBaseMetaTileEntity.getOpacityAtSide(topFacing)) { + && !aBaseMetaTileEntity.getOpacityAtSide(topFacing)) { final double x = aBaseMetaTileEntity.getOffsetX(topFacing, 1) + 2D / 16D - + XSTR_INSTANCE.nextFloat() * 14D / 16D; + + XSTR_INSTANCE.nextFloat() * 14D / 16D; final double y = aBaseMetaTileEntity.getOffsetY(topFacing, 1) + 1D / 32D; final double z = aBaseMetaTileEntity.getOffsetZ(topFacing, 1) + 2D / 16D - + XSTR_INSTANCE.nextFloat() * 14D / 16D; + + XSTR_INSTANCE.nextFloat() * 14D / 16D; new ParticleEventBuilder().setMotion(0D, 0D, 0D) - .setPosition(x, y, z) - .setWorld(getBaseMetaTileEntity().getWorld()) - .setIdentifier(ParticleFX.SMOKE) - .run(); + .setPosition(x, y, z) + .setWorld(getBaseMetaTileEntity().getWorld()) + .setIdentifier(ParticleFX.SMOKE) + .run(); } } } @@ -147,118 +147,118 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe @Override public ITexture[] getFront(byte aColor) { return new ITexture[] { super.getFront(aColor)[0], - TextureFactory.of( - TextureFactory.of(DIESEL_GENERATOR_FRONT), - TextureFactory.builder() - .addIcon(DIESEL_GENERATOR_FRONT_GLOW) - .glow() - .build()), - OVERLAYS_ENERGY_OUT[this.mTier] }; + TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_FRONT), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_FRONT_GLOW) + .glow() + .build()), + OVERLAYS_ENERGY_OUT[this.mTier] }; } @Override public ITexture[] getBack(byte aColor) { return new ITexture[] { super.getBack(aColor)[0], - TextureFactory.of( - TextureFactory.of(DIESEL_GENERATOR_BACK), - TextureFactory.builder() - .addIcon(DIESEL_GENERATOR_BACK_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_BACK), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_BACK_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getBottom(byte aColor) { return new ITexture[] { super.getBottom(aColor)[0], - TextureFactory.of( - TextureFactory.of(DIESEL_GENERATOR_BOTTOM), - TextureFactory.builder() - .addIcon(DIESEL_GENERATOR_BOTTOM_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_BOTTOM), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_BOTTOM_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getTop(byte aColor) { return new ITexture[] { super.getTop(aColor)[0], - TextureFactory.of( - TextureFactory.of(DIESEL_GENERATOR_TOP), - TextureFactory.builder() - .addIcon(DIESEL_GENERATOR_TOP_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_TOP), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_TOP_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getSides(byte aColor) { return new ITexture[] { super.getSides(aColor)[0], - TextureFactory.of( - TextureFactory.of(DIESEL_GENERATOR_SIDE), - TextureFactory.builder() - .addIcon(DIESEL_GENERATOR_SIDE_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_SIDE), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_SIDE_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getFrontActive(byte aColor) { return new ITexture[] { super.getFrontActive(aColor)[0], - TextureFactory.of( - TextureFactory.of(DIESEL_GENERATOR_FRONT_ACTIVE), - TextureFactory.builder() - .addIcon(DIESEL_GENERATOR_FRONT_ACTIVE_GLOW) - .glow() - .build()), - OVERLAYS_ENERGY_OUT[this.mTier] }; + TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_FRONT_ACTIVE), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_FRONT_ACTIVE_GLOW) + .glow() + .build()), + OVERLAYS_ENERGY_OUT[this.mTier] }; } @Override public ITexture[] getBackActive(byte aColor) { return new ITexture[] { super.getBackActive(aColor)[0], - TextureFactory.of( - TextureFactory.of(DIESEL_GENERATOR_BACK_ACTIVE), - TextureFactory.builder() - .addIcon(DIESEL_GENERATOR_BACK_ACTIVE_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_BACK_ACTIVE), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_BACK_ACTIVE_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getBottomActive(byte aColor) { return new ITexture[] { super.getBottomActive(aColor)[0], - TextureFactory.of( - TextureFactory.of(DIESEL_GENERATOR_BOTTOM_ACTIVE), - TextureFactory.builder() - .addIcon(DIESEL_GENERATOR_BOTTOM_ACTIVE_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_BOTTOM_ACTIVE), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_BOTTOM_ACTIVE_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getTopActive(byte aColor) { return new ITexture[] { super.getTopActive(aColor)[0], - TextureFactory.of( - TextureFactory.of(DIESEL_GENERATOR_TOP_ACTIVE), - TextureFactory.builder() - .addIcon(DIESEL_GENERATOR_TOP_ACTIVE_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_TOP_ACTIVE), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_TOP_ACTIVE_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getSidesActive(byte aColor) { return new ITexture[] { super.getSidesActive(aColor)[0], - TextureFactory.of( - TextureFactory.of(DIESEL_GENERATOR_SIDE_ACTIVE), - TextureFactory.builder() - .addIcon(DIESEL_GENERATOR_SIDE_ACTIVE_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_SIDE_ACTIVE), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_SIDE_ACTIVE_GLOW) + .glow() + .build()) }; } @Override public int getPollution() { return (int) (GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond - * GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier[mTier]); + * GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier[mTier]); } } diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java index 2e0279552a..1c8aeebb40 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java @@ -19,30 +19,30 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat @Deprecated public GT_MetaTileEntity_GasTurbine(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - new String[] { "Requires flammable Gasses", - "Causes " - + (int) (GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond - * GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier[aTier]) - + " Pollution per second" }); + aID, + aName, + aNameRegional, + aTier, + new String[] { "Requires flammable Gasses", + "Causes " + + (int) (GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond + * GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier[aTier]) + + " Pollution per second" }); this.mEfficiency = 100 - aTier * 5; onConfigLoad(); } public GT_MetaTileEntity_GasTurbine(int aID, String aName, String aNameRegional, int aTier, int mEfficiency) { super( - aID, - aName, - aNameRegional, - aTier, - new String[] { "Requires flammable Gasses", - "Causes " - + (int) (GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond - * GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier[aTier]) - + " Pollution per second" }); + aID, + aName, + aNameRegional, + aTier, + new String[] { "Requires flammable Gasses", + "Causes " + + (int) (GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond + * GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier[aTier]) + + " Pollution per second" }); this.mEfficiency = mEfficiency; onConfigLoad(); } @@ -62,7 +62,7 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat } public GT_MetaTileEntity_GasTurbine(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, - int mEfficiency) { + int mEfficiency) { super(aName, aTier, aDescription, aTextures); this.mEfficiency = mEfficiency; onConfigLoad(); @@ -76,11 +76,11 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_GasTurbine( - this.mName, - this.mTier, - this.mDescriptionArray, - this.mTextures, - this.mEfficiency); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mEfficiency); } @Override @@ -94,10 +94,8 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat } public void onConfigLoad() { - this.mEfficiency = GregTech_API.sMachineFile.get( - ConfigCategories.machineconfig, - "GasTurbine.efficiency.tier." + this.mTier, - this.mEfficiency); + this.mEfficiency = GregTech_API.sMachineFile + .get(ConfigCategories.machineconfig, "GasTurbine.efficiency.tier." + this.mTier, this.mEfficiency); } @Override @@ -108,118 +106,118 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat @Override public ITexture[] getFront(byte aColor) { return new ITexture[] { super.getFront(aColor)[0], - TextureFactory.of( - TextureFactory.of(GAS_TURBINE_FRONT), - TextureFactory.builder() - .addIcon(GAS_TURBINE_FRONT_GLOW) - .glow() - .build()), - OVERLAYS_ENERGY_OUT[this.mTier] }; + TextureFactory.of( + TextureFactory.of(GAS_TURBINE_FRONT), + TextureFactory.builder() + .addIcon(GAS_TURBINE_FRONT_GLOW) + .glow() + .build()), + OVERLAYS_ENERGY_OUT[this.mTier] }; } @Override public ITexture[] getBack(byte aColor) { return new ITexture[] { super.getBack(aColor)[0], - TextureFactory.of( - TextureFactory.of(GAS_TURBINE_BACK), - TextureFactory.builder() - .addIcon(GAS_TURBINE_BACK_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(GAS_TURBINE_BACK), + TextureFactory.builder() + .addIcon(GAS_TURBINE_BACK_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getBottom(byte aColor) { return new ITexture[] { super.getBottom(aColor)[0], - TextureFactory.of( - TextureFactory.of(GAS_TURBINE_BOTTOM), - TextureFactory.builder() - .addIcon(GAS_TURBINE_BOTTOM_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(GAS_TURBINE_BOTTOM), + TextureFactory.builder() + .addIcon(GAS_TURBINE_BOTTOM_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getTop(byte aColor) { return new ITexture[] { super.getTop(aColor)[0], - TextureFactory.of( - TextureFactory.of(GAS_TURBINE_TOP), - TextureFactory.builder() - .addIcon(GAS_TURBINE_TOP_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(GAS_TURBINE_TOP), + TextureFactory.builder() + .addIcon(GAS_TURBINE_TOP_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getSides(byte aColor) { return new ITexture[] { super.getSides(aColor)[0], - TextureFactory.of( - TextureFactory.of(GAS_TURBINE_SIDE), - TextureFactory.builder() - .addIcon(GAS_TURBINE_SIDE_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(GAS_TURBINE_SIDE), + TextureFactory.builder() + .addIcon(GAS_TURBINE_SIDE_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getFrontActive(byte aColor) { return new ITexture[] { super.getFrontActive(aColor)[0], - TextureFactory.of( - TextureFactory.of(GAS_TURBINE_FRONT_ACTIVE), - TextureFactory.builder() - .addIcon(GAS_TURBINE_FRONT_ACTIVE_GLOW) - .glow() - .build()), - OVERLAYS_ENERGY_OUT[this.mTier] }; + TextureFactory.of( + TextureFactory.of(GAS_TURBINE_FRONT_ACTIVE), + TextureFactory.builder() + .addIcon(GAS_TURBINE_FRONT_ACTIVE_GLOW) + .glow() + .build()), + OVERLAYS_ENERGY_OUT[this.mTier] }; } @Override public ITexture[] getBackActive(byte aColor) { return new ITexture[] { super.getBackActive(aColor)[0], - TextureFactory.of( - TextureFactory.of(GAS_TURBINE_BACK_ACTIVE), - TextureFactory.builder() - .addIcon(GAS_TURBINE_BACK_ACTIVE_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(GAS_TURBINE_BACK_ACTIVE), + TextureFactory.builder() + .addIcon(GAS_TURBINE_BACK_ACTIVE_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getBottomActive(byte aColor) { return new ITexture[] { super.getBottomActive(aColor)[0], - TextureFactory.of( - TextureFactory.of(GAS_TURBINE_BOTTOM_ACTIVE), - TextureFactory.builder() - .addIcon(GAS_TURBINE_BOTTOM_ACTIVE_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(GAS_TURBINE_BOTTOM_ACTIVE), + TextureFactory.builder() + .addIcon(GAS_TURBINE_BOTTOM_ACTIVE_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getTopActive(byte aColor) { return new ITexture[] { super.getTopActive(aColor)[0], - TextureFactory.of( - TextureFactory.of(GAS_TURBINE_TOP_ACTIVE), - TextureFactory.builder() - .addIcon(GAS_TURBINE_TOP_ACTIVE_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(GAS_TURBINE_TOP_ACTIVE), + TextureFactory.builder() + .addIcon(GAS_TURBINE_TOP_ACTIVE_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getSidesActive(byte aColor) { return new ITexture[] { super.getSidesActive(aColor)[0], - TextureFactory.of( - TextureFactory.of(GAS_TURBINE_SIDE_ACTIVE), - TextureFactory.builder() - .addIcon(GAS_TURBINE_SIDE_ACTIVE_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(GAS_TURBINE_SIDE_ACTIVE), + TextureFactory.builder() + .addIcon(GAS_TURBINE_SIDE_ACTIVE_GLOW) + .glow() + .build()) }; } @Override public int getPollution() { return (int) (GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond - * GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier[mTier]); + * GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier[mTier]); } } diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java index 152a849d5a..33066f7617 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java @@ -24,31 +24,29 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach } public GT_MetaTileEntity_LightningRod(String aName, int aTier, int aInvSlotCount, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } public GT_MetaTileEntity_LightningRod(String aName, int aTier, int aInvSlotCount, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + boolean aActive, boolean aRedstone) { if (aSide != ForgeDirection.UP.ordinal()) { return new ITexture[] { BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], - BlockIcons.OVERLAYS_ENERGY_OUT_POWER[mTier] }; + BlockIcons.OVERLAYS_ENERGY_OUT_POWER[mTier] }; } if (!aActive) return new ITexture[] { BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], - TextureFactory.of(BlockIcons.MACHINE_CASING_FUSION_GLASS) }; - return new ITexture[] { - BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of( - BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW), - TextureFactory.builder() - .addIcon(BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW) - .glow() - .build() }; + TextureFactory.of(BlockIcons.MACHINE_CASING_FUSION_GLASS) }; + return new ITexture[] { BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], + TextureFactory.of(BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW), TextureFactory.builder() + .addIcon(BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW) + .glow() + .build() }; } @Override @@ -59,11 +57,11 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_LightningRod( - this.mName, - this.mTier, - this.mInventory.length, - this.mDescriptionArray, - this.mTextures); + this.mName, + this.mTier, + this.mInventory.length, + this.mDescriptionArray, + this.mTextures); } @Override @@ -86,8 +84,8 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach for (int i = aBaseMetaTileEntity.getYCoord() + 1; i < aWorld.getHeight() - 1; i++) { if (isRodValid && aBaseMetaTileEntity.getBlock(aX, i, aZ) - .getUnlocalizedName() - .equals("blockFenceIron")) { + .getUnlocalizedName() + .equals("blockFenceIron")) { aRodValue++; } else { isRodValid = false; @@ -99,9 +97,8 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach } if (!aWorld.isThundering() && ((aY + aRodValue) < 128)) aRodValue = 0; if (XSTR_INSTANCE.nextInt(4 * aWorld.getHeight()) < (aRodValue * (aY + aRodValue))) { - aBaseMetaTileEntity.increaseStoredEnergyUnits( - maxEUStore() - aBaseMetaTileEntity.getStoredEU(), - false); + aBaseMetaTileEntity + .increaseStoredEnergyUnits(maxEUStore() - aBaseMetaTileEntity.getStoredEU(), false); aWorld.addWeatherEffect(new EntityLightningBolt(aWorld, aX, aY + aRodValue, aZ)); } } diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java index b67993770d..17089403c3 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java @@ -29,13 +29,13 @@ public class GT_MetaTileEntity_MagicEnergyConverter extends GT_MetaTileEntity_Ba } public GT_MetaTileEntity_MagicEnergyConverter(String aName, int aTier, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); onConfigLoad(); } public GT_MetaTileEntity_MagicEnergyConverter(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); onConfigLoad(); } @@ -48,10 +48,10 @@ public class GT_MetaTileEntity_MagicEnergyConverter extends GT_MetaTileEntity_Ba @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_MagicEnergyConverter( - this.mName, - this.mTier, - this.mDescriptionArray, - this.mTextures); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures); } @Override @@ -66,9 +66,9 @@ public class GT_MetaTileEntity_MagicEnergyConverter extends GT_MetaTileEntity_Ba public void onConfigLoad() { this.mEfficiency = GregTech_API.sMachineFile.get( - ConfigCategories.machineconfig, - "MagicEnergyConverter.efficiency.tier." + this.mTier, - 100 - this.mTier * 5); + ConfigCategories.machineconfig, + "MagicEnergyConverter.efficiency.tier." + this.mTier, + 100 - this.mTier * 5); } @Override @@ -79,93 +79,93 @@ public class GT_MetaTileEntity_MagicEnergyConverter extends GT_MetaTileEntity_Ba @Override public ITexture[] getFront(byte aColor) { return new ITexture[] { super.getFront(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC), - TextureFactory.builder() - .addIcon(MACHINE_CASING_MAGIC_GLOW) - .glow() - .build(), - OVERLAYS_ENERGY_OUT[mTier] }; + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_GLOW) + .glow() + .build(), + OVERLAYS_ENERGY_OUT[mTier] }; } @Override public ITexture[] getBack(byte aColor) { return new ITexture[] { super.getBack(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_FRONT), - TextureFactory.builder() - .addIcon(MACHINE_CASING_MAGIC_FRONT_GLOW) - .glow() - .build() }; + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_FRONT_GLOW) + .glow() + .build() }; } @Override public ITexture[] getBottom(byte aColor) { return new ITexture[] { super.getBottom(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC), - TextureFactory.builder() - .addIcon(MACHINE_CASING_MAGIC_GLOW) - .glow() - .build() }; + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_GLOW) + .glow() + .build() }; } @Override public ITexture[] getTop(byte aColor) { return new ITexture[] { super.getTop(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC), - TextureFactory.builder() - .addIcon(MACHINE_CASING_MAGIC_GLOW) - .glow() - .build() }; + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_GLOW) + .glow() + .build() }; } @Override public ITexture[] getSides(byte aColor) { return new ITexture[] { super.getSides(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC), - TextureFactory.builder() - .addIcon(MACHINE_CASING_MAGIC_GLOW) - .glow() - .build() }; + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_GLOW) + .glow() + .build() }; } @Override public ITexture[] getFrontActive(byte aColor) { return new ITexture[] { super.getFrontActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE), - TextureFactory.builder() - .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW) - .glow() - .build(), - OVERLAYS_ENERGY_OUT[mTier] }; + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW) + .glow() + .build(), + OVERLAYS_ENERGY_OUT[mTier] }; } @Override public ITexture[] getBackActive(byte aColor) { return new ITexture[] { super.getBackActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_FRONT_ACTIVE), - TextureFactory.builder() - .addIcon(MACHINE_CASING_MAGIC_FRONT_ACTIVE_GLOW) - .glow() - .build() }; + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_FRONT_ACTIVE_GLOW) + .glow() + .build() }; } @Override public ITexture[] getBottomActive(byte aColor) { return new ITexture[] { super.getBottomActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE), - TextureFactory.builder() - .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW) - .glow() - .build() }; + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW) + .glow() + .build() }; } @Override public ITexture[] getTopActive(byte aColor) { return new ITexture[] { super.getTopActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE), - TextureFactory.builder() - .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW) - .glow() - .build() }; + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW) + .glow() + .build() }; } @Override public ITexture[] getSidesActive(byte aColor) { return new ITexture[] { super.getSidesActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE), - TextureFactory.builder() - .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW) - .glow() - .build() }; + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW) + .glow() + .build() }; } @Override diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java index dded37de09..b95f79c0f5 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java @@ -69,13 +69,13 @@ interface MagicalEnergyBBListener { } public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_BasicGenerator - implements MagicalEnergyBBListener { + implements MagicalEnergyBBListener { private static final boolean THAUMCRAFT_LOADED = Thaumcraft.isModLoaded(); private static final ConcurrentHashMap sSubscribedCrystals = new ConcurrentHashMap<>( - 4); + 4); private static final List sPrimalAspects = (THAUMCRAFT_LOADED) ? Aspect.getPrimalAspects() - : new ArrayList<>(); + : new ArrayList<>(); private static final Map sAspectsEnergy = new HashMap<>(); private static boolean sAllowMultipleEggs = false; private static GT_MetaTileEntity_MagicalEnergyAbsorber sActiveSiphon = null; @@ -97,7 +97,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B } private GT_MetaTileEntity_MagicalEnergyAbsorber(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); onConfigLoad(GregTech_API.sMachineFile); } @@ -118,12 +118,12 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B for (Aspect tAspect : Aspect.aspects.values()) { // noinspection UnstableApiUsage sAspectsEnergy.put( - tAspect, - Enums.getIfPresent( - TC_Aspects.class, - tAspect.getTag() - .toUpperCase(Locale.ENGLISH)) - .or(TC_Aspects.AER).mValue * sEnergyPerEssentia); + tAspect, + Enums.getIfPresent( + TC_Aspects.class, + tAspect.getTag() + .toUpperCase(Locale.ENGLISH)) + .or(TC_Aspects.AER).mValue * sEnergyPerEssentia); } } } @@ -137,9 +137,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B sharedConfigLoad(aConfig); mEfficiency = aConfig.get(machineconfig, "MagicEnergyAbsorber.efficiency.tier." + mTier, 100 - mTier * 10); mMaxVisPerDrain = (int) Math.round( - Math.sqrt( - (double) (V[mTier] * 10000) - / (sEnergyFromVis * (getEfficiency() != 0 ? getEfficiency() : 100)))); + Math.sqrt((double) (V[mTier] * 10000) / (sEnergyFromVis * (getEfficiency() != 0 ? getEfficiency() : 100)))); if (Math.pow(mMaxVisPerDrain, 2) * sEnergyFromVis * (getEfficiency() != 0 ? getEfficiency() : 100) < V[mTier]) { mMaxVisPerDrain += 1; } @@ -150,13 +148,13 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B if (aPlayer.isSneaking()) mMagicalEnergyBB.decreaseTier(); else mMagicalEnergyBB.increaseTier(); GT_Utility.sendChatToPlayer( - aPlayer, - String.format( - GT_LanguageManager.addStringLocalization( - "Interaction_DESCRIPTION_MagicalEnergyAbsorber_Screwdriver", - "Absorption range: %s blocks"), - mMagicalEnergyBB.getRange(), - true)); + aPlayer, + String.format( + GT_LanguageManager.addStringLocalization( + "Interaction_DESCRIPTION_MagicalEnergyAbsorber_Screwdriver", + "Absorption range: %s blocks"), + mMagicalEnergyBB.getRange(), + true)); mMagicalEnergyBB.update(); } @@ -208,43 +206,43 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B final String LI = "- %%%"; final String EU_PER = "%%%EU per "; List description = new ArrayList<>(); + description + .add(UNDERLINE + "Feasts on " + LIGHT_PURPLE + UNDERLINE + "magic" + GRAY + UNDERLINE + " close to it:"); description.add( - UNDERLINE + "Feasts on " + LIGHT_PURPLE + UNDERLINE + "magic" + GRAY + UNDERLINE + " close to it:"); - description.add( - LI + (sAllowMultipleEggs ? "A " : "An " + YELLOW + UNDERLINE + "EXCLUSIVE" + RESET) - + GRAY - + " " - + LIGHT_PURPLE - + "Dragon Egg" - + GRAY - + " atop"); + LI + (sAllowMultipleEggs ? "A " : "An " + YELLOW + UNDERLINE + "EXCLUSIVE" + RESET) + + GRAY + + " " + + LIGHT_PURPLE + + "Dragon Egg" + + GRAY + + " atop"); if (sEnergyPerEndercrystal > 0) { description.add(LI + sEnergyPerEndercrystal + EU_PER + LIGHT_PURPLE + "Ender Crystal" + GRAY + " in range"); } if (THAUMCRAFT_LOADED) { description.add(LI + mMaxVisPerDrain + "%%%CV/t from an " + LIGHT_PURPLE + "Energised Node" + GRAY); description.add( - LI + (sEnergyPerEssentia * getEfficiency()) / 100 - + EU_PER - + LIGHT_PURPLE - + "Essentia" - + GRAY - + " Aspect-Value from containers in range"); + LI + (sEnergyPerEssentia * getEfficiency()) / 100 + + EU_PER + + LIGHT_PURPLE + + "Essentia" + + GRAY + + " Aspect-Value from containers in range"); } description.add(" "); description.add(UNDERLINE + "Lookup range (Use Screwdriver to change):"); description.add("Default: %%%" + GREEN + mMagicalEnergyBB.getDefaultRange()); description.add("Max: %%%" + GREEN + mMagicalEnergyBB.getMaxRange()); description.add(" "); + description + .add(UNDERLINE + "Fuels on " + LIGHT_PURPLE + UNDERLINE + "enchantments" + GRAY + UNDERLINE + " input:"); description.add( - UNDERLINE + "Fuels on " + LIGHT_PURPLE + UNDERLINE + "enchantments" + GRAY + UNDERLINE + " input:"); - description.add( - "- Item: %%%" + (10000 * getEfficiency()) / 100 - + EU_PER - + LIGHT_PURPLE - + "enchant" - + GRAY - + " weight × level / max"); + "- Item: %%%" + (10000 * getEfficiency()) / 100 + + EU_PER + + LIGHT_PURPLE + + "enchant" + + GRAY + + " weight × level / max"); description.add("- Book: %%%" + 10000 + EU_PER + LIGHT_PURPLE + "enchant" + GRAY + " weight × level / max"); description.add(" "); description.add("Efficiency: %%%" + GREEN + getEfficiency() + "%"); @@ -254,29 +252,29 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B @Override public ITexture[] getFront(byte aColor) { return new ITexture[] { super.getFront(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC), - TextureFactory.builder() - .addIcon(MACHINE_CASING_MAGIC_GLOW) - .glow() - .build(), - OVERLAYS_ENERGY_OUT[mTier] }; + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_GLOW) + .glow() + .build(), + OVERLAYS_ENERGY_OUT[mTier] }; } @Override public ITexture[] getBack(byte aColor) { return new ITexture[] { super.getBack(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_FRONT), - TextureFactory.builder() - .addIcon(MACHINE_CASING_MAGIC_FRONT_GLOW) - .glow() - .build() }; + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_FRONT_GLOW) + .glow() + .build() }; } @Override public ITexture[] getBottom(byte aColor) { return new ITexture[] { super.getBottom(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC), - TextureFactory.builder() - .addIcon(MACHINE_CASING_MAGIC_GLOW) - .glow() - .build() }; + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_GLOW) + .glow() + .build() }; } @Override @@ -287,56 +285,56 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B @Override public ITexture[] getSides(byte aColor) { return new ITexture[] { super.getSides(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC), - TextureFactory.builder() - .addIcon(MACHINE_CASING_MAGIC_GLOW) - .glow() - .build() }; + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_GLOW) + .glow() + .build() }; } @Override public ITexture[] getFrontActive(byte aColor) { return new ITexture[] { super.getFrontActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE), - TextureFactory.builder() - .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW) - .glow() - .build(), - OVERLAYS_ENERGY_OUT[mTier] }; + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW) + .glow() + .build(), + OVERLAYS_ENERGY_OUT[mTier] }; } @Override public ITexture[] getBackActive(byte aColor) { return new ITexture[] { super.getBackActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_FRONT_ACTIVE), - TextureFactory.builder() - .addIcon(MACHINE_CASING_MAGIC_FRONT_ACTIVE_GLOW) - .glow() - .build() }; + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_FRONT_ACTIVE_GLOW) + .glow() + .build() }; } @Override public ITexture[] getBottomActive(byte aColor) { return new ITexture[] { super.getBottomActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE), - TextureFactory.builder() - .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW) - .glow() - .build() }; + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW) + .glow() + .build() }; } @Override public ITexture[] getTopActive(byte aColor) { return new ITexture[] { super.getTopActive(aColor)[0], TextureFactory.of(MACHINE_CASING_DRAGONEGG), - TextureFactory.builder() - .addIcon(MACHINE_CASING_DRAGONEGG_GLOW) - .glow() - .build() }; + TextureFactory.builder() + .addIcon(MACHINE_CASING_DRAGONEGG_GLOW) + .glow() + .build() }; } @Override public ITexture[] getSidesActive(byte aColor) { return new ITexture[] { super.getSidesActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE), - TextureFactory.builder() - .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW) - .glow() - .build() }; + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW) + .glow() + .build() }; } @Override @@ -379,8 +377,8 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B } aBaseMetaTileEntity.increaseStoredEnergyUnits(tGeneratedEU, true); aBaseMetaTileEntity.setActive( - aBaseMetaTileEntity.isAllowedToWork() - && aBaseMetaTileEntity.getUniversalEnergyStored() >= maxEUOutput() + getMinimumStoredEU()); + aBaseMetaTileEntity.isAllowedToWork() + && aBaseMetaTileEntity.getUniversalEnergyStored() >= maxEUOutput() + getMinimumStoredEU()); } } @@ -403,10 +401,9 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B final double oY = aBaseMetaTileEntity.getYCoord() + 17D / 32D; final double oZ = aBaseMetaTileEntity.getZCoord() + 8D / 16D; - final ParticleEventBuilder particleEventBuilder = new ParticleEventBuilder().setWorld( - getBaseMetaTileEntity().getWorld()) - .setIdentifier( - ParticleFX.PORTAL); + final ParticleEventBuilder particleEventBuilder = new ParticleEventBuilder() + .setWorld(getBaseMetaTileEntity().getWorld()) + .setIdentifier(ParticleFX.PORTAL); for (int i = 0; i < 9; i++) { final double dX = (XSTR_INSTANCE.nextFloat() - 0.5D) / 2D; @@ -423,8 +420,8 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B final double mZ = dZ * 4D; particleEventBuilder.setMotion(mX, mY, mZ) - .setPosition(x, y, z) - .run(); + .setPosition(x, y, z) + .run(); } } } @@ -458,8 +455,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B private boolean isDisenchantableItem(ItemStack aStack) { return ((aStack.isItemEnchanted()) && (aStack.getItem() - .getItemEnchantability() - > 0)); + .getItemEnchantability() > 0)); } private boolean isEnchantedBook(ItemStack aStack) { @@ -507,7 +503,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B // Only consume input when it can store EU and push output if ((getBaseMetaTileEntity().getStoredEU() + tEU) < getBaseMetaTileEntity().getEUCapacity() - && getBaseMetaTileEntity().addStackToSlot(getOutputSlot(), tOutputStack)) { + && getBaseMetaTileEntity().addStackToSlot(getOutputSlot(), tOutputStack)) { decrStackSize(getInputSlot(), 1); } else { tEU = 0; @@ -524,11 +520,11 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B if (!hasEgg()) return 0; if (!sAllowMultipleEggs) { if (sActiveSiphon != null && sActiveSiphon != this - && sActiveSiphon.getBaseMetaTileEntity() != null - && !sActiveSiphon.getBaseMetaTileEntity() - .isInvalidTileEntity() - && sActiveSiphon.isChunkLoaded() - && sActiveSiphon.hasEgg()) { + && sActiveSiphon.getBaseMetaTileEntity() != null + && !sActiveSiphon.getBaseMetaTileEntity() + .isInvalidTileEntity() + && sActiveSiphon.isChunkLoaded() + && sActiveSiphon.hasEgg()) { getBaseMetaTileEntity().doExplosion(Integer.MAX_VALUE); } else { setActiveSiphon(this); @@ -538,9 +534,9 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B if (egg == Blocks.dragon_egg) { return sDragonEggEnergyPerTick; } else if (egg.getUnlocalizedName() - .contains("creeperEgg")) { - return sCreeperEggEnergyPerTick; - } + .contains("creeperEgg")) { + return sCreeperEggEnergyPerTick; + } return 0; } @@ -591,10 +587,10 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B Aspect aspect = mAvailableEssentiaAspects.get(i); long tAspectEU = ((long) sAspectsEnergy.get(aspect) * getEfficiency()) / 100; if (tAspectEU <= tEUtoGen && AspectSourceHelper.drainEssentia( - (TileEntity) getBaseMetaTileEntity(), - aspect, - ForgeDirection.UNKNOWN, - mMagicalEnergyBB.getRange())) { + (TileEntity) getBaseMetaTileEntity(), + aspect, + ForgeDirection.UNKNOWN, + mMagicalEnergyBB.getRange())) { tEUtoGen -= tAspectEU; tEU += tAspectEU; } @@ -608,7 +604,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B if (aBlock == Blocks.dragon_egg) return true; if (aBlock instanceof BlockDragonEgg) return true; return (aBlock.getUnlocalizedName() - .equals("tile.dragonEgg")); + .equals("tile.dragonEgg")); } private boolean isChunkLoaded() { @@ -713,18 +709,13 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B double tX = tBaseMetaTileEntity.getXCoord(); double tY = tBaseMetaTileEntity.getYCoord(); double tZ = tBaseMetaTileEntity.getZCoord(); - return AxisAlignedBB.getBoundingBox( - tX - tRange, - tY - tRange, - tZ - tRange, - tX + tRange, - tY + tRange, - tZ + tRange); + return AxisAlignedBB + .getBoundingBox(tX - tRange, tY - tRange, tZ - tRange, tX + tRange, tY + tRange, tZ + tRange); } private void scanLivingCrystals() { World tWorld = mAbsorber.getBaseMetaTileEntity() - .getWorld(); + .getWorld(); mLivingCrystalIDs.clear(); for (EntityEnderCrystal o : tWorld.getEntitiesWithinAABB(EntityEnderCrystal.class, getAxisAlignedBB())) { if (o.isEntityAlive()) { @@ -740,8 +731,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B int tRange = getRange(); int tY = tBaseMetaTileEntity.getYCoord(); int tMaxY = tBaseMetaTileEntity.getWorld() - .getHeight() - - 1; + .getHeight() - 1; // Make sure relative Y range stays between 0 and world max Y int rYMin = (tY - tRange >= 0) ? -tRange : -(tY); int rYMax = (((tY + tRange) <= tMaxY) ? tRange : tMaxY - tY); @@ -783,12 +773,9 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B if (mAbsorber == null) return; if (mAbsorber.getBaseMetaTileEntity() == null) return; if (mAbsorber.getBaseMetaTileEntity() - .isInvalidTileEntity()) - return; + .isInvalidTileEntity()) return; if (mAbsorber.getBaseMetaTileEntity() - .getWorld() - == null) - return; + .getWorld() == null) return; scanLivingCrystals(); scanAvailableAspects(); if (mListener != null) { diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java index b81b0b956b..7e9fff95aa 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java @@ -16,7 +16,7 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe private int mEfficiency; public GT_MetaTileEntity_NaquadahReactor(int aID, String aName, String[] aDescription, String aNameRegional, - int aTier) { + int aTier) { super(aID, aName, aNameRegional, aTier, aDescription); if (aTier > 8 || aTier < 4) { new Exception("Tier without Recipe Map!").printStackTrace(); @@ -35,7 +35,7 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe @Override public boolean isOutputFacing(byte aSide) { return (aSide > 1) && (aSide != getBaseMetaTileEntity().getFrontFacing()) - && (aSide != getBaseMetaTileEntity().getBackFacing()); + && (aSide != getBaseMetaTileEntity().getBackFacing()); } @Override @@ -84,111 +84,108 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe } public int onConfigLoad() { - return mEfficiency = GregTech_API.sMachineFile.get( - ConfigCategories.machineconfig, - "SolidNaquadah.efficiency.tier." + mTier, - getBaseEff()); + return mEfficiency = GregTech_API.sMachineFile + .get(ConfigCategories.machineconfig, "SolidNaquadah.efficiency.tier." + mTier, getBaseEff()); } @Override public ITexture[] getFront(byte aColor) { return new ITexture[] { super.getFront(aColor)[0], - TextureFactory.of( - TextureFactory.of(NAQUADAH_REACTOR_SOLID_FRONT), - TextureFactory.builder() - .addIcon(NAQUADAH_REACTOR_SOLID_FRONT_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(NAQUADAH_REACTOR_SOLID_FRONT), + TextureFactory.builder() + .addIcon(NAQUADAH_REACTOR_SOLID_FRONT_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getBack(byte aColor) { return new ITexture[] { super.getBack(aColor)[0], - TextureFactory.of( - TextureFactory.of(NAQUADAH_REACTOR_SOLID_BACK), - TextureFactory.builder() - .addIcon(NAQUADAH_REACTOR_SOLID_BACK_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(NAQUADAH_REACTOR_SOLID_BACK), + TextureFactory.builder() + .addIcon(NAQUADAH_REACTOR_SOLID_BACK_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getBottom(byte aColor) { return new ITexture[] { super.getBottom(aColor)[0], - TextureFactory.of( - TextureFactory.of(NAQUADAH_REACTOR_SOLID_BOTTOM), - TextureFactory.builder() - .addIcon(NAQUADAH_REACTOR_SOLID_BOTTOM_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(NAQUADAH_REACTOR_SOLID_BOTTOM), + TextureFactory.builder() + .addIcon(NAQUADAH_REACTOR_SOLID_BOTTOM_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getTop(byte aColor) { return new ITexture[] { super.getTop(aColor)[0], - TextureFactory.of( - TextureFactory.of(NAQUADAH_REACTOR_SOLID_TOP), - TextureFactory.builder() - .addIcon(NAQUADAH_REACTOR_SOLID_TOP_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(NAQUADAH_REACTOR_SOLID_TOP), + TextureFactory.builder() + .addIcon(NAQUADAH_REACTOR_SOLID_TOP_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getSides(byte aColor) { return new ITexture[] { super.getSides(aColor)[0], - TextureFactory.of( - TextureFactory.of(NAQUADAH_REACTOR_SOLID_SIDE), - TextureFactory.builder() - .addIcon(NAQUADAH_REACTOR_SOLID_SIDE_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(NAQUADAH_REACTOR_SOLID_SIDE), + TextureFactory.builder() + .addIcon(NAQUADAH_REACTOR_SOLID_SIDE_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getFrontActive(byte aColor) { return new ITexture[] { super.getFrontActive(aColor)[0], TextureFactory.of(NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE), - TextureFactory.builder() - .addIcon(NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE_GLOW) - .glow() - .build() }; + TextureFactory.builder() + .addIcon(NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE_GLOW) + .glow() + .build() }; } @Override public ITexture[] getBackActive(byte aColor) { return new ITexture[] { super.getBackActive(aColor)[0], TextureFactory.of(NAQUADAH_REACTOR_SOLID_BACK_ACTIVE), - TextureFactory.builder() - .addIcon(NAQUADAH_REACTOR_SOLID_BACK_ACTIVE_