diff options
Diffstat (limited to 'src/main/java/gregtech/common/blocks')
43 files changed, 5105 insertions, 0 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 new file mode 100644 index 0000000000..897011eba9 --- /dev/null +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java @@ -0,0 +1,108 @@ +package gregtech.common.blocks; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +import gregtech.api.util.GT_LanguageManager; + +/** + * The casings are split into separate files because they are registered as regular blocks, and a regular block can have + * 16 subtypes at most. + */ +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] - + * TecTech Textures.BlockIcons.casingTexturePages[8][0-127] - TecTech + */ + public GT_Block_Casings1() { + super(GT_Item_Casings1.class, "gt.blockcasings", GT_Material_Casings.INSTANCE, 16); + + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "ULV Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "LV Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "MV Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "HV Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "EV Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "IV Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "LuV Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "ZPM Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "UV Machine Casing"); + 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() + ".13.name", "Dimensional Injection Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Dimensional Bridge"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Superconducting Coil Block"); + ItemList.Casing_ULV.set(new ItemStack(this, 1, 0)); + ItemList.Casing_LV.set(new ItemStack(this, 1, 1)); + ItemList.Casing_MV.set(new ItemStack(this, 1, 2)); + ItemList.Casing_HV.set(new ItemStack(this, 1, 3)); + ItemList.Casing_EV.set(new ItemStack(this, 1, 4)); + ItemList.Casing_IV.set(new ItemStack(this, 1, 5)); + ItemList.Casing_LuV.set(new ItemStack(this, 1, 6)); + ItemList.Casing_ZPM.set(new ItemStack(this, 1, 7)); + ItemList.Casing_UV.set(new ItemStack(this, 1, 8)); + ItemList.Casing_MAX.set(new ItemStack(this, 1, 9)); + ItemList.Casing_BronzePlatedBricks.set(new ItemStack(this, 1, 10)); + ItemList.Casing_HeatProof.set(new ItemStack(this, 1, 11)); + ItemList.Casing_Dim_Trans.set(new ItemStack(this, 1, 12)); + ItemList.Casing_Dim_Injector.set(new ItemStack(this, 1, 13)); + ItemList.Casing_Dim_Bridge.set(new ItemStack(this, 1, 14)); + ItemList.Casing_Coil_Superconductor.set(new ItemStack(this, 1, 15)); + } + + @Override + public int getTextureIndex(int aMeta) { + return aMeta; + } + + @Override + public IIcon getIcon(int ordinalSide, int aMeta) { + if ((aMeta >= 0) && (aMeta < 16)) { + switch (aMeta) { + case 10 -> { + return Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS.getIcon(); + } + case 11 -> { + return Textures.BlockIcons.MACHINE_HEATPROOFCASING.getIcon(); + } + case 12 -> { + return Textures.BlockIcons.MACHINE_DIM_TRANS_CASING.getIcon(); + } + case 13 -> { + return Textures.BlockIcons.MACHINE_DIM_INJECTOR.getIcon(); + } + case 14 -> { + return Textures.BlockIcons.MACHINE_DIM_BRIDGE.getIcon(); + } + case 15 -> { + return Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR.getIcon(); + } + } + if (ordinalSide == 0) { + return Textures.BlockIcons.MACHINECASINGS_BOTTOM[aMeta].getIcon(); + } + if (ordinalSide == 1) { + return Textures.BlockIcons.MACHINECASINGS_TOP[aMeta].getIcon(); + } + return Textures.BlockIcons.MACHINECASINGS_SIDE[aMeta].getIcon(); + } + return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + } + + @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]; + } +} diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java new file mode 100644 index 0000000000..f1fbc30236 --- /dev/null +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java @@ -0,0 +1,102 @@ +package gregtech.common.blocks; + +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +import gregtech.api.enums.Dyes; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.GT_LanguageManager; + +/** + * The casings are split into separate files because they are registered as regular blocks, and a regular block can have + * 16 subtypes at most. + */ +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); + + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Solid Steel Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Frost Proof Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Bronze Gear Box Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Steel Gear Box Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Titanium Gear Box Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Assembling Line Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Processor Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Data Drive Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Containment Field Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Assembler Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Pump Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Motor Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Bronze Pipe Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Steel Pipe Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Titanium Pipe Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Tungstensteel Pipe Casing"); + ItemList.Casing_SolidSteel.set(new ItemStack(this, 1, 0)); + ItemList.Casing_FrostProof.set(new ItemStack(this, 1, 1)); + ItemList.Casing_Gearbox_Bronze.set(new ItemStack(this, 1, 2)); + ItemList.Casing_Gearbox_Steel.set(new ItemStack(this, 1, 3)); + ItemList.Casing_Gearbox_Titanium.set(new ItemStack(this, 1, 4)); + ItemList.Casing_Gearbox_TungstenSteel.set(new ItemStack(this, 1, 5)); + ItemList.Casing_Processor.set(new ItemStack(this, 1, 6)); + ItemList.Casing_DataDrive.set(new ItemStack(this, 1, 7)); + ItemList.Casing_ContainmentField.set(new ItemStack(this, 1, 8)); + ItemList.Casing_Assembler.set(new ItemStack(this, 1, 9)); + ItemList.Casing_Pump.set(new ItemStack(this, 1, 10)); + ItemList.Casing_Motor.set(new ItemStack(this, 1, 11)); + ItemList.Casing_Pipe_Bronze.set(new ItemStack(this, 1, 12)); + ItemList.Casing_Pipe_Steel.set(new ItemStack(this, 1, 13)); + ItemList.Casing_Pipe_Titanium.set(new ItemStack(this, 1, 14)); + ItemList.Casing_Pipe_TungstenSteel.set(new ItemStack(this, 1, 15)); + } + + @Override + public int getTextureIndex(int aMeta) { + return aMeta == 6 ? ((1 << 7) + 96) : aMeta + 16; + } + + @Override + public IIcon getIcon(int ordinalSide, int aMeta) { + return switch (aMeta) { + case 0 -> Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + case 1 -> Textures.BlockIcons.MACHINE_CASING_FROST_PROOF.getIcon(); + case 2 -> Textures.BlockIcons.MACHINE_CASING_GEARBOX_BRONZE.getIcon(); + case 3 -> Textures.BlockIcons.MACHINE_CASING_GEARBOX_STEEL.getIcon(); + case 4 -> Textures.BlockIcons.MACHINE_CASING_GEARBOX_TITANIUM.getIcon(); + case 5 -> Textures.BlockIcons.MACHINE_CASING_GEARBOX_TUNGSTENSTEEL.getIcon(); + case 6 -> Textures.BlockIcons.MACHINE_CASING_PROCESSOR.getIcon(); + case 7 -> Textures.BlockIcons.MACHINE_CASING_DATA_DRIVE.getIcon(); + case 8 -> Textures.BlockIcons.MACHINE_CASING_CONTAINMENT_FIELD.getIcon(); + case 9 -> Textures.BlockIcons.MACHINE_CASING_ASSEMBLER.getIcon(); + case 10 -> Textures.BlockIcons.MACHINE_CASING_PUMP.getIcon(); + case 11 -> Textures.BlockIcons.MACHINE_CASING_MOTOR.getIcon(); + case 12 -> Textures.BlockIcons.MACHINE_CASING_PIPE_BRONZE.getIcon(); + case 13 -> Textures.BlockIcons.MACHINE_CASING_PIPE_STEEL.getIcon(); + case 14 -> Textures.BlockIcons.MACHINE_CASING_PIPE_TITANIUM.getIcon(); + case 15 -> Textures.BlockIcons.MACHINE_CASING_PIPE_TUNGSTENSTEEL.getIcon(); + default -> Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + }; + } + + @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); + } +} diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java new file mode 100644 index 0000000000..ada77814c8 --- /dev/null +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java @@ -0,0 +1,82 @@ +package gregtech.common.blocks; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +import gregtech.api.util.GT_LanguageManager; + +/** + * The casings are split into separate files because they are registered as regular blocks, and a regular block can have + * 16 subtypes at most. + */ +public class GT_Block_Casings3 extends GT_Block_Casings_Abstract { + + public GT_Block_Casings3() { + super(GT_Item_Casings3.class, "gt.blockcasings3", GT_Material_Casings.INSTANCE, 16); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Yellow Stripes Block"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Yellow Stripes Block"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Radioactive Hazard Sign Block"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Bio Hazard Sign Block"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Explosion Hazard Sign Block"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Fire Hazard Sign Block"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Acid Hazard Sign Block"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Magic Hazard Sign Block"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Frost Hazard Sign Block"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Noise Hazard Sign Block"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Grate Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Filter Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Radiation Proof Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Bronze Firebox Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Steel Firebox Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Tungstensteel Firebox Casing"); + ItemList.Casing_Stripes_A.set(new ItemStack(this, 1, 0)); + ItemList.Casing_Stripes_B.set(new ItemStack(this, 1, 1)); + ItemList.Casing_RadioactiveHazard.set(new ItemStack(this, 1, 2)); + ItemList.Casing_BioHazard.set(new ItemStack(this, 1, 3)); + ItemList.Casing_ExplosionHazard.set(new ItemStack(this, 1, 4)); + ItemList.Casing_FireHazard.set(new ItemStack(this, 1, 5)); + ItemList.Casing_AcidHazard.set(new ItemStack(this, 1, 6)); + ItemList.Casing_MagicHazard.set(new ItemStack(this, 1, 7)); + ItemList.Casing_FrostHazard.set(new ItemStack(this, 1, 8)); + ItemList.Casing_NoiseHazard.set(new ItemStack(this, 1, 9)); + ItemList.Casing_Grate.set(new ItemStack(this, 1, 10)); + ItemList.Casing_Vent.set(new ItemStack(this, 1, 11)); + ItemList.Casing_RadiationProof.set(new ItemStack(this, 1, 12)); + ItemList.Casing_Firebox_Bronze.set(new ItemStack(this, 1, 13)); + ItemList.Casing_Firebox_Steel.set(new ItemStack(this, 1, 14)); + ItemList.Casing_Firebox_TungstenSteel.set(new ItemStack(this, 1, 15)); + } + + @Override + public int getTextureIndex(int aMeta) { + return aMeta + 32; + } + + @Override + public IIcon getIcon(int ordinalSide, int aMeta) { + return switch (aMeta) { + case 0 -> Textures.BlockIcons.MACHINE_CASING_STRIPES_A.getIcon(); + case 1 -> Textures.BlockIcons.MACHINE_CASING_STRIPES_B.getIcon(); + case 2 -> Textures.BlockIcons.MACHINE_CASING_RADIOACTIVEHAZARD.getIcon(); + case 3 -> Textures.BlockIcons.MACHINE_CASING_BIOHAZARD.getIcon(); + case 4 -> Textures.BlockIcons.MACHINE_CASING_EXPLOSIONHAZARD.getIcon(); + case 5 -> Textures.BlockIcons.MACHINE_CASING_FIREHAZARD.getIcon(); + case 6 -> Textures.BlockIcons.MACHINE_CASING_ACIDHAZARD.getIcon(); + case 7 -> Textures.BlockIcons.MACHINE_CASING_MAGICHAZARD.getIcon(); + case 8 -> Textures.BlockIcons.MACHINE_CASING_FROSTHAZARD.getIcon(); + case 9 -> Textures.BlockIcons.MACHINE_CASING_NOISEHAZARD.getIcon(); + case 10 -> Textures.BlockIcons.MACHINE_CASING_GRATE.getIcon(); + case 11 -> Textures.BlockIcons.MACHINE_CASING_VENT.getIcon(); + case 12 -> Textures.BlockIcons.MACHINE_CASING_RADIATIONPROOF.getIcon(); + case 13 -> ordinalSide > 1 ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_BRONZE.getIcon() + : Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS.getIcon(); + case 14 -> ordinalSide > 1 ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_STEEL.getIcon() + : Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + case 15 -> ordinalSide > 1 ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_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 new file mode 100644 index 0000000000..49c9c6c992 --- /dev/null +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java @@ -0,0 +1,250 @@ +package gregtech.common.blocks; + +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.GT_Mod; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_RenderingWorld; +import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeTurbine; + +/** + * The casings are split into separate files because they are registered as regular blocks, and a regular block can have + * 16 subtypes at most. + */ +public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { + + /** + * This mapping is used to look up which texture should be used to render the connected texture for fusion casings. + * <p> + * This mapping is computed from that giant if ladder from #getIcon in commit + * da3421547afadc49938b5b6a7f9a9679afa1d570 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 }, }; + + 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() + ".2.name", "Stable Titanium Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Titanium Firebox 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"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Turbine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Stainless Steel Turbine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Titanium Turbine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Tungstensteel Turbine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Engine Intake Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Mining Osmiridium Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Firebricks"); + + ItemList.Casing_RobustTungstenSteel.set(new ItemStack(this, 1, 0)); + ItemList.Casing_CleanStainlessSteel.set(new ItemStack(this, 1, 1)); + ItemList.Casing_StableTitanium.set(new ItemStack(this, 1, 2)); + ItemList.Casing_Firebox_Titanium.set(new ItemStack(this, 1, 3)); + ItemList.Casing_Fusion.set(new ItemStack(this, 1, 6)); + ItemList.Casing_Fusion_Coil.set(new ItemStack(this, 1, 7)); + ItemList.Casing_Fusion2.set(new ItemStack(this, 1, 8)); + ItemList.Casing_Turbine.set(new ItemStack(this, 1, 9)); + ItemList.Casing_Turbine1.set(new ItemStack(this, 1, 10)); + ItemList.Casing_Turbine2.set(new ItemStack(this, 1, 11)); + ItemList.Casing_Turbine3.set(new ItemStack(this, 1, 12)); + ItemList.Casing_EngineIntake.set(new ItemStack(this, 1, 13)); + ItemList.Casing_MiningOsmiridium.set(new ItemStack(this, 1, 14)); + ItemList.Casing_Firebricks.set(new ItemStack(this, 1, 15)); + + GT_Mod.gregtechproxy.mCTMBlockCache.put(this, (byte) 6, true); + GT_Mod.gregtechproxy.mCTMBlockCache.put(this, (byte) 8, true); + } + + @Override + public int getTextureIndex(int aMeta) { + return aMeta + 48; + } + + @Override + public IIcon getIcon(int ordinalSide, int aMeta) { + return switch (aMeta) { + case 0, 12 -> Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); + case 1, 10 -> Textures.BlockIcons.MACHINE_CASING_CLEAN_STAINLESSSTEEL.getIcon(); + case 2, 11 -> Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); + case 3 -> ordinalSide > 1 ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_TITANIUM.getIcon() + : Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); + case 4 -> + // Do not overwrite! + Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW.getIcon(); + case 5 -> + // Do not overwrite! + Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS.getIcon(); + case 6 -> Textures.BlockIcons.MACHINE_CASING_FUSION.getIcon(); + case 7 -> Textures.BlockIcons.MACHINE_CASING_FUSION_COIL.getIcon(); + case 8 -> Textures.BlockIcons.MACHINE_CASING_FUSION_2.getIcon(); + case 9 -> Textures.BlockIcons.MACHINE_CASING_TURBINE.getIcon(); + case 13 -> Textures.BlockIcons.MACHINE_CASING_ENGINE_INTAKE.getIcon(); + case 14 -> Textures.BlockIcons.MACHINE_CASING_MINING_OSMIRIDIUM.getIcon(); + case 15 -> Textures.BlockIcons.MACHINE_CASING_DENSEBRICKS.getIcon(); + default -> Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + }; + } + |
