diff options
| author | Raven Szewczyk <git@eigenraven.me> | 2022-08-27 10:19:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-27 11:19:57 +0200 |
| commit | 6f31720697bcc351421a4d86ba3bf749375dd12c (patch) | |
| tree | 3adf8f318f22c892d74cd7c9d30b6dd3f11f11bd /src/main/java/gregtech/common/blocks | |
| parent | c3eac50decd33ee2be8703dfb2ecf9cdc31c2b67 (diff) | |
| download | GT5-Unofficial-6f31720697bcc351421a4d86ba3bf749375dd12c.tar.gz GT5-Unofficial-6f31720697bcc351421a4d86ba3bf749375dd12c.tar.bz2 GT5-Unofficial-6f31720697bcc351421a4d86ba3bf749375dd12c.zip | |
Update buildscript & apply spotless (#1306)
* Update dependencies
* Update buildscript, apply spotless
Diffstat (limited to 'src/main/java/gregtech/common/blocks')
31 files changed, 1047 insertions, 503 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 5ed40ec1a3..cbd2d86093 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java @@ -9,21 +9,19 @@ import net.minecraft.world.IBlockAccess; public class GT_Block_Casings1 extends GT_Block_Casings_Abstract { - /** - * Texture Index Information - * Textures.BlockIcons.casingTexturePages[0][0-63] - Gregtech - * Textures.BlockIcons.casingTexturePages[0][64-127] - GT++ - * Textures.BlockIcons.casingTexturePages[1][0-127] - Gregtech - * Textures.BlockIcons.casingTexturePages[2][0-127] - Free - * Textures.BlockIcons.casingTexturePages[3][0-127] - Free - * Textures.BlockIcons.casingTexturePages[4][0-127] - Free - * Textures.BlockIcons.casingTexturePages[5][0-127] - Free - * Textures.BlockIcons.casingTexturePages[6][0-127] - Free - * Textures.BlockIcons.casingTexturePages[7][0-127] - Free - * Textures.BlockIcons.casingTexturePages[8][0-127] - TecTech - */ - - + /** + * Texture Index Information + * Textures.BlockIcons.casingTexturePages[0][0-63] - Gregtech + * Textures.BlockIcons.casingTexturePages[0][64-127] - GT++ + * Textures.BlockIcons.casingTexturePages[1][0-127] - Gregtech + * Textures.BlockIcons.casingTexturePages[2][0-127] - Free + * Textures.BlockIcons.casingTexturePages[3][0-127] - Free + * Textures.BlockIcons.casingTexturePages[4][0-127] - Free + * Textures.BlockIcons.casingTexturePages[5][0-127] - Free + * Textures.BlockIcons.casingTexturePages[6][0-127] - Free + * Textures.BlockIcons.casingTexturePages[7][0-127] - Free + * Textures.BlockIcons.casingTexturePages[8][0-127] - TecTech + */ public GT_Block_Casings1() { super(GT_Item_Casings1.class, "gt.blockcasings", GT_Material_Casings.INSTANCE, 16); @@ -39,7 +37,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"); @@ -96,6 +95,10 @@ 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]; + 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]; } } 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 1b6ac42ee2..7ee9472308 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java @@ -16,8 +16,12 @@ import net.minecraftforge.common.util.ForgeDirection; public class GT_Block_Casings2 extends GT_Block_Casings_Abstract { public GT_Block_Casings2() { 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); + // 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); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Solid Steel Machine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Frost Proof Machine Casing"); @@ -98,7 +102,10 @@ 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) { - return aWorld.getBlockMetadata(aX, aY, aZ) == 8 ? Blocks.bedrock.getExplosionResistance(aTNT) : super.getExplosionResistance(aTNT, aWorld, aX, aY, aZ, eX, eY, eZ); + public float getExplosionResistance( + Entity aTNT, World aWorld, int aX, int aY, int aZ, double eX, double eY, double eZ) { + return aWorld.getBlockMetadata(aX, aY, aZ) == 8 + ? Blocks.bedrock.getExplosionResistance(aTNT) + : 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 cc9bbd25f8..677c457678 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java @@ -78,11 +78,17 @@ public class GT_Block_Casings3 extends GT_Block_Casings_Abstract { case 12: return Textures.BlockIcons.MACHINE_CASING_RADIATIONPROOF.getIcon(); case 13: - return aSide > 1 ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_BRONZE.getIcon() : Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS.getIcon(); + return aSide > 1 + ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_BRONZE.getIcon() + : Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS.getIcon(); case 14: - return aSide > 1 ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_STEEL.getIcon() : Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + return aSide > 1 + ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_STEEL.getIcon() + : Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); case 15: - return aSide > 1 ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_TUNGSTENSTEEL.getIcon() : Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); + return aSide > 1 + ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_TUNGSTENSTEEL.getIcon() + : Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); } return 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 90f568b73f..f5618c23b4 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java @@ -22,24 +22,45 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { * The exact meaning of these numbers are like black magic. Read the 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}, + 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 + }, }; + 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"); -// GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Fusion Casing"); + // GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Fusion Casing"); + // GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Fusion Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Fusion Machine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Fusion Coil Block"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Fusion Machine Casing MK II"); @@ -88,12 +109,14 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { case 11: return Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); case 3: - return aSide > 1 ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_TITANIUM.getIcon() : Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); + return aSide > 1 + ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_TITANIUM.getIcon() + : Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); case 4: - //Do not overwrite! + // Do not overwrite! return Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW.getIcon(); case 5: - //Do not overwrite! + // Do not overwrite! return Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS.getIcon(); case 6: return Textures.BlockIcons.MACHINE_CASING_FUSION.getIcon(); @@ -117,26 +140,50 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { public IIcon getTurbineCasing(int meta, int iconIndex, boolean active) { switch (meta) { case 10: - return active ? Textures.BlockIcons.TURBINE_ACTIVE1[iconIndex].getIcon() : Textures.BlockIcons.TURBINE1[iconIndex].getIcon(); + return active + ? Textures.BlockIcons.TURBINE_ACTIVE1[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE1[iconIndex].getIcon(); case 11: - return active ? Textures.BlockIcons.TURBINE_ACTIVE2[iconIndex].getIcon() : Textures.BlockIcons.TURBINE2[iconIndex].getIcon(); + return active + ? Textures.BlockIcons.TURBINE_ACTIVE2[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE2[iconIndex].getIcon(); case 12: - return active ? Textures.BlockIcons.TURBINE_ACTIVE3[iconIndex].getIcon() : Textures.BlockIcons.TURBINE3[iconIndex].getIcon(); + return active + ? Textures.BlockIcons.TURBINE_ACTIVE3[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE3[iconIndex].getIcon(); default: - return active ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() : Textures.BlockIcons.TURBINE[iconIndex].getIcon(); + return active + ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE[iconIndex].getIcon(); } } public IIcon getTurbineCasing(int meta, int iconIndex, boolean active, boolean hasTurbine) { switch (meta) { case 10: - return active ? Textures.BlockIcons.TURBINE_ACTIVE1[iconIndex].getIcon() : hasTurbine ? Textures.BlockIcons.TURBINE1[iconIndex].getIcon() : Textures.BlockIcons.TURBINE_EMPTY1[iconIndex].getIcon(); + return active + ? Textures.BlockIcons.TURBINE_ACTIVE1[iconIndex].getIcon() + : hasTurbine + ? Textures.BlockIcons.TURBINE1[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE_EMPTY1[iconIndex].getIcon(); case 11: - return active ? Textures.BlockIcons.TURBINE_ACTIVE2[iconIndex].getIcon() : hasTurbine ? Textures.BlockIcons.TURBINE2[iconIndex].getIcon() : Textures.BlockIcons.TURBINE_EMPTY2[iconIndex].getIcon(); + return active + ? Textures.BlockIcons.TURBINE_ACTIVE2[iconIndex].getIcon() + : hasTurbine + ? Textures.BlockIcons.TURBINE2[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE_EMPTY2[iconIndex].getIcon(); case 12: - return active ? Textures.BlockIcons.TURBINE_ACTIVE3[iconIndex].getIcon() : hasTurbine ? Textures.BlockIcons.TURBINE3[iconIndex].getIcon() : Textures.BlockIcons.TURBINE_EMPTY3[iconIndex].getIcon(); + return active + ? Textures.BlockIcons.TURBINE_ACTIVE3[iconIndex].getIcon() + : hasTurbine + ? Textures.BlockIcons.TURBINE3[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE_EMPTY3[iconIndex].getIcon(); default: - return active ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() : hasTurbine ? Textures.BlockIcons.TURBINE[iconIndex].getIcon() : Textures.BlockIcons.TURBINE_EMPTY[iconIndex].getIcon(); + return active + ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() + : hasTurbine + ? Textures.BlockIcons.TURBINE[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE_EMPTY[iconIndex].getIcon(); } } @@ -156,7 +203,8 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { public IIcon getIcon(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int aSide) { 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) { + if (tMeta != 6 && tMeta != 8 && tMeta != 9 && tMeta != 10 && tMeta != 11 && tMeta != 12 + || !mConnectedMachineTextures) { return getIcon(aSide, tMeta); } if (tMeta > 8 && tMeta < 13) { @@ -165,10 +213,10 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { case 0: for (int i = -1; i < 2; i++) { for (int j = -1; j < 2; j++) { - if (i == 0 && j == 0) - continue; + if (i == 0 && j == 0) continue; int tState; - if ((tState = isTurbineControllerWithSide(aWorld, xCoord + j, yCoord, zCoord + i, aSide)) != 0) { + if ((tState = isTurbineControllerWithSide(aWorld, xCoord + j, yCoord, zCoord + i, aSide)) + != 0) { return getTurbineCasing(tMeta, 4 - i * 3 - j, tState == 1, tState == 2); } } @@ -177,11 +225,12 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { case 1: for (int i = -1; i < 2; i++) { for (int j = -1; j < 2; j++) { - if (i == 0 && j == 0) - continue; + if (i == 0 && j == 0) continue; int tState; - if ((tState = isTurbineControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, aSide)) != 0) { - return getTurbineCasing(tMeta, 4 + i * 3 - j * tInvertLeftRightMod, tState == 1, tState == 2); + if ((tState = isTurbineControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, aSide)) + != 0) { + return getTurbineCasing( + tMeta, 4 + i * 3 - j * tInvertLeftRightMod, tState == 1, tState == 2); } } } @@ -189,11 +238,12 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { case 2: for (int i = -1; i < 2; i++) { for (int j = -1; j < 2; j++) { - if (i == 0 && j == 0) - continue; + if (i == 0 && j == 0) continue; int tState; - if ((tState = isTurbineControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, aSide)) != 0) { - return getTurbineCasing(tMeta, 4 + i * 3 + j * tInvertLeftRightMod, tState == 1, tState == 2); + if ((tState = isTurbineControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, aSide)) + != 0) { + return getTurbineCasing( + tMeta, 4 + i * 3 + j * tInvertLeftRightMod, tState == 1, tState == 2); } } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings5.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings5.java index 4de58c3a35..a3ef59de4f 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings5.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings5.java @@ -1,5 +1,7 @@ package gregtech.common.blocks; +import static gregtech.api.enums.HeatingCoilLevel.*; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.HeatingCoilLevel; @@ -7,13 +9,10 @@ import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.interfaces.IHeatingCoil; import gregtech.api.util.GT_LanguageManager; +import java.util.function.Consumer; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; -import java.util.function.Consumer; - -import static gregtech.api.enums.HeatingCoilLevel.*; - public class GT_Block_Casings5 extends GT_Block_Casings_Abstract implements IHeatingCoil { public GT_Block_Casings5() { @@ -33,7 +32,6 @@ public class GT_Block_Casings5 extends GT_Block_Casings_Abstract implements IHea GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Hypogen Coil Block"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Eternal Coil Block"); - ItemList.Casing_Coil_Cupronickel.set(new ItemStack(this, 1, 0)); ItemList.Casing_Coil_Kanthal.set(new ItemStack(this, 1, 1)); ItemList.Casing_Coil_Nichrome.set(new ItemStack(this, 1, 2)); @@ -52,7 +50,7 @@ public class GT_Block_Casings5 extends GT_Block_Casings_Abstract implements IHea @Override public int getTextureIndex(int aMeta) { - return (1 << 7 ) | aMeta; + return (1 << 7) | aMeta; } @Override @@ -163,8 +161,6 @@ public class GT_Block_Casings5 extends GT_Block_Casings_Abstract implements IHea } } - - @Override public HeatingCoilLevel getCoilHeat(int meta) { getOnCoilCheck().accept(this); 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 30b8751406..0b6b89198a 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java @@ -96,6 +96,8 @@ 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]; + 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]; } } 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 e8ccc47b3d..65583eaa28 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java @@ -16,7 +16,7 @@ import net.minecraft.world.IBlockAccess; public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { public static boolean mConnectedMachineTextures = true; - //WATCH OUT FOR TEXTURE ID's + // WATCH OUT FOR TEXTURE ID's public GT_Block_Casings8() { super(GT_Item_Casings8.class, "gt.blockcasings8", GT_Material_Casings.INSTANCE, 10); /* @@ -29,9 +29,12 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Mining Neutronium Casing"); 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"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Advanced Rhodium Plated Palladium Machine Casing"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Advanced Iridium Plated Machine Casing"); + GT_LanguageManager.addStringLocalization( + 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"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Magical Machine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "HSS-S Turbine Casing"); @@ -56,26 +59,27 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { @SideOnly(Side.CLIENT) public IIcon getIcon(int aSide, int aMeta) { switch (aMeta) { - case 0: - return Textures.BlockIcons.MACHINE_CASING_CHEMICALLY_INERT.getIcon(); - case 1: - return Textures.BlockIcons.MACHINE_CASING_PIPE_POLYTETRAFLUOROETHYLENE.getIcon(); - case 2: - return Textures.BlockIcons.MACHINE_CASING_MINING_NEUTRONIUM.getIcon(); - case 3: - return Textures.BlockIcons.MACHINE_CASING_MINING_BLACKPLUTONIUM.getIcon(); - case 4: - return Textures.BlockIcons.MACHINE_CASING_EXTREME_ENGINE_INTAKE.getIcon();//changed color in a terrible way - case 5: - return Textures.BlockIcons.MACHINE_CASING_ADVANCEDRADIATIONPROOF.getIcon(); - case 6: - return Textures.BlockIcons.MACHINE_CASING_RHODIUM_PALLADIUM.getIcon(); - case 7: - return Textures.BlockIcons.MACHINE_CASING_IRIDIUM.getIcon(); - case 8: - return Textures.BlockIcons.MACHINE_CASING_MAGICAL.getIcon(); - case 9: - return Textures.BlockIcons.MACHINE_CASING_ADVANCEDGAS.getIcon(); + case 0: + return Textures.BlockIcons.MACHINE_CASING_CHEMICALLY_INERT.getIcon(); + case 1: + return Textures.BlockIcons.MACHINE_CASING_PIPE_POLYTETRAFLUOROETHYLENE.getIcon(); + case 2: + return Textures.BlockIcons.MACHINE_CASING_MINING_NEUTRONIUM.getIcon(); + case 3: + return Textures.BlockIcons.MACHINE_CASING_MINING_BLACKPLUTONIUM.getIcon(); + case 4: + return Textures.BlockIcons.MACHINE_CASING_EXTREME_ENGINE_INTAKE + .getIcon(); // changed color in a terrible way + case 5: + return Textures.BlockIcons.MACHINE_CASING_ADVANCEDRADIATIONPROOF.getIcon(); + case 6: + return Textures.BlockIcons.MACHINE_CASING_RHODIUM_PALLADIUM.getIcon(); + case 7: + return Textures.BlockIcons.MACHINE_CASING_IRIDIUM.getIcon(); + case 8: + return Textures.BlockIcons.MACHINE_CASING_MAGICAL.getIcon(); + case 9: + return Textures.BlockIcons.MACHINE_CASING_ADVANCEDGAS.getIcon(); } return Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); } @@ -84,18 +88,30 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { public IIcon getTurbineCasing(int meta, int iconIndex, boolean active) { switch (meta) { case 9: - return active ? Textures.BlockIcons.TURBINE_ADVGASACTIVE[iconIndex].getIcon() : Textures.BlockIcons.TURBINEADVGAS[iconIndex].getIcon(); + return active + ? Textures.BlockIcons.TURBINE_ADVGASACTIVE[iconIndex].getIcon() + : Textures.BlockIcons.TURBINEADVGAS[iconIndex].getIcon(); default: - return active ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() : Textures.BlockIcons.TURBINE[iconIndex].getIcon(); + return active + ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() + : Textures.BlockI |
