diff options
Diffstat (limited to 'src/main/java/gregtech/common/blocks')
29 files changed, 571 insertions, 650 deletions
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java index 5751ebc703..ea5c569ac7 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java @@ -33,9 +33,8 @@ public class GT_Block_Casings1 extends GT_Block_Casings_Abstract { GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "UHV Machine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Bronze Plated Bricks"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Heat Proof Machine Casing"); - GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + ".12.name", - "Dimensionally Transcendent Casing"); + GT_LanguageManager + .addStringLocalization(getUnlocalizedName() + ".12.name", "Dimensionally Transcendent Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Dimensional Injection Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Dimensional Bridge"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Superconducting Coil Block"); @@ -99,8 +98,7 @@ public class GT_Block_Casings1 extends GT_Block_Casings_Abstract { @Override public int colorMultiplier(IBlockAccess aWorld, int aX, int aY, int aZ) { return aWorld.getBlockMetadata(aX, aY, aZ) > 9 ? super.colorMultiplier(aWorld, aX, aY, aZ) - : gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[0] << 16 - | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[1] << 8 - | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[2]; + : gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[0] << 16 | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[1] << 8 + | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[2]; } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java index dfc5ff974b..14960eea10 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java @@ -20,12 +20,12 @@ public class GT_Block_Casings2 extends GT_Block_Casings_Abstract { super(GT_Item_Casings2.class, "gt.blockcasings2", GT_Material_Casings.INSTANCE, 96); // Special handler for Pyrolyse Oven Casing on hatches... Textures.BlockIcons.casingTexturePages[0][22] = TextureFactory.of( - Block.getBlockFromItem( - ItemList.Casing_ULV.get(1) - .getItem()), - 0, - ForgeDirection.UNKNOWN, - Dyes.MACHINE_METAL.mRGBa); + Block.getBlockFromItem( + ItemList.Casing_ULV.get(1) + .getItem()), + 0, + ForgeDirection.UNKNOWN, + Dyes.MACHINE_METAL.mRGBa); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Solid Steel Machine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Frost Proof Machine Casing"); @@ -91,8 +91,8 @@ public class GT_Block_Casings2 extends GT_Block_Casings_Abstract { @Override public float getExplosionResistance(Entity aTNT, World aWorld, int aX, int aY, int aZ, double eX, double eY, - double eZ) { + double eZ) { return aWorld.getBlockMetadata(aX, aY, aZ) == 8 ? Blocks.bedrock.getExplosionResistance(aTNT) - : super.getExplosionResistance(aTNT, aWorld, aX, aY, aZ, eX, eY, eZ); + : super.getExplosionResistance(aTNT, aWorld, aX, aY, aZ, eX, eY, eZ); } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java index 3985acf049..92bb58aead 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java @@ -67,11 +67,11 @@ public class GT_Block_Casings3 extends GT_Block_Casings_Abstract { case 11 -> Textures.BlockIcons.MACHINE_CASING_VENT.getIcon(); case 12 -> Textures.BlockIcons.MACHINE_CASING_RADIATIONPROOF.getIcon(); case 13 -> aSide > 1 ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_BRONZE.getIcon() - : Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS.getIcon(); + : Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS.getIcon(); case 14 -> aSide > 1 ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_STEEL.getIcon() - : Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + : Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); case 15 -> aSide > 1 ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_TUNGSTENSTEEL.getIcon() - : Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); + : Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); default -> Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); }; } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java index e95935ab78..5b1972b59e 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java @@ -25,29 +25,27 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { * original getIcon implementation to understand why it is 0, 1, etc, if that if ladder is even intelligible. */ private static final int[][] mapping = new int[][] { - { 7, 7, 7, 7, 0, 7, 0, 7, 1, 7, 1, 7, 8, 7, 8, 7, 0, 7, 0, 7, 0, 7, 0, 7, 9, 7, 9, 7, 3, 7, 3, 7, 1, 7, 1, - 7, 11, 7, 11, 7, 1, 7, 1, 7, 2, 7, 2, 7, 10, 7, 10, 7, 5, 7, 5, 7, 4, 7, 4, 7, 6, 7, 6, 7 }, - { 7, 7, 7, 7, 0, 0, 7, 7, 1, 1, 7, 7, 8, 8, 7, 7, 0, 0, 7, 7, 0, 0, 7, 7, 9, 9, 7, 7, 3, 3, 7, 7, 1, 1, 7, - 7, 11, 11, 7, 7, 1, 1, 7, 7, 2, 2, 7, 7, 10, 10, 7, 7, 5, 5, 7, 7, 4, 4, 7, 7, 6, 6, 7, 7 }, - { 7, 1, 1, 1, 0, 9, 10, 4, 7, 1, 1, 1, 0, 9, 10, 4, 0, 8, 11, 2, 0, 3, 5, 6, 0, 8, 11, 2, 0, 3, 5, 6, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 }, - { 7, 1, 1, 1, 0, 8, 11, 2, 7, 7, 7, 7, 7, 7, 7, 7, 0, 9, 10, 4, 0, 3, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 1, - 1, 0, 8, 11, 2, 7, 7, 7, 7, 7, 7, 7, 7, 0, 9, 10, 4, 0, 3, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7 }, - { 7, 1, 1, 1, 7, 1, 1, 1, 0, 8, 11, 2, 0, 8, 11, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 9, - 10, 4, 0, 9, 10, 4, 0, 3, 5, 6, 0, 3, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 }, - { 7, 1, 1, 1, 7, 7, 7, 7, 0, 9, 10, 4, 7, 7, 7, 7, 7, 1, 1, 1, 7, 7, 7, 7, 0, 9, 10, 4, 7, 7, 7, 7, 0, 8, - 11, 2, 7, 7, 7, 7, 0, 3, 5, 6, 7, 7, 7, 7, 0, 8, 11, 2, 7, 7, 7, 7, 0, 3, 5, 6, 7, 7, 7, 7 }, }; + { 7, 7, 7, 7, 0, 7, 0, 7, 1, 7, 1, 7, 8, 7, 8, 7, 0, 7, 0, 7, 0, 7, 0, 7, 9, 7, 9, 7, 3, 7, 3, 7, 1, 7, 1, 7, + 11, 7, 11, 7, 1, 7, 1, 7, 2, 7, 2, 7, 10, 7, 10, 7, 5, 7, 5, 7, 4, 7, 4, 7, 6, 7, 6, 7 }, + { 7, 7, 7, 7, 0, 0, 7, 7, 1, 1, 7, 7, 8, 8, 7, 7, 0, 0, 7, 7, 0, 0, 7, 7, 9, 9, 7, 7, 3, 3, 7, 7, 1, 1, 7, 7, + 11, 11, 7, 7, 1, 1, 7, 7, 2, 2, 7, 7, 10, 10, 7, 7, 5, 5, 7, 7, 4, 4, 7, 7, 6, 6, 7, 7 }, + { 7, 1, 1, 1, 0, 9, 10, 4, 7, 1, 1, 1, 0, 9, 10, 4, 0, 8, 11, 2, 0, 3, 5, 6, 0, 8, 11, 2, 0, 3, 5, 6, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 }, + { 7, 1, 1, 1, 0, 8, 11, 2, 7, 7, 7, 7, 7, 7, 7, 7, 0, 9, 10, 4, 0, 3, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 1, 1, + 0, 8, 11, 2, 7, 7, 7, 7, 7, 7, 7, 7, 0, 9, 10, 4, 0, 3, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7 }, + { 7, 1, 1, 1, 7, 1, 1, 1, 0, 8, 11, 2, 0, 8, 11, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 9, 10, 4, + 0, 9, 10, 4, 0, 3, 5, 6, 0, 3, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 }, + { 7, 1, 1, 1, 7, 7, 7, 7, 0, 9, 10, 4, 7, 7, 7, 7, 7, 1, 1, 1, 7, 7, 7, 7, 0, 9, 10, 4, 7, 7, 7, 7, 0, 8, 11, 2, + 7, 7, 7, 7, 0, 3, 5, 6, 7, 7, 7, 7, 0, 8, 11, 2, 7, 7, 7, 7, 0, 3, 5, 6, 7, 7, 7, 7 }, }; public static boolean mConnectedMachineTextures = true; public GT_Block_Casings4() { super(GT_Item_Casings4.class, "gt.blockcasings4", GT_Material_Casings.INSTANCE, 16); - GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + ".0.name", - "Robust Tungstensteel Machine Casing"); - GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + ".1.name", - "Clean Stainless Steel Machine Casing"); + GT_LanguageManager + .addStringLocalization(getUnlocalizedName() + ".0.name", "Robust Tungstensteel Machine Casing"); + GT_LanguageManager + .addStringLocalization(getUnlocalizedName() + ".1.name", "Clean Stainless Steel Machine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Stable Titanium Machine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Titanium Firebox Casing"); // GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Fusion Casing"); @@ -94,7 +92,7 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { case 1, 10 -> Textures.BlockIcons.MACHINE_CASING_CLEAN_STAINLESSSTEEL.getIcon(); case 2, 11 -> Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); case 3 -> aSide > 1 ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_TITANIUM.getIcon() - : Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); + : Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); case 4 -> // Do not overwrite! Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW.getIcon(); @@ -116,13 +114,13 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { public IIcon getTurbineCasing(int meta, int iconIndex, boolean active) { return switch (meta) { case 10 -> active ? Textures.BlockIcons.TURBINE_ACTIVE1[iconIndex].getIcon() - : Textures.BlockIcons.TURBINE1[iconIndex].getIcon(); + : Textures.BlockIcons.TURBINE1[iconIndex].getIcon(); case 11 -> active ? Textures.BlockIcons.TURBINE_ACTIVE2[iconIndex].getIcon() - : Textures.BlockIcons.TURBINE2[iconIndex].getIcon(); + : Textures.BlockIcons.TURBINE2[iconIndex].getIcon(); case 12 -> active ? Textures.BlockIcons.TURBINE_ACTIVE3[iconIndex].getIcon() - : Textures.BlockIcons.TURBINE3[iconIndex].getIcon(); + : Textures.BlockIcons.TURBINE3[iconIndex].getIcon(); default -> active ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() - : Textures.BlockIcons.TURBINE[iconIndex].getIcon(); + : Textures.BlockIcons.TURBINE[iconIndex].getIcon(); }; } @@ -130,17 +128,17 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { public IIcon getTurbineCasing(int meta, int iconIndex, boolean active, boolean hasTurbine) { return switch (meta) { case 10 -> active ? Textures.BlockIcons.TURBINE_ACTIVE1[iconIndex].getIcon() - : hasTurbine ? Textures.BlockIcons.TURBINE1[iconIndex].getIcon() - : Textures.BlockIcons.TURBINE_EMPTY1[iconIndex].getIcon(); + : hasTurbine ? Textures.BlockIcons.TURBINE1[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE_EMPTY1[iconIndex].getIcon(); case 11 -> active ? Textures.BlockIcons.TURBINE_ACTIVE2[iconIndex].getIcon() - : hasTurbine ? Textures.BlockIcons.TURBINE2[iconIndex].getIcon() - : Textures.BlockIcons.TURBINE_EMPTY2[iconIndex].getIcon(); + : hasTurbine ? Textures.BlockIcons.TURBINE2[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE_EMPTY2[iconIndex].getIcon(); case 12 -> active ? Textures.BlockIcons.TURBINE_ACTIVE3[iconIndex].getIcon() - : hasTurbine ? Textures.BlockIcons.TURBINE3[iconIndex].getIcon() - : Textures.BlockIcons.TURBINE_EMPTY3[iconIndex].getIcon(); + : hasTurbine ? Textures.BlockIcons.TURBINE3[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE_EMPTY3[iconIndex].getIcon(); default -> active ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() - : hasTurbine ? Textures.BlockIcons.TURBINE[iconIndex].getIcon() - : Textures.BlockIcons.TURBINE_EMPTY[iconIndex].getIcon(); + : hasTurbine ? Textures.BlockIcons.TURBINE[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE_EMPTY[iconIndex].getIcon(); }; } @@ -148,7 +146,7 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (!(tTileEntity instanceof IGregTechTileEntity tTile)) return 0; if (tTile.getMetaTileEntity() instanceof GT_MetaTileEntity_LargeTurbine turbine - && tTile.getFrontFacing() == aSide) { + && tTile.getFrontFacing() == aSide) { if (turbine.isNewStyleRendering()) return 0; if (tTile.isActive()) return 1; return turbine.hasTurbine() ? 2 : 3; @@ -162,7 +160,7 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { aWorld = GT_RenderingWorld.getInstance(aWorld); int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); if (tMeta != 6 && tMeta != 8 && tMeta != 9 && tMeta != 10 && tMeta != 11 && tMeta != 12 - || !mConnectedMachineTextures) { + || !mConnectedMachineTextures) { return getIcon(aSide, tMeta); } if (tMeta > 8 && tMeta < 13) { @@ -174,7 +172,7 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { if (i == 0 && j == 0) continue; int tState; if ((tState = isTurbineControllerWithSide(aWorld, xCoord + j, yCoord, zCoord + i, aSide)) - != 0) { + != 0) { return getTurbineCasing(tMeta, 4 - i * 3 - j, tState == 1, tState == 2); } } @@ -186,12 +184,12 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { if (i == 0 && j == 0) continue; int tState; if ((tState = isTurbineControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, aSide)) - != 0) { + != 0) { return getTurbineCasing( - tMeta, - 4 + i * 3 - j * tInvertLeftRightMod, - tState == 1, - tState == 2); + tMeta, + 4 + i * 3 - j * tInvertLeftRightMod, + tState == 1, + tState == 2); } } } @@ -202,12 +200,12 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { if (i == 0 && j == 0) continue; int tState; if ((tState = isTurbineControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, aSide)) - != 0) { + != 0) { return getTurbineCasing( - tMeta, - 4 + i * 3 + j * tInvertLeftRightMod, - tState == 1, - tState == 2); + tMeta, + 4 + i * 3 + j * tInvertLeftRightMod, + tState == 1, + tState == 2); } } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java index 92ba33a4b9..cde7a8b5fa 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java @@ -84,7 +84,7 @@ public class GT_Block_Casings6 extends GT_Block_Casings_Abstract { @Override public int colorMultiplier(IBlockAccess aWorld, int aX, int aY, int aZ) { return gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[0] << 16 - | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[1] << 8 - | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[2]; + | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[1] << 8 + | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[2]; } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java index 6e6313c05c..b4778ec12e 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java @@ -31,26 +31,23 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Mining Black Plutonium Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Extreme Engine Intake Casing"); GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + ".5.name", - "Europium Reinforced Radiation Proof Machine Casing"); + getUnlocalizedName() + ".5.name", + "Europium Reinforced Radiation Proof Machine Casing"); GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + ".6.name", - "Advanced Rhodium Plated Palladium Machine Casing"); - GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + ".7.name", - "Advanced Iridium Plated Machine Casing"); + getUnlocalizedName() + ".6.name", + "Advanced Rhodium Plated Palladium Machine Casing"); + GT_LanguageManager + .addStringLocalization(getUnlocalizedName() + ".7.name", "Advanced Iridium Plated Machine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Magical Machine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "HSS-S Turbine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Radiant Naquadah Alloy Casing"); + GT_LanguageManager + .addStringLocalization(getUnlocalizedName() + ".11.name", "Basic Photolithographic Framework Casing"); + GT_LanguageManager + .addStringLocalization(getUnlocalizedName() + ".12.name", "Reinforced Photolithographic Framework Casing"); GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + ".11.name", - "Basic Photolithographic Framework Casing"); - GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + ".12.name", - "Reinforced Photolithographic Framework Casing"); - GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + ".13.name", - "Radiation Proof Photolithographic Framework Casing"); + getUnlocalizedName() + ".13.name", + "Radiation Proof Photolithographic Framework Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Infinity Cooled Casing"); ItemList.Casing_Chemically_Inert.set(new ItemStack(this, 1, 0)); @@ -103,20 +100,20 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { public IIcon getTurbineCasing(int meta, int iconIndex, boolean active) { return switch (meta) { case 9 -> active ? Textures.BlockIcons.TURBINE_ADVGASACTIVE[iconIndex].getIcon() - : Textures.BlockIcons.TURBINEADVGAS[iconIndex].getIcon(); + : Textures.BlockIcons.TURBINEADVGAS[iconIndex].getIcon(); default -> active ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() - : Textures.BlockIcons.TURBINE[iconIndex].getIcon(); + : Textures.BlockIcons.TURBINE[iconIndex].getIcon(); }; } public IIcon getTurbineCasing(int meta, int iconIndex, boolean active, boolean hasTurbine) { return switch (meta) { case 9 -> active ? Textures.BlockIcons.TURBINE_ADVGASACTIVE[iconIndex].getIcon() - : hasTurbine ? Textures.BlockIcons.TURBINEADVGAS[iconIndex].getIcon() - : Textures.BlockIcons.TURBINE_ADVGASEMPTY[iconIndex].getIcon(); + : hasTurbine ? Textures.BlockIcons.TURBINEADVGAS[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE_ADVGASEMPTY[iconIndex].getIcon(); default -> active ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() - : hasTurbine ? Textures.BlockIcons.TURBINE[iconIndex].getIcon() - : Textures.BlockIcons.TURBINE_EMPTY[iconIndex].getIcon(); + : hasTurbine ? Textures.BlockIcons.TURBINE[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE_EMPTY[iconIndex].getIcon(); }; } @@ -124,7 +121,7 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (!(tTileEntity instanceof IGregTechTileEntity tTile)) return 0; if (tTile.getMetaTileEntity() instanceof GT_MetaTileEntity_LargeTurbine turbine - && tTile.getFrontFacing() == aSide) { + && tTile.getFrontFacing() == aSide) { if (turbine.isNewStyleRendering()) return 0; if (tTile.isActive()) return 1; return turbine.hasTurbine() ? 2 : 3; @@ -149,7 +146,7 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { if (i == 0 && j == 0) continue; int tState; if ((tState = isTurbineControllerWithSide(aWorld, xCoord + j, yCoord, zCoord + i, aSide)) - != 0) { + != 0) { return getTurbineCasing(tMeta, 4 - i * 3 - j, tState == 1, tState == 2); } } @@ -161,12 +158,12 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { if (i == 0 && j == 0) continue; int tState; if ((tState = isTurbineControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, aSide)) - != 0) { + != 0) { return getTurbineCasing( - tMeta, - 4 + i * 3 - j * tInvertLeftRightMod, - tState == 1, - tState == 2); + tMeta, + 4 + i * 3 - j * tInvertLeftRightMod, + tState == 1, + tState == 2); } } } @@ -177,12 +174,12 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { if (i == 0 && j == 0) continue; int tState; if ((tState = isTurbineControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, aSide)) - != 0) { + != 0) { return getTurbineCasing( - tMeta, - 4 + i * 3 + j * tInvertLeftRightMod, - tState == 1, - tState == 2); + tMeta, + 4 + i * 3 + j * tInvertLeftRightMod, + tState == 1, + tState == 2); } } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings9.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings9.java index 79a026af44..0aa9ca916f 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings9.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings9.java @@ -15,9 +15,8 @@ public class GT_Block_Casings9 extends GT_Block_Casings_Abstract { super(GT_Item_Casings9.class, "gt.blockcasings9", GT_Material_Casings.INSTANCE, 2); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "PBI Pipe Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Advanced Filter Casing"); - GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + ".1.tooltip", - "Less than five 0.1μm particles per m^3"); + GT_LanguageManager + .addStringLocalization(getUnlocalizedName() + ".1.tooltip", "Less than five 0.1μm particles per m^3"); ItemList.Casing_Pipe_Polybenzimidazole.set(new ItemStack(this, 1, 0)); ItemList.Casing_Vent_T2.set(new ItemStack(this, 1, 1)); diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings_Abstract.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings_Abstract.java index a7dd8a1fd1..cef97ecb95 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings_Abstract.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings_Abstract.java @@ -25,7 +25,7 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_LanguageManager; public abstract class GT_Block_Casings_Abstract extends GT_Generic_Block - implements gregtech.api.interfaces.IHasIndexedTexture { + implements gregtech.api.interfaces.IHasIndexedTexture { public GT_Block_Casings_Abstract(Class<? extends ItemBlock> aItemClass, String aName, Material aMaterial) { super(aItemClass, aName, aMaterial); @@ -36,7 +36,7 @@ public abstract class GT_Block_Casings_Abstract extends GT_Generic_Block } public GT_Block_Casings_Abstract(Class<? extends ItemBlock> aItemClass, String aName, Material aMaterial, - int aMaxMeta) { + int aMaxMeta) { this(aItemClass, aName, aMaterial); for (int i = 0; i < aMaxMeta; i++) { Textures.BlockIcons.setCasingTextureForId(getTextureIndex(i), TextureFactory.of(this, i)); @@ -127,8 +127,7 @@ public abstract class GT_Block_Casings_Abstract extends GT_Generic_Block for (int i = 0; i < 16; i++) { ItemStack aStack = new ItemStack(aItem, 1, i); if (!aStack.getDisplayName() - .contains(".name")) - aList.add(aStack); + .contains(".name")) aList.add(aStack); } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java b/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java index 0207ab975a..ae3588cfa3 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java @@ -73,8 +73,8 @@ public class GT_Block_Concretes extends GT_Block_Stones_Abstract implements IBlo @Override public void onWalkOver(EntityLivingBase aEntity, World aWorld, int aX, int aY, int aZ) { if ((aEntity.motionX != 0 || aEntity.motionZ != 0) && !aEntity.isInWater() - && !aEntity.isWet() - && !aEntity.isSneaking()) { + && !aEntity.isWet() + && !aEntity.isSneaking()) { double tSpeed = (aWorld.getBlock(aX, aY - 1, aZ).slipperiness >= 0.8 ? 1.5 : 1.2); aEntity.motionX *= tSpeed; aEntity.motionZ *= tSpeed; diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java index eb8adf7872..e0215e77eb 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java @@ -231,18 +231,12 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo @SuppressWarnings("unchecked") // Old API uses raw List type @Override public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, - List<AxisAlignedBB> outputAABB, Entity collider) { + List<AxisAlignedBB> outputAABB, Entity collider) { final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity instanceof IGregTechTileEntity - && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { - ((IGregTechTileEntity) tTileEntity).addCollisionBoxesToList( - aWorld, - aX, - aY, - aZ, - inputAABB, - outputAABB, - collider); + && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { + ((IGregTechTileEntity) tTileEntity) + .addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider); return; } super.addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider); @@ -252,7 +246,7 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity instanceof IGregTechTileEntity - && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { + && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { return ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); } return super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); @@ -263,7 +257,7 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo public AxisAlignedBB getSelectedBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity instanceof IGregTechTileEntity - && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { + && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { return ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); } return super.getSelectedBoundingBoxFromPool(aWorld, aX, aY, aZ); @@ -273,12 +267,9 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo public void setBlockBoundsBasedOnState(IBlockAccess blockAccess, int aX, int aY, int aZ) { final TileEntity tTileEntity = blockAccess.getTileEntity(aX, aY, aZ); if (tTileEntity instanceof IGregTechTileEntity - && (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null)) { - final AxisAlignedBB bbb = ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool( - ((IGregTechTileEntity) tTileEntity).getWorld(), - 0, - 0, - 0); + && (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null)) { + final AxisAlignedBB bbb = ((IGregTechTileEntity) tTileEntity) + .getCollisionBoundingBoxFromPool(((IGregTechTileEntity) tTileEntity).getWorld(), 0, 0, 0); minX = bbb.minX; // This essentially sets block bounds minY = bbb.minY; minZ = bbb.minZ; @@ -299,7 +290,7 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity collider) { final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity instanceof IGregTechTileEntity - && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { + && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { ((IGregTechTileEntity) tTileEntity).onEntityCollidedWithBlock(aWorld, aX, aY, aZ, collider); return; } @@ -348,13 +339,13 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo public float getPlayerRelativeBlockHardness(EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) { final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); return tTileEntity instanceof BaseMetaTileEntity && ((BaseMetaTileEntity) tTileEntity).privateAccess() - && !((BaseMetaTileEntity) tTileEntity).playerOwnsThis(aPlayer, true) ? -1.0F - : super.getPlayerRelativeBlockHardness(aPlayer, aWorld, aX, aY, aZ); + && !((BaseMetaTileEntity) tTileEntity).playerOwnsThis(aPlayer, true) ? -1.0F + : super.getPlayerRelativeBlockHardness(aPlayer, aWorld, aX, aY, aZ); } @Override public boolean onBlockActivated(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer, int aSide, - float aOffsetX, float aOffsetY, float aOffsetZ) { + float aOffsetX, float aOffsetY, float aOffsetZ) { final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity == null) { return false; @@ -362,10 +353,9 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo if (aPlayer.isSneaking()) { final ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem(); if (tCurrentItem != null && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sScrewdriverList) - && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWrenchList) - && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWireCutterList) - && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSolderingToolList)) - return false; + && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWrenchList) + && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWireCutterList) + && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSolderingToolList)) return false; } if ((tTileEntity instanceof IGregTechTileEntity)) { if (((IGregTechTileEntity) tTileEntity).getTimer() < 50L) { @@ -374,12 +364,8 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo if ((!aWorld.isRemote) && !((IGregTechTileEntity) tTileEntity).isUseableByPlayer(aPlayer)) { return true; } - return ((IGregTechTileEntity) tTileEntity).onRightclick( - aPlayer, - (byte) aSide, - aOffsetX, - aOffsetY, - aOffsetZ); + return ((IGregTechTileEntity) tTileEntity) + .onRightclick(aPlayer, (byte) aSide, aOffsetX, aOffsetY, aOffsetZ); } return false; } @@ -406,11 +392,11 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity instanceof BaseMetaTileEntity) { GT_Log.exp.printf( - "Explosion at : %d | %d | %d DIMID: %s due to near explosion!%n", - aX, - aY, - aZ, - aWorld.provider.dimensionId); + "Explosion at : %d | %d | %d DIMID: %s due to near explosion!%n", + aX, + aY, + aZ, + aWorld.provider.dimensionId); ((BaseMetaTileEntity) tTileEntity).doEnergyExplosion(); } super.onBlockExploded(aWorld, aX, aY, aZ, aExplosion); @@ -427,19 +413,19 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo for (int i = 0; i < tGregTechTileEntity.getSizeInventory(); i++) { final ItemStack tItem = tGregTechTileEntity.getStackInSlot(i); if ((tItem != null) && (tItem.stackSize > 0) - && (tGregTechTileEntity.isValidSlot(i)) - && tGregTechTileEntity.shouldDropItemAt(i)) { + && (tGregTechTileEntity.isValidSlot(i)) + && tGregTechTileEntity.shouldDropItemAt(i)) { final EntityItem tItemEntity = new EntityItem( - aWorld, - aX + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, - aY + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, - aZ + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, - new ItemStack(tItem.getItem(), tItem.stackSize, tItem.getItemDamage())); + aWorld, + aX + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, + aY + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, + aZ + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, + new ItemStack(tItem.getItem(), tItem.stackSize, tItem.getItemDamage())); if (tItem.hasTagCompound()) { tItemEntity.getEntityItem() - .setTagCompound( - (NBTTagCompound) tItem.getTagCompound() - .copy()); + .setTagCompound( + (NBTTagCompound) tItem.getTagCompound() + .copy()); } tItemEntity.motionX = (XSTR_INSTANCE.nextGaussian() * 0.05D); tItemEntity.motionY = (XSTR_INSTANCE.nextGaussian() * 0.25D); @@ -519,17 +505,17 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo @Override public void dropBlockAsItemWithChance(World aWorld, int aX, int aY, int aZ, int aMetadata, float chance, - int aFortune) { + int aFortune) { if (!aWorld.isRemote) { final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity != null && (chance < 1.0F)) { if (tTileEntity instanceof BaseMetaTileEntity && (GregTech_API.sMachineNonWrenchExplosions)) { GT_Log.exp.printf( - "Explosion at : %d | %d | %d DIMID: %s NonWrench picking/Rain!%n", - aX, - aY, - aZ, - aWorld.provider.dimensionId); + "Explosion at : %d | %d | %d DIMID: %s NonWrench picking/Rain!%n", + aX, + aY, + aZ, + aWorld.provider.dimensionId); ((BaseMetaTileEntity) tTileEntity).doEnergyExplosion(); } } else { @@ -549,11 +535,11 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo return true; } if (tTileEntity instanceof BaseMetaPipeEntity - && (((BaseMetaPipeEntity) tTileEntity).mConnections & 0xFFFFFFC0) != 0) { + && (((BaseMetaPipeEntity) tTileEntity).mConnections & 0xFFFFFFC0) != 0) { return true; } return tTileEntity instanceof ICoverable - && ((ICoverable) tTileEntity).getCoverIDAtSide((byte) aSide.ordinal()) != 0; + && ((ICoverable) tTileEntity).getCoverIDAtSide((byte) aSide.ordinal()) != 0; } return false; } @@ -609,7 +595,7 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo @Override public float getExplosionResistance(Entity entity, World aWorld, int aX, int aY, int aZ, double explosionX, - double explosionY, double explosionZ) { + double explosionY, double explosionZ) { final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity instanceof IGregTechTileEntity) { return ((IGregTechTileEntity) tTileEntity).getBlastResistance((byte) 6); @@ -633,7 +619,7 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (!(tTileEntity instanceof IGregTechTileEntity iGregTechTileEntity)) return; iGregTechTileEntity.setFrontFacing( - BaseTileEntity.getSideForPlayerPlacing(aPlayer, SIDE_UP, iGregTechTileEntity.getValidFacings())); + BaseTileEntity.getSideForPlayerPlacing(aPlayer, SIDE_UP, iGregTechTileEntity.getValidFacings())); } @Override @@ -665,14 +651,14 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo final byte aSide = (byte) side; if (side != -1) { final Block facadeBlock = tile.getCoverInfoAtSide(aSide) - .getFacadeBlock(); + .getFacadeBlock(); if (facadeBlock != null) return facadeBlock; } else { // we do not allow more than one type of facade per block, so no need to check every side // see comment in gregtech.common.covers.GT_Cover_FacadeBase.isCoverPlaceable for (byte tSide : ALL_VALID_SIDES) { final Block facadeBlock = tile.getCoverInfoAtSide(tSide) - .getFacadeBlock(); + .getFacadeBlock(); if (facadeBlock != null) { return facadeBlock; } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Metal.java b/src/main/java/gregtech/common/blocks/GT_Block_Metal.java index 00b12eb804..b8aa8b0e00 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Metal.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Metal.java @@ -33,8 +33,8 @@ public class GT_Block_Metal extends GT_Block_Storage { for (int i = 0; i < aMats.length; i++) { if (aMats[i].mMetaItemSubID > 0 && aMats[i].mHasParentMod) { GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + "." + i + ".name", - "Block of " + (GT_LanguageManager.i18nPlaceholder ? "%material" : aMats[i].mDefaultLocalName)); + getUnlocalizedName() + "." + i + ".name", + "Block of " + (GT_LanguageManager.i18nPlaceholder ? "%material" : aMats[i].mDefaultLocalName)); GT_OreDictUnificator.registerOre(aPrefix, aMats[i], new ItemStack(this, 1, i)); } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores.java index db239341a3..11768763a8 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores.java @@ -41,8 +41,8 @@ public class GT_Block_Ores extends GT_Block_Ores_Abstract { public OrePrefixes[] getProcessingPrefix() { // Must have 8 entries; an entry can be null to disable automatic // recipes. return new OrePrefixes[] { OrePrefixes.ore, OrePrefixes.oreNetherrack, OrePrefixes.oreEndstone, - OrePrefixes.oreBlackgranite, OrePrefixes.oreRedgranite, OrePrefixes.oreMarble, OrePrefixes.oreBasalt, - null }; + OrePrefixes.oreBlackgranite, OrePrefixes.oreRedgranite, OrePrefixes.oreMarble, OrePrefixes.oreBasalt, + null }; } @Override @@ -92,14 +92,14 @@ public class GT_Block_Ores extends GT_Block_Ores_Abstract { @Override public Materials[] getDroppedDusts() { // Must have 8 entries; can be null. return new Materials[] { Materials.Stone, Materials.Netherrack, Materials.Endstone, Materials.GraniteBlack, - Materials.GraniteRed, Materials.Marble, Materials.Basalt, Materials.Stone }; + Materials.GraniteRed, Materials.Marble, Materials.Basalt, Materials.Stone }; } @Override public boolean[] getEnabledMetas() { return new boolean[] { true, true, true, GT_Mod.gregtechproxy.enableBlackGraniteOres, - GT_Mod.gregtechproxy.enableRedGraniteOres, GT_Mod.gregtechproxy.enableMarbleOres, - GT_Mod.gregtechproxy.enableBasaltOres, true }; + GT_Mod.gregtechproxy.enableRedGraniteOres, GT_Mod.gregtechproxy.enableMarbleOres, + GT_Mod.gregtechproxy.enableBasaltOres, true }; } @Override @@ -109,21 +109,21 @@ public class GT_Block_Ores extends GT_Block_Ores_Abstract { rTextures[1] = TextureFactory.of(Blocks.netherrack); rTextures[2] = TextureFactory.of(Blocks.end_stone); rTextures[3] = TextureFactory.builder() - .addIcon(GRANITE_BLACK_STONE) - .stdOrient() - .build(); + .addIcon(GRANITE_BLACK_STONE) + .stdOrient() + .build(); rTextures[4] = TextureFactory.builder() - .addIcon(GRANITE_RED_STONE) - .stdOrient() - .build(); + .addIcon(GRANITE_RED_STONE) + .stdOrient() + .build(); rTextures[5] = TextureFactory.builder() - .addIcon(MARBLE_STONE) - .stdOrient() - .build(); + .addIcon(MARBLE_STONE) + .stdOrient() + .build(); rTextures[6] = TextureFactory.builder() - .addIcon(BASALT_STONE) - .stdOrient() - .build(); + .addIcon(BASALT_STONE) + .stdOrient() + .build(); return rTextures; } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java index 64f6b2e8ae..10fb15a77c 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java @@ -50,7 +50,7 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements public static Set<Materials> aBlockedOres = new HashSet<>(); protected GT_Block_Ores_Abstract(String aUnlocalizedName, int aOreMetaCount, boolean aHideFirstMeta, - Material aMaterial) { + Material aMaterial) { super(GT_Item_Ores.class, aUnlocalizedName, aMaterial); this.isBlockContainer = true; setStepSound(soundTypeStone); @@ -66,28 +66,27 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements for (int j = 0; j < aOreMetaCount; j++) { if (!this.getEnabledMetas()[j]) continue; GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + "." + (i + (j * 1000)) + DOT_NAME, - GT_LanguageManager.i18nPlaceholder - ? getLocalizedNameFormat(GregTech_API.sGeneratedMaterials[i]) - : getLocalizedName(GregTech_API.sGeneratedMaterials[i])); + getUnlocalizedName() + "." + (i + (j * 1000)) + DOT_NAME, + GT_LanguageManager.i18nPlaceholder ? getLocalizedNameFormat(GregTech_API.sGeneratedMaterials[i]) + : getLocalizedName(GregTech_API.sGeneratedMaterials[i])); GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + "." + (i + (j * 1000)) + DOT_TOOLTIP, - GregTech_API.sGeneratedMaterials[i].getToolTip()); + getUnlocalizedName() + "." + (i + (j * 1000)) + DOT_TOOLTIP, + GregTech_API.sGeneratedMaterials[i].getToolTip()); GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + "." + ((i + 16000) + (j * 1000)) + DOT_NAME, - "Small " + (GT_LanguageManager.i18nPlaceholder - ? getLocalizedNameFormat(GregTech_API.sGeneratedMaterials[i]) - : getLocalizedName(GregTech_API.sGeneratedMaterials[i]))); + getUnlocalizedName() + "." + ((i + 16000) + (j * 1000)) + DOT_NAME, + "Small " + (GT_LanguageManager.i18nPlaceholder + ? getLocalizedNameFormat(GregTech_API.sGeneratedMaterials[i]) + : getLocalizedName(GregTech_API.sGeneratedMaterials[i]))); GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + "." + ((i + 16000) + (j * 1000)) + DOT_TOOLTIP, - GregTech_API.sGeneratedMaterials[i].getToolTip()); + getUnlocalizedName() + "." + ((i + 16000) + (j * 1000)) + DOT_TOOLTIP, + GregTech_API.sGeneratedMaterials[i].getToolTip()); if ((GregTech_API.sGeneratedMaterials[i].mTypes & 0x8) != 0 - && !aBlockedOres.contains(GregTech_API.sGeneratedMaterials[i])) { + && !aBlockedOres.contains(GregTech_API.sGeneratedMaterials[i])) { GT_OreDictUnificator.registerOre( - this.getProcessingPrefix()[j] != null - ? this.getProcessingPrefix()[j].get(GregTech_API.sGeneratedMaterials[i]) - : "", - new ItemStack(this, 1, i + (j * 1000))); + this.getProcessingPrefix()[j] != null + ? this.getProcessingPrefix()[j].get(GregTech_API.sGeneratedMaterials[i]) + : "", + new ItemStack(this, 1, i + (j * 1000))); if (tHideOres) { if (!(j == 0 && !aHideFirstMeta)) { codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + (j * 1000))); @@ -142,7 +141,7 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements @Override public boolean onBlockActivated(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer, int aSide, - float aOffsetX, float aOffsetY, float aOffsetZ) { + float aOffsetX, float aOffsetY, float aOffsetZ) { if (!aPlayer.isSneaking() || !aPlayer.capabilities.isCreativeMode) { return false; } @@ -159,7 +158,7 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements @Override public boolean onBlockEventReceived(World p_149696_1_, int p_149696_2_, int p_149696_3_, int p_149696_4_, - int p_149696_5_, int p_149696_6_) { + int p_149696_5_, int p_149696_6_) { super.onBlockEventReceived(p_149696_1_, p_149696_2_, p_149696_3_, p_149696_4_, p_149696_5_, p_149696_6_); TileEntity tileentity = p_149696_1_.getTileEntity(p_149696_2_, p_149696_3_, p_149696_4_); return tileentity != null && tileentity.receiveClientEvent(p_149696_5_, p_149696_6_); @@ -187,7 +186,7 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements @Override public float getExplosionResistance(Entity entity, World aWorld, int aX, int aY, int aZ, double explosionX, - double explosionY, double explosionZ) { + double explosionY, double explosionZ) { return 1.0F + getHarvestLevel(aWorld.getBlockMetadata(aX, aY, aZ)) * 1.0F; } @@ -251,14 +250,8 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements @Override @SideOnly(Side.CLIENT) public boolean addHitEffects(World worldObj, MovingObjectPosition target, EffectRenderer effectRenderer) { - GT_Renderer_Block.addHitEffects( - effectRenderer, - this, - worldObj, - target.blockX, - target.blockY, - target.blockZ, - target.sideHit); + GT_Renderer_Block + .addHitEffects(effectRenderer, this, worldObj, target.blockX, target.blockY, target.blockZ, target.sideHit); return true; } @@ -304,8 +297,8 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements return ((GT_TileEntity_Ores) tTileEntity).getDrops(getDroppedBlock(), aFortune); } return mTemporaryTileEntity.get() == null ? new ArrayList<>() - : mTemporaryTileEntity.get() - .getDrops(getDroppedBlock(), aFortune); + : mTemporaryTileEntity.get() + .getDrops(getDroppedBlock(), aFortune); } @Override @@ -324,8 +317,7 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements if ((tMaterial != null) && ((tMaterial.mTypes & 0x8) != 0) && !aBlockedOres.contains(tMaterial)) { for (int meta = i; meta < 23000 + i; meta += 1000) { if (!(new ItemStack(aItem, 1, meta).getDisplayName() - .contains(DOT_NAME))) - aList.add(new ItemStack(aItem, 1, meta)); + .contains(DOT_NAME))) aList.add(new ItemStack(aItem, 1, meta)); } } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB1.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB1.java index 2a27ee0cf9..cacf903c81 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB1.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB1.java @@ -31,7 +31,7 @@ public class GT_Block_Ores_UB1 extends GT_Block_Ores_Abstract { @Override public OrePrefixes[] getProcessingPrefix() { // Must have 8 entries. return new OrePrefixes[] { OrePrefixes.oreRedgranite, OrePrefixes.oreBlackgranite, OrePrefixes.ore, - OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.oreBasalt, OrePrefixes.ore, OrePrefixes.ore }; + OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.oreBasalt, OrePrefixes.ore, OrePrefixes.ore }; } @Override @@ -52,7 +52,7 @@ public class GT_Block_Ores_UB1 extends GT_Block_Ores_Abstract { @Override public Materials[] getDroppedDusts() { // Must have 8 entries; can be null. return new Materials[] { Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, - Materials.Stone, Materials.Stone, Materials.Stone }; + Materials.Stone, Materials.Stone, Materials.Stone }; } @Override @@ -63,10 +63,10 @@ public class GT_Block_Ores_UB1 extends GT_Block_Ores_Abstract { @Override public ITexture[] getTextureSet() { // Must have 16 entries. return new ITexture[] { TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), - TextureFactory.of(aUBBlock, 2), TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), - TextureFactory.of(aUBBlock, 5), TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7), - TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), TextureFactory.of(aUBBlock, 2), - TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), TextureFactory.of(aUBBlock, 5), - TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7) }; + TextureFactory.of(aUBBlock, 2), TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), + TextureFactory.of(aUBBlock, 5), TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7), + TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), TextureFactory.of(aUBBlock, 2), + TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), TextureFactory.of(aUBBlock, 5), + TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7) }; } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB2.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB2.java index d7f08f2466..db8dc4347c 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB2.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB2.java @@ -32,7 +32,7 @@ public class GT_Block_Ores_UB2 extends GT_Block_Ores_Abstract { public OrePrefixes[] getProcessingPrefix() { // Must have 8 entries; an entry can be null to disable automatic // recipes. return new OrePrefixes[] { OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.oreMarble, OrePrefixes.ore, - OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore }; + OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore }; } @Override @@ -53,7 +53,7 @@ public class GT_Block_Ores_UB2 extends GT_Block_Ores_Abstract { @Override public Materials[] getDroppedDusts() { // Must have 8 entries; can be null. return new Materials[] { Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, - Materials.Stone, Materials.Stone, Materials.Stone }; + Materials.Stone, Materials.Stone, Materials.Stone }; } @Override @@ -64,10 +64,10 @@ public class GT_Block_Ores_UB2 extends GT_Block_Ores_Abstract { @Override public ITexture[] getTextureSet() { // Must have 16 entries. return new ITexture[] { TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), - TextureFactory.of(aUBBlock, 2), TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), - TextureFactory.of(aUBBlock, 5), TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7), - TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), TextureFactory.of(aUBBlock, 2), - TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), TextureFactory.of(aUBBlock, 5), - TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7) }; + TextureFactory.of(aUBBlock, 2), TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), + TextureFactory.of(aUBBlock, 5), TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7), + TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), TextureFactory.of(aUBBlock, 2), + TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), TextureFactory.of(aUBBlock, 5), + TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7) }; } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java index 7315d81890..1c8f433adf 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java @@ -32,7 +32,7 @@ public class GT_Block_Ores_UB3 extends GT_Block_Ores_Abstract { public OrePrefixes[] getProcessingPrefix() { // Must have 8 entries; an entry can be null to disable automatic // recipes. return new OrePrefixes[] { OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, - OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore }; + OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore }; } @Override @@ -53,7 +53,7 @@ public class GT_Block_Ores_UB3 extends GT_Block_Ores_Abstract { @Override public Materials[] getDroppedDusts() { // Must have 8 entries; can be null. return new Materials[] { Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, - Materials.Stone, Materials.Stone, Materials.Stone }; + Materials.Stone, Materials.Stone, Materials.Stone }; } @Override @@ -64,10 +64,10 @@ public class GT_Block_Ores_UB3 extends GT_Block_Ores_Abstract { @Override public ITexture[] getTextureSet() { // Must have 16 entries. return new ITexture[] { TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), - TextureFactory.of(aUBBlock, 2), TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), - TextureFactory.of(aUBBlock, 5), TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7), - TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), TextureFactory.of(aUBBlock, 2), - TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), TextureFactory.of(aUBBlock, 5), - TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7) }; + TextureFactory.of(aUBBlock, 2), TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), + TextureFactory.of(aUBBlock, 5), TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7), + TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), TextureFactory.of(aUBBlock, 2), + TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), TextureFactory.of(aUBBlock, 5), + TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7) }; } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java index 93a10dc45b..23e55839bf 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java @@ -55,91 +55,91 @@ public class GT_Block_Reinforced extends GT_Generic_Block { GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Neutronium Reinforced Block"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Raw Deep Dark Portal Block"); ItemList.Block_BronzePlate.set( - new ItemStack( - this.setHardness(60.0f) - .setResistance(150.0f), - 1, - 0)); + new ItemStack( + this.setHardness(60.0f) + .setResistance(150.0f), + 1, + 0)); ItemList.Block_IridiumTungstensteel.set( - new ItemStack( - this.setHardness(400.0f) - .setResistance(600.0f), - 1, - 1)); + new ItemStack( + this.setHardness(400.0f) + .setResistance(600.0f), + 1, + 1)); ItemList.Block_Plascrete.set( - new ItemStack( - this.setHardness(5.0f) - .setResistance(6.0f), - 1, - 2)); + new ItemStack( + this.setHardness(5.0f) + .setResistance(6.0f), + 1, + 2)); ItemList.Block_TungstenSteelReinforced.set( - new ItemStack( - this.setHardness(250.0f) - .setResistance(400.0f), - 1, - 3)); + new ItemStack( + this.setHardness(250.0f) + .setResistance(400.0f), + 1, + 3)); ItemList.Block_BrittleCharcoal.set( - new ItemStack( - this.setHardness(0.5f) - .setResistance(8.0f), - 1, - 4)); + new ItemStack( + this.setHardness(0.5f) + .setResistance(8.0f), + 1, + 4)); ItemList.Block_Powderbarrel.set( - new ItemStack( - this.setHardness(2.5f) - .setResistance(2.0f), - 1, - 5)); + new ItemStack( + this.setHardness(2.5f) + .setResistance(2.0f), + 1, + 5)); ItemList.Block_SSFUEL.set( - new ItemStack( - this.setHardness(2.5f) - .setResistance(2.0f), - 1, - 6)); + new ItemStack( + this.setHardness(2.5f) + .setResistance(2.0f), + 1, + 6)); ItemList.Block_MSSFUEL.set( - new ItemStack( - this.setHardness(2.5f) - .setResistance(2.0f), - 1, - 7)); + new ItemStack( + this.setHardness(2.5f) + .setResistance(2.0f), + 1, + 7)); ItemList.Block_SteelPlate.set( - new ItemStack( - this.setHardness(150.0f) - .setResistance(200.0f), - 1, - 8)); + new ItemStack( + this.setHardness(150.0f) + .setResistance(200.0f), + 1, + 8)); ItemList.Block_TitaniumPlate.set( - new ItemStack( - this.setHardness(200.0f) - .setResistance(300.0f), - 1, - 9)); + new ItemStack( + this.setHardness(200.0f) + .setResistance(300.0f), + 1, + 9)); ItemList.Block_NaquadahPlate.set( - new ItemStack( - this.setHardness(500.0f) - .setResistance(1000.0f), - 1, - 10)); + new ItemStack( + this.setHardness(500.0f) + .setResistance(1000.0f), + 1, + 10)); ItemList.Block_NeutroniumPlate.set( - new ItemStack( - this.setHardness(750.0f) - .setResistance(2500.0f), - 1, - 11)); + new ItemStack( + this.setHardness(750.0f) + .setResistance(2500.0f), + 1, + 11)); ItemList.Block_BedrockiumCompressed.set( - new ItemStack( - this.setHardness(1500.0f) - .setResistance(5000.0f), - 1, - 12)); + new ItemStack( + this.setHardness(1500.0f) + .setResistance(5000.0f), + 1, + 12)); GT_ModHandler.addShapelessCraftingRecipe( - new ItemStack(Items.coal, 1, 1), - new Object[] { ItemList.Block_BrittleCharcoal.get(1) }); + new ItemStack(Items.coal, 1, 1), + new Object[] { ItemList.Block_BrittleCharcoal.get(1) }); GT_ModHandler.addCraftingRecipe( - ItemList.Block_Powderbarrel.get(1L), - GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "WSW", "GGG", "WGW", 'W', OrePrefixes.plate.get(Materials.Wood), 'G', - new ItemStack(Items.gunpowder, 1), 'S', new ItemStack(Items.string, 1) }); + ItemList.Block_Powderbarrel.get(1L), + GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "WSW", "GGG", "WGW", 'W', OrePrefixes.plate.get(Materials.Wood), 'G', + new ItemStack(Items.gunpowder, 1), 'S', new ItemStack(Items.string, 1) }); } @Override @@ -247,7 +247,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block { @Override public float getExplosionResistance(Entity entity, World world, int x, int y, int z, double explosionX, - double explosionY, double explosionZ) { + double explosionY, double explosionZ) { if (world == null) { return 0.0F; } @@ -322,7 +322,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block { @Override public void dropBlockAsItemWithChance(World aWorld, int aX, int aY, int aZ, int aMetadata, float chance, - int aFortune) { + int aFortune) { if (aMetadata == 4) { this.dropBlockAsItem(aWorld, aX, aY, aZ, new ItemStack(Items.coal, XSTR_INSTANCE.nextInt(2) + 1, 1)); } else { @@ -336,11 +336,11 @@ public class GT_Block_Reinforced extends GT_Generic_Block { EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, x + 0.5F, y + 0.5F, z + 0.5F, player); world.spawnEntityInWorld(entitytntprimed); new WorldSpawnedEventBuilder.SoundAtEntityEventBuilder().setPitch(1f) - .setVolume(1f) - .setIdentifier(SoundResource.GAME_TNT_PRIMED) - .setEntity(entitytntprimed) - .setWorld(world) - .run(); + .setVolume(1f) + .setIdentifier(SoundResource.GAME_TNT_PRIMED) + .setEntity(entitytntprimed) + .setWorld(world) + .run(); world.setBlockToAir(x, y, z); return false; } @@ -366,11 +366,11 @@ public class GT_Block_Reinforced extends GT_Generic_Block { public void onBlockExploded(World world, int x, int y, int z, Explosion explosion) { if (!world.isRemote && world.getBlockMetadata(x, y, z) == 5) { EntityTNTPrimed entitytntprimed = new EntityTNTPrimed( - world, - x + 0.5F, - y + 0.5F, - z + 0.5F, - explosion.getExplosivePlacedBy()); + world, + x + 0.5F, + y + 0.5F, + z + 0.5F, + explosion.getExplosivePlacedBy()); entitytntprimed.fuse = (world.rand.nextInt(entitytntprimed.fuse / 4) + entitytntprimed.fuse / 8); world.spawnEntityInWorld(entitytntprimed); } @@ -379,10 +379,9 @@ public class GT_Block_Reinforced extends GT_Generic_Block { @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float xOffset, - float yOffset, float zOffset) { + float yOffset, float zOffset) { if ((player.getCurrentEquippedItem() != null) && (player.getCurrentEquippedItem() - .getItem() - == Items.flint_and_steel) && world.getBlockMetadata(x, y, z) == 5) { + .getItem() == Items.flint_and_steel) && world.getBlockMetadata(x, y, z) == 5) { removedByPlayer(world, player, x, y, z); return true; @@ -400,8 +399,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block { for (int i = 0; i < 16; i++) { ItemStack aStack = new ItemStack(aItem, 1, i); if (!aStack.getDisplayName() - .contains(".name")) - aList.add(aStack); + .contains(".name")) aList.add(aStack); } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Stones.java b/src/main/java/gregtech/common/blocks/GT_Block_Stones.java index 2f9e9e9d71..253d9d2163 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Stones.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Stones.java @@ -32,17 +32,13 @@ public class GT_Block_Stones extends GT_Block_Stones_Abstract { GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Chiseled Basalt"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Smooth Basalt"); for (int i = 0; i < 16; i++) { + GT_OreDictUnificator + .registerOre(OrePrefixes.stone, i < 8 ? Materials.Marble : Materials.Basalt, new ItemStack(this, 1, i)); + GT_OreDictUnificator + .registerOre(OrePrefixes.block, i < 8 ? Materials.Marble : Materials.Basalt, new ItemStack(this, 1, i)); GT_OreDictUnificator.registerOre( - OrePrefixes.stone, - i < 8 ? Materials.Marble : Materials.Basalt, - new ItemStack(this, 1, i)); - GT_OreDictUnificator.registerOre( - OrePrefixes.block, - i < 8 ? Materials.Marble : Materials.Basalt, - new ItemStack(this, 1, i)); - GT_OreDictUnificator.registerOre( - (i < 8 ? Materials.Marble.mName.toLowerCase() : Materials.Basalt.mName.toLowerCase()), - new ItemStack(this, 1, i)); + (i < 8 ? Materials.Marble.mName.toLowerCase() : Materials.Basalt.mName.toLowerCase()), + new ItemStack(this, 1, i)); } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Stones_Abstract.java b/src/main/java/gregtech/common/blocks/GT_Block_Stones_Abstract.java index 3a9920e7e4..31b81eb5ff 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Stones_Abstract.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Stones_Abstract.java @@ -48,79 +48,79 @@ public class GT_Block_Stones_Abstract extends GT_Generic_Block implements IOreRe GT_ModHandler.addSmeltingRecipe(new ItemStack(this, 1, 14), new ItemStack(this, 1, 8)); GT_ModHandler.addSmeltingRecipe(new ItemStack(this, 1, 15), new ItemStack(this, 1, 8)); GT_Values.RA.addAssemblerRecipe( - new ItemStack(this, 1, 0), - ItemList.Circuit_Integrated.getWithDamage(0L, 4L), - new ItemStack(this, 1, 3), - 50, - 4); + new ItemStack(this, 1, 0), + ItemList.Circuit_Integrated.getWithDamage(0L, 4L), + new ItemStack(this, 1, 3), + 50, + 4); GT_Values.RA.addAssemblerRecipe( - new ItemStack(this, 1, 8), - ItemList.Circuit_Integrated.getWithDamage(0L, 4L), - new ItemStack(this, 1, 11), - 50, - 4); + new ItemStack(this, 1, 8), + ItemList.Circuit_Integrated.getWithDamage(0L, 4L), + new ItemStack(this, 1, 11), + 50, + 4); GT_ModHandler.addCraftingRecipe( - new ItemStack(this, 1, 6), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "f", "X", 'X', new ItemStack(this, 1, 7) }); + new ItemStack(this, 1, 6), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "f", "X", 'X', new ItemStack(this, 1, 7) }); GT_ModHandler.addCraftingRecipe( - new ItemStack(this, 1, 14), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "f", "X", 'X', new ItemStack(this, 1, 15) }); + new ItemStack(this, 1, 14), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "f", "X", 'X', new ItemStack(this, 1, 15) }); GT_ModHandler.addCraftingRecipe( - new ItemStack(this, 1, 4), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "h", "X", 'X', new ItemStack(this, 1, 3) }); + new ItemStack(this, 1, 4), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "h", "X", 'X', new ItemStack(this, 1, 3) }); GT_ModHandler.addCraftingRecipe( - new ItemStack(this, 1, 12), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "h", "X", 'X', new ItemStack(this, 1, 11) }); + new ItemStack(this, 1, 12), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "h", "X", 'X', new ItemStack(this, 1, 11) }); GT_ModHandler.addCraftingRecipe( - new ItemStack(this, 1, 1), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "h", "X", 'X', new ItemStack(this, 1, 0) }); + new ItemStack(this, 1, 1), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "h", "X", 'X', new ItemStack(this, 1, 0) }); GT_ModHandler.addCraftingRecipe( - new ItemStack(this, 1, 9), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "h", "X", 'X', new ItemStack(this, 1, 8) }); + new ItemStack(this, 1, 9), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "h", "X", 'X', new ItemStack(this, 1, 8) }); GT_Values.RA.addForgeHammerRecipe(new ItemStack(this, 1, 3), new ItemStack(this, 1, 4), 16, 10); GT_Values.RA.addForgeHammerRecipe(new ItemStack(this, 1, 11), new ItemStack(this, 1, 12), 16, 10); GT_Values.RA.addForgeHammerRecipe(new ItemStack(this, 1, 0), new ItemStack(this, 1, 1), 16, 10); GT_Values.RA.addForgeHammerRecipe(new ItemStack(this, 1, 8), new ItemStack(this, 1, 9), 16, 10); GT_ModHandler.addCraftingRecipe( - new ItemStack(this, 4, 3), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "XX", "XX", 'X', new ItemStack(this, 4, 0) }); + new ItemStack(this, 4, 3), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "XX", "XX", 'X', new ItemStack(this, 4, 0) }); GT_ModHandler.addCraftingRecipe( - new ItemStack(this, 4, 11), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "XX", "XX", 'X', new ItemStack(this, 4, 8) }); + new ItemStack(this, 4, 11), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "XX", "XX", 'X', new ItemStack(this, 4, 8) }); GT_ModHandler.addCraftingRecipe( - new ItemStack(this, 4, 3), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "XX", "XX", 'X', new ItemStack(this, 4, 7) }); + new ItemStack(this, 4, 3), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "XX", "XX", 'X', new ItemStack(this, 4, 7) }); GT_ModHandler.addCraftingRecipe( - new ItemStack(this, 4, 11), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "XX", "XX", 'X', new ItemStack(this, 4, 15) }); + new ItemStack(this, 4, 11), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "XX", "XX", 'X', new ItemStack(this, 4, 15) }); } @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, - ItemStack aStack) { + ItemStack aStack) { if (aOreDictName.equals(OreDictNames.craftingLensWhite.toString())) { GT_Values.RA.addLaserEngraverRecipe( - new ItemStack(this, 1, 7), - GT_Utility.copyAmount(0L, aStack), - new ItemStack(this, 1, 6), - 50, - 16); + new ItemStack(this, 1, 7), + GT_Utility.copyAmount(0L, aStack), + new ItemStack(this, 1, 6), + 50, + 16); GT_Values.RA.addLaserEngraverRecipe( - new ItemStack(this, 1, 15), - GT_Utility.copyAmount(0L, aStack), - new ItemStack(this, 1, 14), - 50, - 16); + new ItemStack(this, 1, 15), + GT_Utility.copyAmount(0L, aStack), + new ItemStack(this, 1, 14), + 50, + 16); } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Storage.java b/src/main/java/gregtech/common/blocks/GT_Block_Storage.java index 47053f6e78..ada3f01cde 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Storage.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Storage.java @@ -97,8 +97,7 @@ public class GT_Block_Storage extends GT_Generic_Block { public void getSubBlocks(Item aItem, CreativeTabs aCreativeTab, List<ItemStack> aList) { for (int i = 0; i < 16; i++) { if (!(new ItemStack(aItem, 1, i).getDisplayName() - .contains(".name"))) - aList.add(new ItemStack(aItem, 1, i)); + .contains(".name"))) aList.add(new ItemStack(aItem, 1, i)); } } } diff --git a/src/main/java/gregtech/common/blocks/GT_Cyclotron_Coils.java b/src/main/java/gregtech/common/blocks/GT_Cyclotron_Coils.java index 99d80d1cbb..4e5768f199 100644 --- a/src/main/java/gregtech/common/blocks/GT_Cyclotron_Coils.java +++ b/src/main/java/gregtech/common/blocks/GT_Cyclotron_Coils.java @@ -121,8 +121,7 @@ public class GT_Cyclotron_Coils extends GT_Block_Casings_Abstract { @Override public int colorMultiplier(IBlockAccess aWorld, int aX, int aY, int aZ) { return aWorld.getBlockMetadata(aX, aY, aZ) > 9 ? super.colorMultiplier(aWorld, aX, aY, aZ) - : gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[0] << 16 - | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[1] << 8 - | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[2]; + : gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[0] << 16 | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[1] << 8 + | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[2]; } } diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java index fb6b8ebc85..f8cda499f1 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java @@ -17,12 +17,10 @@ public class GT_Item_Casings5 extends GT_Item_Casings_Abstract { super(block); } - protected static final String mCoilHeatTooltip = GT_LanguageManager.addStringLocalization( - "gt.coilheattooltip", - "Base Heating Capacity = "); - protected static final String mCoilUnitTooltip = GT_LanguageManager.addStringLocalization( - "gt.coilunittooltip", - " Kelvin"); + protected static final String mCoilHeatTooltip = GT_LanguageManager + .addStringLocalization("gt.coilheattooltip", "Base Heating Capacity = "); + protected static final String mCoilUnitTooltip = GT_LanguageManager + .addStringLocalization("gt.coilunittooltip", " Kelvin"); @Override @SideOnly(Side.CLIENT) diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings_Abstract.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings_Abstract.java index e7a20e28cb..46b0aba237 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings_Abstract.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings_Abstract.java @@ -12,42 +12,30 @@ import gregtech.api.util.GT_LanguageManager; public abstract class GT_Item_Casings_Abstract extends ItemBlock { - protected final String mNoMobsToolTip = GT_LanguageManager.addStringLocalization( - "gt.nomobspawnsonthisblock", - "Mobs cannot Spawn on this Block"); - protected final String mNoTileEntityToolTip = GT_LanguageManager.addStringLocalization( - "gt.notileentityinthisblock", - "This is NOT a TileEntity!"); - protected final String mCoil01Tooltip = GT_LanguageManager.addStringLocalization( - "gt.coil01tooltip", - "Base Heating Capacity = 1800 Kelvin"); - protected final String mCoil02Tooltip = GT_LanguageManager.addStringLocalization( - "gt.coil02tooltip", - "Base Heating Capacity = 2700 Kelvin"); - protected final String mCoil03Tooltip = GT_LanguageManager.addStringLocalization( - "gt.coil03tooltip", - "Base Heating Capacity = 3600 Kelvin"); - protected final String mCoil04Tooltip = GT_LanguageManager.addStringLocalization( - "gt.coil04tooltip", - "Base Heating Capacity = 4500 Kelvin"); - protected final String mCoil05Tooltip = GT_LanguageManager.addStringLocalization( - "gt.coil05tooltip", - "Base Heating Capacity = 5400 Kelvin"); - protected final String mCoil06Tooltip = GT_LanguageManager.addStringLocalization( - "gt.coil06tooltip", - "Base Heating Capacity = 7200 Kelvin"); - protected final String mCoil07Tooltip = GT_LanguageManager.addStringLocalization( - "gt.coil07tooltip", - "Base Heating Capacity = 9001 Kelvin"); - protected final String mCoil08Tooltip = GT_LanguageManager.addStringLocalization( - "gt.coil08tooltip", - "Base Heating Capacity = 9900 Kelvin"); - protected final String mCoil09Tooltip = GT_LanguageManager.addStringLocalization( - "gt.coil09tooltip", - "Base Heating Capacity = 10800 Kelvin"); - protected final String mBlastProofTooltip = GT_LanguageManager.addStringLocalization( - "gt.blastprooftooltip", - "This Block is Blast Proof"); + protected final String mNoMobsToolTip = GT_LanguageManager + .addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block"); + protected final String mNoTileEntityToolTip = GT_LanguageManager + .addStringLocalization("gt.notileentityinthisblock", "This is NOT a TileEntity!"); + protected final String mCoil01Tooltip = GT_LanguageManager + .addStringLocalization("gt.coil01tooltip", "Base Heating Capacity = 1800 Kelvin"); + protected final String mCoil02Tooltip = GT_LanguageManager + .addStringLocalization("gt.coil02tooltip", "Base Heating Capacity = 2700 Kelvin"); + protected final String mCoil03Tooltip = GT_LanguageManager + .addStringLocalization("gt.coil03tooltip", "Base Heating Capacity = 3600 Kelvin"); + protected final String mCoil04Tooltip = GT_LanguageManager + .addStringLocalization("gt.coil04tooltip", "Base Heating Capacity = 4500 Kelvin"); + protected final String mCoil05Tooltip = GT_LanguageManager + .addStringLocalization("gt.coil05tooltip", "Base Heating Capacity = 5400 Kelvin"); + protected final String mCoil06Tooltip = GT_LanguageManager + .addStringLocalization("gt.coil06tooltip", "Base Heating Capacity = 7200 Kelvin"); + protected final String mCoil07Tooltip = GT_LanguageManager + .addStringLocalization("gt.coil07tooltip", "Base Heating Capacity = 9001 Kelvin"); + protected final String mCoil08Tooltip = GT_LanguageManager + .addStringLocalization("gt.coil08tooltip", "Base Heating Capacity = 9900 Kelvin"); + protected final String mCoil09Tooltip = GT_LanguageManager + .addStringLocalization("gt.coil09tooltip", "Base Heating Capacity = 10800 Kelvin"); + protected final String mBlastProofTooltip = GT_LanguageManager + .addStringLocalization("gt.blastprooftooltip", "This Block is Blast Proof"); public GT_Item_Casings_Abstract(Block block) { super(block); diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Concretes.java b/src/main/java/gregtech/common/blocks/GT_Item_Concretes.java index 294d0df1cc..44c094aa41 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Concretes.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Concretes.java @@ -10,9 +10,8 @@ import gregtech.api.util.GT_LanguageManager; public class GT_Item_Concretes extends GT_Item_Stones_Abstract { - private final String mRunFasterToolTip = GT_LanguageManager.addStringLocalization( - "gt.runfastertooltip", - "You can walk faster on this Block"); + private final String mRunFasterToolTip = GT_LanguageManager + .addStringLocalization("gt.runfastertooltip", "You can walk faster on this Block"); public GT_Item_Concretes(Block block) { super(block); diff --git a/src/main/java/gregtech/common/blocks/GT_Item_LongDistancePipe.java b/src/main/java/gregtech/common/blocks/GT_Item_LongDistancePipe.java index ebd495784b..52d0db5165 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_LongDistancePipe.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_LongDistancePipe.java @@ -12,12 +12,10 @@ import gregtech.api.util.GT_LanguageManager; public class GT_Item_LongDistancePipe extends ItemBlock { - protected final String mNoMobsToolTip = GT_LanguageManager.addStringLocalization( - "gt.nomobspawnsonthisblock", - "Mobs cannot Spawn on this Block"); - protected final String mNoTileEntityToolTip = GT_LanguageManager.addStringLocalization( - "gt.notileentityinthisblock", - "This is NOT a TileEntity!"); + protected final String mNoMobsToolTip = GT_LanguageManager + .addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block"); + protected final String mNoTileEntityToolTip = GT_LanguageManager + .addStringLocalization("gt.notileentityinthisblock", "This is NOT a TileEntity!"); public GT_Item_LongDistancePipe(Block block) { super(block); diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java index 3e946633b3..8cd4684664 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java @@ -67,108 +67,108 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { if (GregTech_API.METATILEENTITIES[tDamage] != null) { final IGregTechTileEntity tTileEntity = GregTech_API.METATILEENTITIES[tDamage].getBaseMetaTileEntity(); if (!GregTech_API.sPostloadFinished - && tTileEntity.getMetaTileEntity() instanceof ISecondaryDescribable) { - final String[] tSecondaryDescription = ((ISecondaryDescribable) tTileEntity.getMetaTileEntity()).getSecondaryDescription(); + && tTileEntity.getMetaTileEntity() instanceof ISecondaryDescribable) { + final String[] tSecondaryDescription = ((ISecondaryDescribable) tTileEntity.getMetaTileEntity()) + .getSecondaryDescription(); addDescription(null, tSecondaryDescription, tDamage, "_Secondary", true); } { final IMetaTileEntity tMetaTileEntity = tTileEntity.getMetaTileEntity(); final String tSuffix = (tMetaTileEntity instanceof ISecondaryDescribable - && ((ISecondaryDescribable) tMetaTileEntity).isDisplaySecondaryDescription()) ? "_Secondary" - : ""; + && ((ISecondaryDescribable) tMetaTileEntity).isDisplaySecondaryDescription()) ? "_Secondary" + : ""; addDescription( - aList, - tTileEntity.getDescription(), - tDamage, - tSuffix, - !GregTech_API.sPostloadFinished); + aList, + tTileEntity.getDescription(), + tDamage, + tSuffix, + !GregTech_API.sPostloadFinished); tMetaTileEntity.addAdditionalTooltipInformation(aStack, aList); } if (tTileEntity.getEUCapacity() > 0L) { if (tTileEntity.getInputVoltage() > 0L) { final byte inputTier = GT_Utility.getTier(tTileEntity.getInputVoltage()); aList.add( - GT_LanguageManager.addStringLocalization( - "TileEntity_EUp_IN", - "Voltage IN: ", - !GregTech_API.sPostloadFinished) + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(tTileEntity.getInputVoltage()) - + " (" - + GT_Utility.getColoredTierNameFromTier(inputTier) - + EnumChatFormatting.GREEN - + ")" - + EnumChatFormatting.GRAY); + GT_LanguageManager.addStringLocalization( + "TileEntity_EUp_IN", + "Voltage IN: ", + !GregTech_API.sPostloadFinished) + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(tTileEntity.getInputVoltage()) + + " (" + + GT_Utility.getColoredTierNameFromTier(inputTier) + + EnumChatFormatting.GREEN + + ")" + + EnumChatFormatting.GRAY); } if (tTileEntity.getOutputVoltage() > 0L) { final byte outputTier = GT_Utility.getTier(tTileEntity.getOutputVoltage()); aList.add( - GT_LanguageManager.addStringLocalization( - "TileEntity_EUp_OUT", - "Voltage OUT: ", - !GregTech_API.sPostloadFinished) + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(tTileEntity.getOutputVoltage()) - + " (" - + GT_Utility.getColoredTierNameFromTier(outputTier) - + EnumChatFormatting.GREEN - + ")" - + EnumChatFormatting.GRAY); + GT_LanguageManager.addStringLocalization( + "TileEntity_EUp_OUT", + "Voltage OUT: ", + !GregTech_API.sPostloadFinished) + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(tTileEntity.getOutputVoltage()) + + " (" + + GT_Utility.getColoredTierNameFromTier(outputTier) + + EnumChatFormatting.GREEN + + ")" + + EnumChatFormatting.GRAY); } if (tTileEntity.getOutputAmperage() > 1L) { aList.add( - GT_LanguageManager.addStringLocalization( - "TileEntity_EUp_AMOUNT", - "Amperage: ", - !GregTech_API.sPostloadFinished) + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(tTileEntity.getOutputAmperage()) - + EnumChatFormatting.GRAY); + GT_LanguageManager.addStringLocalization( + "TileEntity_EUp_AMOUNT", + "Amperage: ", + !GregTech_API.sPostloadFinished) + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(tTileEntity.getOutputAmperage()) + + EnumChatFormatting.GRAY); } aList.add( - GT_LanguageManager.addStringLocalization( - "TileEntity_EUp_STORE", - "Capacity: ", - !GregTech_API.sPostloadFinished) + EnumChatFormatting.BLUE - + GT_Utility.formatNumbers(tTileEntity.getEUCapacity()) - + EnumChatFormatting.GRAY - + " EU"); + GT_LanguageManager.addStringLocalization( + "TileEntity_EUp_STORE", + "Capacity: ", + !GregTech_API.sPostloadFinished) + EnumChatFormatting.BLUE + + GT_Utility.formatNumbers(tTileEntity.getEUCapacity()) + + EnumChatFormatting.GRAY + + " EU"); } } final NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { if (aNBT.getBoolean("mMuffler")) { aList.add( - GT_LanguageManager.addStringLocalization( - "GT_TileEntity_MUFFLER", - "has Muffler Upgrade", - !GregTech_API.sPostloadFinished)); + GT_LanguageManager.addStringLocalization( + "GT_TileEntity_MUFFLER", + "has Muffler Upgrade", + !GregTech_API.sPostloadFinished)); } if (aNBT.getBoolean("mSteamConverter")) { aList.add( - GT_LanguageManager.addStringLocalization( - "GT_TileEntity_STEAMCONVERTER", - "has Steam Upgrade", - !GregTech_API.sPostloadFinished)); + GT_LanguageManager.addStringLocalization( + "GT_TileEntity_STEAMCONVERTER", + "has Steam Upgrade", + !GregTech_API.sPostloadFinished)); } int tAmount = 0; if ((tAmount = aNBT.getByte("mSteamTanks")) > 0) { aList.add( - tAmount + " " - + GT_LanguageManager.addStringLocalization( - "GT_TileEntity_STEAMTANKS", - "Steam Tank Upgrades", - !GregTech_API.sPostloadFinished)); + tAmount + " " + + GT_LanguageManager.addStringLocalization( + "GT_TileEntity_STEAMTANKS", + "Steam Tank Upgrades", + !GregTech_API.sPostloadFinished)); } CoverableTileEntity.addInstalledCoversInformation(aNBT, aList); if (aNBT.hasKey("mColor") && aNBT.getByte("mColor") != -1) { aList.add( - GT_LanguageManager.addStringLocalization( - "GT_TileEntity_COLORED", - "Colored", - !GregTech_API.sPostloadFinished) + " (" - + Dyes.get(aNBT.getByte("mColor") - 1).formatting - + Dyes.get(aNBT.getByte("mColor") - 1).mName - + EnumChatFormatting.GRAY - + ")"); + GT_LanguageManager + .addStringLocalization("GT_TileEntity_COLORED", "Colored", !GregTech_API.sPostloadFinished) + + " (" + + Dyes.get(aNBT.getByte("mColor") - 1).formatting + + Dyes.get(aNBT.getByte("mColor") - 1).mName + + EnumChatFormatting.GRAY + + ")"); } } } catch (Throwable e) { @@ -177,7 +177,7 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { } private void addDescription(@Nullable List<String> aList, @Nullable String[] aDescription, int aDamage, - String aSuffix, boolean aWriteIntoLangFile) { + String aSuffix, boolean aWriteIntoLangFile) { if (aDescription == null) return; for (int i = 0, tLength = aDescription.length; i < tLength; i++) { String tDescLine = aDescription[i]; @@ -194,8 +194,8 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { tRep[j / 2] = tSplitStrings[j]; } final String tTranslated = String.format( - GT_LanguageManager.addStringLocalization(tKey, tBuffer.toString(), aWriteIntoLangFile), - (Object[]) tRep); + GT_LanguageManager.addStringLocalization(tKey, tBuffer.toString(), aWriteIntoLangFile), + (Object[]) tRep); if (aList != null) aList.add(tTranslated); } else { String tTranslated = GT_LanguageManager.addStringLocalization(tKey, tDescLine, aWriteIntoLangFile); @@ -209,9 +209,10 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { if (aDamage >= GregTech_API.METATILEENTITIES.length) return; if (GregTech_API.METATILEENTITIES[aDamage] != null) { final IMetaTileEntity tMetaTileEntity = GregTech_API.METATILEENTITIES[aDamage].getBaseMetaTileEntity() - .getMetaTileEntity(); + .getMetaTileEntity(); if (tMetaTileEntity instanceof ISecondaryDescribable) { - final String[] tSecondaryDescription = ((ISecondaryDescribable) tMetaTileEntity).getSecondaryDescription(); + final String[] tSecondaryDescription = ((ISecondaryDescribable) tMetaTileEntity) + .getSecondaryDescription(); addDescription(null, tSecondaryDescription, aDamage, "_Secondary", true); } addDescription(null, tMetaTileEntity.getDescription(), aDamage, "", true); @@ -220,7 +221,7 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { @Override public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, - float hitX, float hitY, float hitZ) { + float hitX, float hitY, float hitZ) { return false; } @@ -241,7 +242,7 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { String aName = super.getItemStackDisplayName(aStack); final short aDamage = (short) getDamage(aStack); if (aDamage >= 0 && aDamage < GregTech_API.METATILEENTITIES.length - && GregTech_API.METATILEENTITIES[aDamage] != null) { + && GregTech_API.METATILEENTITIES[aDamage] != null) { Materials aMaterial = null; if (GregTech_API.METATILEENTITIES[aDamage] instanceof GT_MetaPipeEntity_Item) { aMaterial = ((GT_MetaPipeEntity_Item) GregTech_API.METATILEENTITIES[aDamage]).mMaterial; @@ -264,14 +265,14 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { super.onCreated(aStack, aWorld, aPlayer); final short tDamage = (short) getDamage(aStack); if ((tDamage < 0) || ((tDamage >= GregTech_API.METATILEENTITIES.length) - && (GregTech_API.METATILEENTITIES[tDamage] != null))) { + && (GregTech_API.METATILEENTITIES[tDamage] != null))) { GregTech_API.METATILEENTITIES[tDamage].onCreated(aStack, aWorld, aPlayer); } } @Override public boolean placeBlockAt(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int side, - float hitX, float hitY, float hitZ, int aMeta) { + float hitX, float hitY, float hitZ, int aMeta) { final short tDamage = (short) getDamage(aStack); if (tDamage > 0) { if (GregTech_API.METATILEENTITIES[tDamage] == null) { @@ -283,11 +284,11 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { } if (aWorld.getBlock(aX, aY, aZ) != this.field_150939_a) { throw new GT_ItsNotMyFaultException( - "Failed to place Block even though World.setBlock returned true. It COULD be MCPC/Bukkit causing that. In case you really have that installed, don't report this Bug to me, I don't know how to fix it."); + "Failed to place Block even though World.setBlock returned true. It COULD be MCPC/Bukkit causing that. In case you really have that installed, don't report this Bug to me, I don't know how to fix it."); } if (aWorld.getBlockMetadata(aX, aY, aZ) != tMetaData) { throw new GT_ItsNotMyFaultException( - "Failed to set the MetaValue of the Block even though World.setBlock returned true. It COULD be MCPC/Bukkit causing that. In case you really have that installed, don't report this Bug to me, I don't know how to fix it."); + "Failed to set the MetaValue of the Block even though World.setBlock returned true. It COULD be MCPC/Bukkit causing that. In case you really have that installed, don't report this Bug to me, I don't know how to fix it."); } final IGregTechTileEntity tTileEntity = (IGregTechTileEntity) aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity != null) { @@ -297,7 +298,7 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { tTileEntity.setOwnerUuid(aPlayer.getUniqueID()); } tTileEntity.getMetaTileEntity() - .initDefaultModes(aStack.getTagCompound()); + .initDefaultModes(aStack.getTagCompound()); final byte aSide = GT_Utility.getOppositeSide(side); if (tTileEntity.getMetaTileEntity() instanceof IConnectable) { // If we're connectable, try connecting to whatever we're up against @@ -326,8 +327,8 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { final short tDamage = (short) getDamage(aStack); final EntityLivingBase tPlayer = (EntityPlayer) aPlayer; if (GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_QuantumChest - || GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_SuperTank - || GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_QuantumTank) { + || GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_SuperTank + || GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_QuantumTank) { final NBTTagCompound tNBT = aStack.stackTagCompound; if (tNBT == null) return; if (tNBT.hasNoTags()) { @@ -335,7 +336,7 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { return; } if ((tNBT.hasKey("mItemCount") && tNBT.getInteger("mItemCount") > 0) || (tNBT.hasKey("mFluid") - && FluidStack.loadFluidStackFromNBT(tNBT.getCompoundTag("mFluid")).amount > 64000)) { + && FluidStack.loadFluidStackFromNBT(tNBT.getCompoundTag("mFluid")).amount > 64000)) { final FluidStack tFluid = FluidStack.loadFluidStackFromNBT(tNBT.getCompoundTag("mFluid")); int tEffectDuration = 1200; if (tFluid != null) { @@ -381,7 +382,7 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { final int tDamage = container.getItemDamage(); final IMetaTileEntity tMetaTile = GregTech_API.METATILEENTITIES[tDamage]; if (!(tMetaTile instanceof GT_MetaTileEntity_QuantumTank - || tMetaTile instanceof GT_MetaTileEntity_SuperTank)) { + || tMetaTile instanceof GT_MetaTileEntity_SuperTank)) { return 0; } if (container.stackTagCompound == null) container.stackTagCompound = new NBTTagCompound(); @@ -414,7 +415,7 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { final int tDamage = container.getItemDamage(); final IMetaTileEntity tMetaTile = GregTech_API.METATILEENTITIES[tDamage]; if (!(tMetaTile instanceof GT_MetaTileEntity_QuantumTank - || tMetaTile instanceof GT_MetaTileEntity_SuperTank)) { + || tMetaTile instanceof GT_MetaTileEntity_SuperTank)) { return null; } final FluidStack tStoredFluid = getFluid(container); diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Ores.java b/src/main/java/gregtech/common/blocks/GT_Item_Ores.java index 2471c514a9..03a2591542 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Ores.java @@ -25,7 +25,7 @@ public class GT_Item_Ores extends ItemBlock { @Override public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, - float hitX, float hitY, float hitZ) { + float hitX, float hitY, float hitZ) { return false; } @@ -45,18 +45,18 @@ public class GT_Item_Ores extends ItemBlock { @Override public boolean placeBlockAt(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int side, - float hitX, float hitY, float hitZ, int aMeta) { + float hitX, float hitY, float hitZ, int aMeta) { short tDamage = (short) getDamage(aStack); if (tDamage > 0) { if (!aWorld.setBlock( - aX, - aY, - aZ, - this.field_150939_a, - GT_TileEntity_Ores.getHarvestData( - tDamage, - ((GT_Block_Ores_Abstract) field_150939_a).getBaseBlockHarvestLevel(aMeta % 16000 / 1000)), - 3)) { + aX, + aY, + aZ, + this.field_150939_a, + GT_TileEntity_Ores.getHarvestData( + tDamage, + ((GT_Block_Ores_Abstract) field_150939_a).getBaseBlockHarvestLevel(aMeta % 16000 / 1000)), + 3)) { return false; } GT_TileEntity_Ores tTileEntity = (GT_TileEntity_Ores) aWorld.getTileEntity(aX, aY, aZ); @@ -74,8 +74,8 @@ public class GT_Item_Ores extends ItemBlock { @Override public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List<String> aList, boolean aF3_H) { - String formula = StatCollector.translateToLocal( - field_150939_a.getUnlocalizedName() + '.' + getDamage(aStack) + ".tooltip"); + String formula = StatCollector + .translateToLocal(field_150939_a.getUnlocalizedName() + '.' + getDamage(aStack) + ".tooltip"); if (!StringUtils.isBlank(formula)) aList.add(formula); } } diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Stones_Abstract.java b/src/main/java/gregtech/common/blocks/GT_Item_Stones_Abstract.java index 0b44d223a9..5b73108301 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Stones_Abstract.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Stones_Abstract.java @@ -12,9 +12,8 @@ import gregtech.api.util.GT_LanguageManager; public class GT_Item_Stones_Abstract extends ItemBlock { - private final String mNoMobsToolTip = GT_LanguageManager.addStringLocalization( - "gt.nomobspawnsonthisblock", - "Mobs cannot Spawn on this Block"); + private final String mNoMobsToolTip = GT_LanguageManager + .addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block"); public GT_Item_Stones_Abstract(Block block) { super(block); diff --git a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java index 099ccf2e65..4add136ab5 100644 --- a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java @@ -35,17 +35,15 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit public static byte getHarvestData(short aMetaData, int aBaseBlockHarvestLevel) { Materials aMaterial = GregTech_API.sGeneratedMaterials[(aMetaData % 1000)]; byte tByte = aMaterial == null ? 0 - : (byte) Math.max( - aBaseBlockHarvestLevel, - Math.min(7, aMaterial.mToolQuality - (aMetaData < 16000 ? 0 : 1))); + : (byte) Math + .max(aBaseBlockHarvestLevel, Math.min(7, aMaterial.mToolQuality - (aMetaData < 16000 ? 0 : 1))); if (GT_Mod.gregtechproxy.mChangeHarvestLevels) { tByte = aMaterial == null ? 0 - : (byte) Math.max( - aBaseBlockHarvestLevel, - Math.min( - GT_Mod.gregtechproxy.mMaxHarvestLevel, - GT_Mod.gregtechproxy.mHarvestLevel[aMaterial.mMetaItemSubID] - - (aMetaData < 16000 ? 0 : 1))); + : (byte) Math.max( + aBaseBlockHarvestLevel, + Math.min( + GT_Mod.gregtechproxy.mMaxHarvestLevel, + GT_Mod.gregtechproxy.mHarvestLevel[aMaterial.mMetaItemSubID] - (aMetaData < 16000 ? 0 : 1))); } return tByte; } @@ -55,7 +53,7 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit } public static boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData, boolean isSmallOre, - boolean air) { + boolean air) { if (!air) { aY = Math.min(aWorld.getActualHeight(), Math.max(aY, 1)); } @@ -115,14 +113,14 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit } // GT_FML_LOGGER.info(tOreBlock); aWorld.setBlock( - aX, - aY, - aZ, - tOreBlock, - getHarvestData( - (short) aMetaData, - ((GT_Block_Ores_Abstract) tOreBlock).getBaseBlockHarvestLevel(aMetaData % 16000 / 1000)), - 0); + aX, + aY, + aZ, + tOreBlock, + getHarvestData( + (short) aMetaData, + ((GT_Block_Ores_Abstract) tOreBlock).getBaseBlockHarvestLevel(aMetaData % 16000 / 1000)), + 0); TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if ((tTileEntity instanceof GT_TileEntity_Ores)) { ((GT_TileEntity_Ores) tTileEntity).mMetaData = ((short) aMetaData); @@ -151,10 +149,10 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit if ((!this.worldObj.isRemote) && (this.mBlocked)) { this.mBlocked = false; GT_Values.NW.sendPacketToAllPlayersInRange( - this.worldObj, - new GT_Packet_Ores(this.xCoord, (short) this.yCoord, this.zCoord, this.mMetaData), - this.xCoord, - this.zCoord); + this.worldObj, + new GT_Packet_Ores(this.xCoord, (short) this.yCoord, this.zCoord, this.mMetaData), + this.xCoord, + this.zCoord); } } @@ -164,10 +162,10 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit boolean sendUpdate = mBlockedChecked ? !mBlocked : checkBlocked(); if (sendUpdate) { GT_Values.NW.sendPacketToAllPlayersInRange( - this.worldObj, - new GT_Packet_Ores(this.xCoord, (short) this.yCoord, this.zCoord, this.mMetaData), - this.xCoord, - this.zCoord); + this.worldObj, + new GT_Packet_Ores(this.xCoord, (short) this.yCoord, this.zCoord, this.mMetaData), + this.xCoord, + this.zCoord); } } return null; @@ -219,61 +217,51 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit public void overrideOreBlockMaterial(Block aOverridingStoneBlock, byte aOverridingStoneMeta) { if (this.worldObj == null || blockType == null) return; this.mMetaData = ((short) (int) (this.mMetaData % 1000L + this.mMetaData / 16000L * 16000L)); - if (aOverridingStoneBlock.isReplaceableOreGen( - this.worldObj, - this.xCoord, - this.yCoord, - this.zCoord, - Blocks.netherrack)) { + if (aOverridingStoneBlock + .isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.netherrack)) { this.mMetaData = ((short) (this.mMetaData + 1000)); - } else if (aOverridingStoneBlock.isReplaceableOreGen( + } else if (aOverridingStoneBlock + .isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.end_stone)) { + this.mMetaData = ((short) (this.mMetaData + 2000)); + } else if (aOverridingStoneBlock.isReplaceableOreGen( this.worldObj, this.xCoord, this.yCoord, this.zCoord, - Blocks.end_stone)) { - this.mMetaData = ((short) (this.mMetaData + 2000)); - } else - if (aOverridingStoneBlock.isReplaceableOreGen( + GregTech_API.sBlockGranites)) { + if (aOverridingStoneBlock == GregTech_API.sBlockGranites) { + if (aOverridingStoneMeta < 8) { + this.mMetaData = ((short) (this.mMetaData + 3000)); + } else { + this.mMetaData = ((short) (this.mMetaData + 4000)); + } + } else { + this.mMetaData = ((short) (this.mMetaData + 3000)); + } + } else if (aOverridingStoneBlock.isReplaceableOreGen( this.worldObj, this.xCoord, this.yCoord, this.zCoord, - GregTech_API.sBlockGranites)) { - if (aOverridingStoneBlock == GregTech_API.sBlockGranites) { + GregTech_API.sBlockStones)) { + if (aOverridingStoneBlock == GregTech_API.sBlockStones) { if (aOverridingStoneMeta < 8) { - this.mMetaData = ((short) (this.mMetaData + 3000)); + this.mMetaData = ((short) (this.mMetaData + 5000)); } else { - this.mMetaData = ((short) (this.mMetaData + 4000)); + this.mMetaData = ((short) (this.mMetaData + 6000)); } } else { - this.mMetaData = ((short) (this.mMetaData + 3000)); - } - } else - if (aOverridingStoneBlock.isReplaceableOreGen( - this.worldObj, - this.xCoord, - this.yCoord, - this.zCoord, - GregTech_API.sBlockStones)) { - if (aOverridingStoneBlock == GregTech_API.sBlockStones) { - if (aOverridingStoneMeta < 8) { - this.mMetaData = ((short) (this.mMetaData + 5000)); - } else { - this.mMetaData = ((short) (this.mMetaData + 6000)); - } - } else { - this.mMetaData = ((short) (this.mMetaData + 5000)); - } + this.mMetaData = ((short) (this.mMetaData + 5000)); } + } this.worldObj.setBlockMetadataWithNotify( - this.xCoord, - this.yCoord, - this.zCoord, - getHarvestData( - this.mMetaData, - ((GT_Block_Ores_Abstract) blockType).getBaseBlockHarvestLevel(mMetaData % 16000 / 1000)), - 0); + this.xCoord, + this.yCoord, + this.zCoord, + getHarvestData( + this.mMetaData, + ((GT_Block_Ores_Abstract) blockType).getBaseBlockHarvestLevel(mMetaData % 16000 / 1000)), + 0); } public void convertOreBlock(World aWorld, int aX, int aY, int aZ) { @@ -283,14 +271,13 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit if (tTileEntity instanceof GT_TileEntity_Ores) { ((GT_TileEntity_Ores) tTileEntity).mMetaData = aMeta; this.worldObj.setBlockMetadataWithNotify( - this.xCoord, - this.yCoord, - this.zCoord, - getHarvestData( - aMeta, - ((GT_Block_Ores_Abstract) tTileEntity.blockType).getBaseBlockHarvestLevel( - aMeta % 16000 / 1000)), - 0); + this.xCoord, + this.yCoord, + this.zCoord, + getHarvestData( + aMeta, + ((GT_Block_Ores_Abstract) tTileEntity.blockType).getBaseBlockHarvestLevel(aMeta % 16000 / 1000)), + 0); } } @@ -326,21 +313,15 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit Materials aMaterial = aOreMaterial.mOreReplacement; - ItemStack tStack = GT_OreDictUnificator.get( - OrePrefixes.gemExquisite, - aMaterial, - GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), - 1L); + ItemStack tStack = GT_OreDictUnificator + .get(OrePrefixes.gemExquisite, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L); if (tStack != null) { for (int i = 0; i < 1; i++) { tSelector.add(tStack); } } - tStack = GT_OreDictUnificator.get( - OrePrefixes.gemFlawless, - aMaterial, - GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), - 1L); + tStack = GT_OreDictUnificator + .get(OrePrefixes.gemFlawless, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L); if (tStack != null) { for (int i = 0; i < 2; i++) { tSelector.add(tStack); @@ -353,10 +334,10 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit } } tStack = GT_OreDictUnificator.get( - OrePrefixes.gemFlawed, - aMaterial, - GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1L), - 1L); + OrePrefixes.gemFlawed, + aMaterial, + GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1L), + 1L); if (tStack != null) { for (int i = 0; i < 5; i++) { tSelector.add(tStack); @@ -369,10 +350,10 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit } } tStack = GT_OreDictUnificator.get( - OrePrefixes.gemChipped, - aMaterial, - GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), - 1L); + OrePrefixes.gemChipped, + aMaterial, + GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), + 1L); if (tStack != null) { for (int i = 0; i < 5; i++) { tSelector.add(tStack); @@ -387,21 +368,19 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit if (!tSelector.isEmpty()) { int i = 0; for (int j = Math.max( - 1, - aMaterial.mOreMultiplier - + (aFortune > 0 ? tRandom.nextInt(1 + aFortune * aMaterial.mOreMultiplier) : 0) / 2); i - < j; i++) { + 1, + aMaterial.mOreMultiplier + + (aFortune > 0 ? tRandom.nextInt(1 + aFortune * aMaterial.mOreMultiplier) : 0) / 2); i + < j; i++) { rList.add(GT_Utility.copyAmount(1L, tSelector.get(tRandom.nextInt(tSelector.size())))); } } if (tRandom.nextInt(3 + aFortune) > 1) { Materials dustMat = ((GT_Block_Ores_Abstract) aDroppedOre).getDroppedDusts()[this.mMetaData / 1000 - % 16]; + % 16]; if (dustMat != null) rList.add( - GT_OreDictUnificator.get( - tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, - dustMat, - 1L)); + GT_OreDictUnificator + .get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, dustMat, 1L)); } } return rList; @@ -412,22 +391,20 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit Materials aMaterial = GregTech_API.sGeneratedMaterials[(this.mMetaData % 1000)]; if ((aMaterial != null) && (this.mMetaData < 32000)) { ITexture iTexture = TextureFactory.builder() - .addIcon( - aMaterial.mIconSet.mTextures[this.mMetaData / 16000 == 0 - ? OrePrefixes.ore.mTextureIndex - : OrePrefixes.oreSmall.mTextureIndex]) - .setRGBA(aMaterial.mRGBa) - .stdOrient() - .build(); + .addIcon( + aMaterial.mIconSet.mTextures[this.mMetaData / 16000 == 0 ? OrePrefixes.ore.mTextureIndex + : OrePrefixes.oreSmall.mTextureIndex]) + .setRGBA(aMaterial.mRGBa) + .stdOrient() + .build(); if (aBlock instanceof GT_Block_Ores_Abstract) { return new ITexture[] { - ((GT_Block_Ores_Abstract) aBlock).getTextureSet()[((this.mMetaData / 1000) % 16)], iTexture }; + ((GT_Block_Ores_Abstract) aBlock).getTextureSet()[((this.mMetaData / 1000) % 16)], iTexture }; } } return new ITexture[] { TextureFactory.of(Blocks.stone, 0), TextureFactory.builder() - .addIcon( - SET_NONE.mTextures[OrePrefixes.ore.mTextureIndex]) - .stdOrient() - .build() }; + .addIcon(SET_NONE.mTextures[OrePrefixes.ore.mTextureIndex]) + .stdOrient() + .build() }; } } |