From 14b9332d141ff652cf728ea16a7d44274f0e1bef Mon Sep 17 00:00:00 2001 From: Johannes Gäßler Date: Thu, 22 Jun 2017 01:50:21 +0200 Subject: Moved the Casings for the Large Chemical Reactor again. As it turns out overwriting Casings 4.4 and 4.5 was not a good idea because even though there is no actual Casing at those IDs, the textures are in use. I started a new batch of Casings (GT_Block_Casings8) at IDs 112-127. I did not use IDs 80-95 because there seem to already be some textures there. I did not use IDs 96-111 because they seem to already be in use by Technus. --- src/main/java/gregtech/api/GregTech_API.java | 2 +- .../gregtech/common/blocks/GT_Block_Casings4.java | 12 ++++---- .../gregtech/common/blocks/GT_Block_Casings8.java | 36 ++++++++++++++++++++++ .../gregtech/common/blocks/GT_Item_Casings8.java | 10 ++++++ .../GT_MetaTileEntity_LargeChemicalReactor.java | 6 ++-- .../preload/GT_Loader_Item_Block_And_Fluid.java | 1 + 6 files changed, 57 insertions(+), 10 deletions(-) create mode 100644 src/main/java/gregtech/common/blocks/GT_Block_Casings8.java create mode 100644 src/main/java/gregtech/common/blocks/GT_Item_Casings8.java (limited to 'src/main') diff --git a/src/main/java/gregtech/api/GregTech_API.java b/src/main/java/gregtech/api/GregTech_API.java index 6318ff936d..b5b38c6c23 100644 --- a/src/main/java/gregtech/api/GregTech_API.java +++ b/src/main/java/gregtech/api/GregTech_API.java @@ -181,7 +181,7 @@ public class GregTech_API { public static Block sBlockOres1, sBlockOresUb1, sBlockOresUb2, sBlockOresUb3, sBlockOresGC, sBlockGem, sBlockMetal1, sBlockMetal2, sBlockMetal3, sBlockMetal4, sBlockMetal5, sBlockMetal6, sBlockMetal7, sBlockMetal8, sBlockGem1, sBlockGem2, sBlockGem3, sBlockReinforced; public static Block sBlockGranites, sBlockConcretes, sBlockStones; - public static Block sBlockCasings1, sBlockCasings2, sBlockCasings3, sBlockCasings4, sBlockCasings5; + public static Block sBlockCasings1, sBlockCasings2, sBlockCasings3, sBlockCasings4, sBlockCasings5, sBlockCasings8; /** * Getting assigned by the Config */ 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 81daf2c04a..d5930907a5 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java @@ -27,8 +27,8 @@ public class GT_Block_Casings4 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", "Chemically Inert Machine Casing"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "PTFE Pipe Machine 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"); @@ -43,8 +43,6 @@ public class GT_Block_Casings4 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_Chemically_Inert.set(new ItemStack(this, 1, 4)); - ItemList.Casing_Pipe_Polytetrafluoroethylene.set(new ItemStack(this, 1, 5)); 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)); @@ -67,9 +65,11 @@ public class GT_Block_Casings4 case 3: return aSide > 1 ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_TITANIUM.getIcon() : Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); case 4: - return Textures.BlockIcons.MACHINE_CASING_CHEMICALLY_INERT.getIcon(); + //Do not overwrite! + return Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW.getIcon(); case 5: - return Textures.BlockIcons.MACHINE_CASING_PIPE_POLYTETRAFLUOROETHYLENE.getIcon(); + //Do not overwrite! + return Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS.getIcon(); case 6: return Textures.BlockIcons.MACHINE_CASING_FUSION.getIcon(); case 7: diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java new file mode 100644 index 0000000000..b70ece17a9 --- /dev/null +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java @@ -0,0 +1,36 @@ +package gregtech.common.blocks; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.util.GT_LanguageManager; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +public class GT_Block_Casings8 + extends GT_Block_Casings_Abstract { + public GT_Block_Casings8() { + super(GT_Item_Casings8.class, "gt.blockcasings8", GT_Material_Casings.INSTANCE); + for (int i = 0; i < 16; i = (i + 1)) { + Textures.BlockIcons.CASING_BLOCKS[(i + 112)] = new GT_CopiedBlockTexture(this, 6, i); + } + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Chemically Inert Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "PTFE Pipe Machine Casing"); + + ItemList.Casing_Chemically_Inert.set(new ItemStack(this, 1, 0)); + ItemList.Casing_Pipe_Polytetrafluoroethylene.set(new ItemStack(this, 1, 1)); + } + @Override + @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(); + } + return Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); + } +} diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings8.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings8.java new file mode 100644 index 0000000000..66498a0481 --- /dev/null +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings8.java @@ -0,0 +1,10 @@ +package gregtech.common.blocks; + +import net.minecraft.block.Block; + +public class GT_Item_Casings8 + extends GT_Item_Casings_Abstract { + public GT_Item_Casings8(Block par1) { + super(par1); + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java index 1a7b444b54..f75d723786 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java @@ -20,7 +20,7 @@ import net.minecraftforge.fluids.FluidStack; public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_MultiBlockBase { - private static final int CASING_INDEX = 52; + private static final int CASING_INDEX = 112; public GT_MetaTileEntity_LargeChemicalReactor(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -154,14 +154,14 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu if ((y == -1) && (block != GregTech_API.sBlockCasings5 || aBaseMetaTileEntity.getMetaIDOffset(x, y, z) != 0)) { return false; - } else if (y == 0 && (block != GregTech_API.sBlockCasings4 || aBaseMetaTileEntity.getMetaIDOffset(x, y, z) != 5)) { + } else if (y == 0 && (block != GregTech_API.sBlockCasings8 || aBaseMetaTileEntity.getMetaIDOffset(x, y, z) != 1)) { return false; } } else if (x != 0 || y != 0 || z != 0) { if (!addInputToMachineList(tileEntity, CASING_INDEX) && !addOutputToMachineList(tileEntity, CASING_INDEX) && !addMaintenanceToMachineList(tileEntity, CASING_INDEX) && !addEnergyInputToMachineList(tileEntity, CASING_INDEX)) { - if (block == GregTech_API.sBlockCasings4 && aBaseMetaTileEntity.getMetaIDOffset(x, y, z) == 4) { + if (block == GregTech_API.sBlockCasings8 && aBaseMetaTileEntity.getMetaIDOffset(x, y, z) == 0) { casingAmount++; } else { return false; diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java index 19c1a5fbd4..67f27f4389 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java @@ -153,6 +153,7 @@ public class GT_Loader_Item_Block_And_Fluid GregTech_API.sBlockCasings3 = new GT_Block_Casings3(); GregTech_API.sBlockCasings4 = new GT_Block_Casings4(); GregTech_API.sBlockCasings5 = new GT_Block_Casings5(); + GregTech_API.sBlockCasings8 = new GT_Block_Casings8(); GregTech_API.sBlockGranites = new GT_Block_Granites(); GregTech_API.sBlockConcretes = new GT_Block_Concretes(); GregTech_API.sBlockStones = new GT_Block_Stones(); -- cgit