aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java56
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java51
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java68
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler6.java17
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java15
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java15
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java4
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java4
8 files changed, 107 insertions, 123 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java
index ec1ee2a226..3409277f91 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java
@@ -13,57 +13,39 @@ public class CasingTextureHandler {
public static IIcon getIcon(final int ordinalSide, final int aMeta) { // Texture ID's. case 0 == ID[57]
if ((aMeta >= 0) && (aMeta < 16)) {
- switch (aMeta) {
+ return switch (aMeta) {
// Centrifuge
- case 0:
- return TexturesGtBlock.Casing_Material_Centrifuge.getIcon();
+ case 0 -> TexturesGtBlock.Casing_Material_Centrifuge.getIcon();
// Coke Oven Frame
- case 1:
- return TexturesGtBlock.Casing_Material_Tantalloy61.getIcon();
+ case 1 -> TexturesGtBlock.Casing_Material_Tantalloy61.getIcon();
// Coke Oven Casing Tier 1
- case 2:
- return Textures.BlockIcons.MACHINE_CASING_FIREBOX_BRONZE.getIcon();
+ case 2 -> Textures.BlockIcons.MACHINE_CASING_FIREBOX_BRONZE.getIcon();
// Coke Oven Casing Tier 2
- case 3:
- return Textures.BlockIcons.MACHINE_CASING_FIREBOX_STEEL.getIcon();
+ case 3 -> Textures.BlockIcons.MACHINE_CASING_FIREBOX_STEEL.getIcon();
// Material Press Casings
- case 4:
- return Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon();
+ case 4 -> Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon();
// Electrolyzer Casings
- case 5:
- return TexturesGtBlock.Casing_Material_Potin.getIcon();
+ case 5 -> TexturesGtBlock.Casing_Material_Potin.getIcon();
// Broken Blue Fusion Casings
- case 6:
- return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon();
+ case 6 -> TexturesGtBlock.Casing_Material_MaragingSteel.getIcon();
// Maceration Stack Casings
- case 7:
- return TexturesGtBlock.Casing_Material_Tumbaga.getIcon();
+ case 7 -> TexturesGtBlock.Casing_Material_Tumbaga.getIcon();
// Broken Pink Fusion Casings
- case 8:
- return TexturesGtBlock.TEXTURE_ORGANIC_PANEL_A_GLOWING.getIcon();
+ case 8 -> TexturesGtBlock.TEXTURE_ORGANIC_PANEL_A_GLOWING.getIcon();
// Matter Fabricator Casings
- case 9:
- return TexturesGtBlock.TEXTURE_METAL_PANEL_F.getIcon();
+ case 9 -> TexturesGtBlock.TEXTURE_METAL_PANEL_F.getIcon();
// Iron Blast Fuance Textures
- case 10:
- return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon();
+ case 10 -> TexturesGtBlock.Casing_Machine_Simple_Top.getIcon();
// Multitank Exterior Casing
- case 11:
- return TexturesGtBlock.Casing_Material_Grisium.getIcon();
+ case 11 -> TexturesGtBlock.Casing_Material_Grisium.getIcon();
// Reactor Casing I
- case 12:
- return TexturesGtBlock.Casing_Material_Stellite.getIcon();
+ case 12 -> TexturesGtBlock.Casing_Material_Stellite.getIcon();
// Reactor Casing II
- case 13:
- return TexturesGtBlock.Casing_Material_Zeron100.getIcon();
- case 14:
- return TexturesGtBlock.Casing_Staballoy_Firebox.getIcon();
- case 15:
- return TexturesGtBlock.Casing_Material_ZirconiumCarbide.getIcon();
-
- default:
- return Textures.BlockIcons.MACHINE_CASING_RADIOACTIVEHAZARD.getIcon();
- }
+ case 13 -> TexturesGtBlock.Casing_Material_Zeron100.getIcon();
+ case 14 -> TexturesGtBlock.Casing_Staballoy_Firebox.getIcon();
+ case 15 -> TexturesGtBlock.Casing_Material_ZirconiumCarbide.getIcon();
+ default -> Textures.BlockIcons.MACHINE_CASING_RADIOACTIVEHAZARD.getIcon();
+ };
}
return Textures.BlockIcons.MACHINE_CASING_GEARBOX_TUNGSTENSTEEL.getIcon();
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java
index e02a9ffbd3..1da572fb35 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java
@@ -9,44 +9,61 @@ public class CasingTextureHandler2 {
public static IIcon getIcon(final int ordinalSide, final int aMeta) { // Texture ID's. case 0 == ID[57]
if ((aMeta >= 0) && (aMeta < 16)) {
switch (aMeta) {
- case 0:
+ case 0 -> {
return TexturesGtBlock.Casing_Material_RedSteel.getIcon();
- case 1:
+ }
+ case 1 -> {
return TexturesGtBlock.Casing_Material_HastelloyX.getIcon();
- case 2:
+ }
+ case 2 -> {
return TexturesGtBlock.Casing_Material_HastelloyN.getIcon();
- case 3:
+ }
+ case 3 -> {
return TexturesGtBlock.Casing_Material_Fluid_IncoloyDS.getIcon();
- case 4:
+ }
+ case 4 -> {
return TexturesGtBlock.Casing_Material_Grisium.getIcon();
- case 5:
+ }
+ case 5 -> {
return TexturesGtBlock.Casing_Machine_Metal_Panel_A.getIcon();
- case 6:
+ }
+ case 6 -> {
return TexturesGtBlock.Casing_Machine_Metal_Grate_A.getIcon();
- case 7:
+ }
+ case 7 -> {
return TexturesGtBlock.Casing_Redox_1.getIcon();
- case 8:
+ }
+ case 8 -> {
return TexturesGtBlock.Casing_Machine_Metal_Sheet_A.getIcon();
- case 9:
+ }
+ case 9 -> {
return TexturesGtBlock.Overlay_Machine_Cyber_A.getIcon();
- case 10:
+ }
+ case 10 -> {
return Textures.BlockIcons.MACHINE_CASING_RADIATIONPROOF.getIcon();
- case 11:
+ }
+ case 11 -> {
return TexturesGtBlock.Casing_Material_Tantalloy61.getIcon();
- case 12:
+ }
+ case 12 -> {
return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon();
- case 13:
+ }
+ case 13 -> {
if (ordinalSide < 2) {
return TexturesGtBlock.TEXTURE_TECH_A.getIcon();
} else {
return TexturesGtBlock.TEXTURE_TECH_B.getIcon();
}
- case 14:
+ }
+ case 14 -> {
return Textures.BlockIcons.RENDERING_ERROR.getIcon();
- case 15:
+ }
+ case 15 -> {
return TexturesGtBlock.Casing_Machine_Acacia_Log.getIcon();
- default:
+ }
+ default -> {
return TexturesGtBlock.Overlay_UU_Matter.getIcon();
+ }
}
}
return TexturesGtBlock._PlaceHolder.getIcon();
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java
index 9ffbbd6a85..6b2627ec39 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java
@@ -8,55 +8,49 @@ public class CasingTextureHandler3 {
public static IIcon getIcon(final int ordinalSide, final int aMeta) { // Texture ID's. case 0 == ID[57]
if ((aMeta >= 0) && (aMeta < 16)) {
- switch (aMeta) {
- case 0:
+ return switch (aMeta) {
+ case 0 ->
// Aquatic Casing
- return TexturesGtBlock.TEXTURE_METAL_PANEL_B.getIcon();
- case 1:
+ TexturesGtBlock.TEXTURE_METAL_PANEL_B.getIcon();
+ case 1 ->
// Inconel Reinforced Casing
- return TexturesGtBlock.TEXTURE_METAL_PANEL_D.getIcon();
- case 2:
+ TexturesGtBlock.TEXTURE_METAL_PANEL_D.getIcon();
+ case 2 ->
// Multi-Use Casing
- return TexturesGtBlock.TEXTURE_METAL_PANEL_C.getIcon();
- case 3:
+ TexturesGtBlock.TEXTURE_METAL_PANEL_C.getIcon();
+ case 3 ->
// Trinium Plated Mining Platform Casing
- return TexturesGtBlock.Casing_Trinium_Naquadah_Vent.getIcon();
- case 4:
+ TexturesGtBlock.Casing_Trinium_Naquadah_Vent.getIcon();
+ case 4 ->
// Vanadium Redox IV
- return TexturesGtBlock.Casing_Redox_2.getIcon();
- case 5:
+ TexturesGtBlock.Casing_Redox_2.getIcon();
+ case 5 ->
// Vanadium Redox LuV
- return TexturesGtBlock.Casing_Redox_3.getIcon();
- case 6:
+ TexturesGtBlock.Casing_Redox_3.getIcon();
+ case 6 ->
// Vanadium Redox ZPM
- return TexturesGtBlock.Casing_Redox_4.getIcon();
- case 7:
+ TexturesGtBlock.Casing_Redox_4.getIcon();
+ case 7 ->
// Vanadium Redox UV
- return TexturesGtBlock.Casing_Redox_5.getIcon();
- case 8:
+ TexturesGtBlock.Casing_Redox_5.getIcon();
+ case 8 ->
// Vanadium Redox MAX
- return TexturesGtBlock.Casing_Redox_6.getIcon();
- case 9:
+ TexturesGtBlock.Casing_Redox_6.getIcon();
+ case 9 ->
// Amazon Warehouse Casing
- return TexturesGtBlock.TEXTURE_CASING_AMAZON.getIcon();
- case 10:
+ TexturesGtBlock.TEXTURE_CASING_AMAZON.getIcon();
+ case 10 ->
// Adv. Vac. Freezer
- return TexturesGtBlock.TEXTURE_CASING_ADVANCED_CRYOGENIC.getIcon();
- case 11:
+ TexturesGtBlock.TEXTURE_CASING_ADVANCED_CRYOGENIC.getIcon();
+ case 11 ->
// Adv. EBF
- return TexturesGtBlock.TEXTURE_CASING_ADVANCED_VOLCNUS.getIcon();
- case 12:
- return TexturesGtBlock.TEXTURE_CASING_FUSION_COIL_II.getIcon();
- case 13:
- return TexturesGtBlock.TEXTURE_CASING_FUSION_COIL_II_INNER.getIcon();
- case 14:
- return TexturesGtBlock.TEXTURE_CASING_FUSION_CASING_ULTRA.getIcon();
- case 15:
- return TexturesGtBlock.TEXTURE_MAGIC_PANEL_A.getIcon();
-
- default:
- return TexturesGtBlock._PlaceHolder.getIcon();
- }
+ TexturesGtBlock.TEXTURE_CASING_ADVANCED_VOLCNUS.getIcon();
+ case 12 -> TexturesGtBlock.TEXTURE_CASING_FUSION_COIL_II.getIcon();
+ case 13 -> TexturesGtBlock.TEXTURE_CASING_FUSION_COIL_II_INNER.getIcon();
+ case 14 -> TexturesGtBlock.TEXTURE_CASING_FUSION_CASING_ULTRA.getIcon();
+ case 15 -> TexturesGtBlock.TEXTURE_MAGIC_PANEL_A.getIcon();
+ default -> TexturesGtBlock._PlaceHolder.getIcon();
+ };
}
return TexturesGtBlock._PlaceHolder.getIcon();
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler6.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler6.java
index e33099b09a..b8d5a024df 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler6.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler6.java
@@ -8,17 +8,12 @@ public class CasingTextureHandler6 {
public static IIcon getIcon(final int ordinalSide, final int aMeta) { // Texture ID's. case 0 == ID[57]
if ((aMeta >= 0) && (aMeta < 16)) {
- switch (aMeta) {
- case 0:
- return TexturesGtBlock.TEXTURE_CASING_FUSION_COIL_III.getIcon();
- case 1:
- return TexturesGtBlock.TEXTURE_CASING_FUSION_COIL_III_INNER.getIcon();
- case 2:
- return TexturesGtBlock.TEXTURE_CASING_FUSION_CASING_HYPER.getIcon();
- default:
- return TexturesGtBlock._PlaceHolder.getIcon();
-
- }
+ return switch (aMeta) {
+ case 0 -> TexturesGtBlock.TEXTURE_CASING_FUSION_COIL_III.getIcon();
+ case 1 -> TexturesGtBlock.TEXTURE_CASING_FUSION_COIL_III_INNER.getIcon();
+ case 2 -> TexturesGtBlock.TEXTURE_CASING_FUSION_CASING_HYPER.getIcon();
+ default -> TexturesGtBlock._PlaceHolder.getIcon();
+ };
}
return TexturesGtBlock._PlaceHolder.getIcon();
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java
index 8ad5bd914d..f4d0ec0608 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java
@@ -66,8 +66,7 @@ public class TexturesCentrifugeMultiblock {
private static int isCentrifugeControllerWithSide(IBlockAccess aWorld, int aX, int aY, int aZ,
ForgeDirection side) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
- if (!(tTileEntity instanceof IGregTechTileEntity)) return 0;
- IGregTechTileEntity tTile = (IGregTechTileEntity) tTileEntity;
+ if (!(tTileEntity instanceof IGregTechTileEntity tTile)) return 0;
if (tTile.getMetaTileEntity() instanceof GregtechMetaTileEntity_IndustrialCentrifuge
&& tTile.getFrontFacing() == side)
return tTile.isActive() ? 1 : 2;
@@ -84,7 +83,7 @@ public class TexturesCentrifugeMultiblock {
int tInvertLeftRightMod = ordinalSide % 2 * 2 - 1;
switch (ordinalSide / 2) {
- case 0:
+ case 0 -> {
for (int i = -1; i < 2; i++) {
for (int j = -1; j < 2; j++) {
if (i == 0 && j == 0) continue;
@@ -95,8 +94,8 @@ public class TexturesCentrifugeMultiblock {
}
}
}
- break;
- case 1:
+ }
+ case 1 -> {
for (int i = -1; i < 2; i++) {
for (int j = -1; j < 2; j++) {
if (i == 0 && j == 0) continue;
@@ -107,8 +106,8 @@ public class TexturesCentrifugeMultiblock {
}
}
}
- break;
- case 2:
+ }
+ case 2 -> {
for (int i = -1; i < 2; i++) {
for (int j = -1; j < 2; j++) {
if (i == 0 && j == 0) continue;
@@ -119,7 +118,7 @@ public class TexturesCentrifugeMultiblock {
}
}
}
- break;
+ }
}
return TexturesGtBlock.Casing_Material_Centrifuge.getIcon();
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java
index f042b88370..fab36fbcea 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java
@@ -60,8 +60,7 @@ public class TexturesGrinderMultiblock {
private static int isIsaControllerWithSide(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection side) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
- if (!(tTileEntity instanceof IGregTechTileEntity)) return 0;
- IGregTechTileEntity tTile = (IGregTechTileEntity) tTileEntity;
+ if (!(tTileEntity instanceof IGregTechTileEntity tTile)) return 0;
if (tTile.getMetaTileEntity() instanceof GregtechMetaTileEntity_IsaMill && tTile.getFrontFacing() == side)
return tTile.isActive() ? 1 : 2;
return 0;
@@ -76,7 +75,7 @@ public class TexturesGrinderMultiblock {
}
int tInvertLeftRightMod = ordinalSide % 2 * 2 - 1;
switch (ordinalSide / 2) {
- case 0:
+ case 0 -> {
for (int i = -1; i < 2; i++) {
for (int j = -1; j < 2; j++) {
if (i == 0 && j == 0) continue;
@@ -87,8 +86,8 @@ public class TexturesGrinderMultiblock {
}
}
}
- break;
- case 1:
+ }
+ case 1 -> {
for (int i = -1; i < 2; i++) {
for (int j = -1; j < 2; j++) {
if (i == 0 && j == 0) continue;
@@ -99,8 +98,8 @@ public class TexturesGrinderMultiblock {
}
}
}
- break;
- case 2:
+ }
+ case 2 -> {
for (int i = -1; i < 2; i++) {
for (int j = -1; j < 2; j++) {
if (i == 0 && j == 0) continue;
@@ -111,7 +110,7 @@ public class TexturesGrinderMultiblock {
}
}
}
- break;
+ }
}
return TexturesGtBlock.TEXTURE_CASING_GRINDING_MILL.getIcon();
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
index cac8aa742f..3d71f00514 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
@@ -19,7 +19,7 @@ public class TexturesGtBlock {
private static boolean mAnimated = CORE.ConfigSwitches.enableAnimatedTextures;
- private static AutoMap<Runnable> mCustomiconMap = new AutoMap<Runnable>();
+ private static AutoMap<Runnable> mCustomiconMap = new AutoMap<>();
static {}
@@ -276,8 +276,6 @@ public class TexturesGtBlock {
public static final CustomIcon Casing_Redox_4 = new CustomIcon("redox/redox4");
public static final CustomIcon Casing_Redox_5 = new CustomIcon("redox/redox5");
public static final CustomIcon Casing_Redox_6 = new CustomIcon("redox/redox6");
- // public static final CustomIcon Casing_Redox_7 = new CustomIcon("redox/redox7");
- // public static final CustomIcon Casing_Redox_8 = new CustomIcon("redox/redox8");
// Special Block 2
public static final CustomIcon Casing_Resonance_1 = new CustomIcon("special/block_1");
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java
index dfb519a445..7400bb987c 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java
@@ -19,8 +19,8 @@ public final class TexturesGtTools {
public static final class CustomIcon implements IIconContainer, Runnable {
- protected IIcon mIcon, mOverlay;
- protected final String mIconName;
+ private IIcon mIcon, mOverlay;
+ private final String mIconName;
public CustomIcon(final String aIconName) {
this.mIconName = aIconName;