From ce1e6917e056c0a1300caefc175b10c68126832a Mon Sep 17 00:00:00 2001 From: OneEyeMaker Date: Mon, 18 Jul 2016 09:06:26 +0300 Subject: [PATCH] Preparations for moving all heating coils to another block. --- src/main/java/gregtech/api/GregTech_API.java | 4 +-- .../java/gregtech/api/enums/ItemList.java | 3 +- .../common/blocks/GT_Block_Casings4.java | 8 ++--- .../common/blocks/GT_Block_Casings5.java | 36 +++++++++++++++++++ .../common/blocks/GT_Item_Casings4.java | 15 -------- .../common/blocks/GT_Item_Casings5.java | 29 +++++++++++++++ ...T_MetaTileEntity_ElectricBlastFurnace.java | 17 +++++---- .../multi/GT_MetaTileEntity_MultiFurnace.java | 15 ++++---- .../GT_Loader_Item_Block_And_Fluid.java | 1 + 9 files changed, 91 insertions(+), 37 deletions(-) create mode 100644 src/main/java/gregtech/common/blocks/GT_Block_Casings5.java create mode 100644 src/main/java/gregtech/common/blocks/GT_Item_Casings5.java diff --git a/src/main/java/gregtech/api/GregTech_API.java b/src/main/java/gregtech/api/GregTech_API.java index d38b1c72..b342a9cb 100644 --- a/src/main/java/gregtech/api/GregTech_API.java +++ b/src/main/java/gregtech/api/GregTech_API.java @@ -177,7 +177,7 @@ public class GregTech_API { public static Block sBlockMachines; public static Block sBlockOres1, sBlockGem, sBlockMetal1, sBlockMetal2, sBlockMetal3, sBlockMetal4, sBlockMetal5, sBlockMetal6, sBlockMetal7, sBlockMetal8, sBlockGem1, sBlockGem2, sBlockGem3, sBlockReinforced; public static Block sBlockGranites, sBlockConcretes; - public static Block sBlockCasings1, sBlockCasings2, sBlockCasings3, sBlockCasings4; + public static Block sBlockCasings1, sBlockCasings2, sBlockCasings3, sBlockCasings4, sBlockCasings5; /** * Getting assigned by the Config */ @@ -592,4 +592,4 @@ public class GregTech_API { sToolList.add(new GT_ItemStack(GT_Utility.copyAmount(1, aTool))); return true; } -} \ No newline at end of file +} diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java index 7872d880..41caf83d 100644 --- a/src/main/java/gregtech/api/enums/ItemList.java +++ b/src/main/java/gregtech/api/enums/ItemList.java @@ -533,7 +533,7 @@ public enum ItemList implements IItemContainer { Transformer_LV_ULV, Transformer_MV_LV, Transformer_HV_MV, Transformer_EV_HV, Transformer_IV_EV, Transformer_LuV_IV, Transformer_ZPM_LuV, Transformer_UV_ZPM, Transformer_MAX_UV, - Casing_ULV, Casing_LV, Casing_MV, Casing_HV, Casing_EV, Casing_IV, Casing_LuV, Casing_ZPM, Casing_UV, Casing_MAX, Casing_BronzePlatedBricks, Casing_HeatProof, Casing_Coil_Cupronickel, Casing_Coil_Kanthal, Casing_Coil_Nichrome, Casing_Coil_TungstenSteel, Casing_Coil_NaquadahAlloy, Casing_Coil_Superconductor, + Casing_ULV, Casing_LV, Casing_MV, Casing_HV, Casing_EV, Casing_IV, Casing_LuV, Casing_ZPM, Casing_UV, Casing_MAX, Casing_BronzePlatedBricks, Casing_HeatProof, Casing_Coil_Cupronickel, Casing_Coil_Kanthal, Casing_Coil_Nichrome, Casing_Coil_Superconductor, Casing_SolidSteel, Casing_FrostProof, Casing_Gearbox_Bronze, Casing_Gearbox_Steel, Casing_Gearbox_Titanium, Casing_Gearbox_TungstenSteel, Casing_Processor, Casing_DataDrive, Casing_ContainmentField, Casing_Assembler, Casing_Pump, Casing_Motor, Casing_Pipe_Bronze, Casing_Pipe_Steel, Casing_Pipe_Titanium, Casing_Pipe_TungstenSteel, Casing_Stripes_A, Casing_Stripes_B, Casing_RadioactiveHazard, Casing_BioHazard, Casing_ExplosionHazard, Casing_FireHazard, Casing_AcidHazard, Casing_MagicHazard, Casing_FrostHazard, Casing_NoiseHazard, Casing_Grate, Casing_Vent, Casing_RadiationProof, Casing_Firebox_Bronze, Casing_Firebox_Steel, Casing_Firebox_TungstenSteel, Casing_RobustTungstenSteel, Casing_CleanStainlessSteel, Casing_StableTitanium, Casing_Firebox_Titanium, @@ -629,6 +629,7 @@ public enum ItemList implements IItemContainer { Ingot_Heavy1, Ingot_Heavy2, Ingot_Heavy3, Pump_LV, Pump_MV, Pump_HV, Pump_EV, Pump_IV, Pump_LuV, Pump_ZPM, Pump_UV, Teleporter, Cover_NeedsMaintainance, Casing_Turbine, Casing_Turbine1, Casing_Turbine2, Casing_Turbine3, Casing_EngineIntake, + Casing_Coil_TungstenSteel, Casing_Coil_NaquadahAlloy, MobRep_LV, MobRep_MV, MobRep_HV, MobRep_EV, MobRep_IV, MobRep_LuV, MobRep_ZPM, MobRep_UV, Cover_PlayerDetector, Machine_Multi_HeatExchanger, Block_BronzePlate, Block_IridiumTungstensteel, Block_Plascrete, Block_TungstenSteelReinforced, Honeycomb, Charcoal_Pile, Block_BrittleCharcoal, Seismic_Prospector, OilDrill, AdvancedMiner2, PyrolyseOven, OilCracker, Crop_Drop_UUMBerry, Crop_Drop_UUABerry, Empty_Board_Basic, Empty_Board_Elite, 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 8b1e4a4a..3c3535e4 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java @@ -37,8 +37,6 @@ public class GT_Block_Casings4 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", "Tungstensteel Coil Block"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Naquadah Alloy Coil Block"); ItemList.Casing_RobustTungstenSteel.set(new ItemStack(this, 1, 0)); ItemList.Casing_CleanStainlessSteel.set(new ItemStack(this, 1, 1)); @@ -52,8 +50,6 @@ public class GT_Block_Casings4 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_Coil_TungstenSteel.set(new ItemStack(this, 1, 14)); - ItemList.Casing_Coil_NaquadahAlloy.set(new ItemStack(this, 1, 15)); } public IIcon getIcon(int aSide, int aMeta) { @@ -87,9 +83,9 @@ public class GT_Block_Casings4 case 13: return Textures.BlockIcons.MACHINE_CASING_ENGINE_INTAKE.getIcon(); case 14: - return Textures.BlockIcons.MACHINE_COIL_TUNGSTENSTEEL.getIcon(); + return Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); case 15: - return Textures.BlockIcons.MACHINE_COIL_NAQUADAHALLOY.getIcon(); + return 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_Casings5.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings5.java new file mode 100644 index 00000000..bcbc9af6 --- /dev/null +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings5.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_Casings5 + extends GT_Block_Casings_Abstract { + public GT_Block_Casings5() { + super(GT_Item_Casings5.class, "gt.blockcasings5", GT_Material_Casings.INSTANCE); + for (byte i = 0; i < 16; i = (byte) (i + 1)) { + Textures.BlockIcons.CASING_BLOCKS[(i + 64)] = new GT_CopiedBlockTexture(this, 6, i); + } + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Tungstensteel Coil Block"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Naquadah Alloy Coil Block"); + + ItemList.Casing_Coil_TungstenSteel.set(new ItemStack(this, 1, 4)); + ItemList.Casing_Coil_NaquadahAlloy.set(new ItemStack(this, 1, 5)); + } + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int aSide, int aMeta) { + switch (aMeta) { + case 4: + return Textures.BlockIcons.MACHINE_COIL_TUNGSTENSTEEL.getIcon(); + case 5: + return Textures.BlockIcons.MACHINE_COIL_NAQUADAHALLOY.getIcon(); + } + return Textures.BlockIcons.MACHINE_COIL_CUPRONICKEL.getIcon(); + } +} diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings4.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings4.java index 3dcfbf3c..33447673 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings4.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings4.java @@ -1,25 +1,10 @@ package gregtech.common.blocks; -import java.util.List; - import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; public class GT_Item_Casings4 extends GT_Item_Casings_Abstract { public GT_Item_Casings4(Block par1) { super(par1); } - public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { - super.addInformation(aStack, aPlayer, aList, aF3_H); - switch (getDamage(aStack)) { - case 14: - aList.add(this.mCoil04Tooltip); - break; - case 15: - aList.add(this.mCoil05Tooltip); - break; - } - } } diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java new file mode 100644 index 00000000..8e828d12 --- /dev/null +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java @@ -0,0 +1,29 @@ +package gregtech.common.blocks; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + +public class GT_Item_Casings5 + extends GT_Item_Casings_Abstract { + public GT_Item_Casings5(Block par1) { + super(par1); + } + @Override + @SideOnly(Side.CLIENT) + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + super.addInformation(aStack, aPlayer, aList, aF3_H); + switch (getDamage(aStack)) { + case 4: + aList.add(this.mCoil04Tooltip); + break; + case 5: + aList.add(this.mCoil05Tooltip); + break; + } + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java index 0a90c00d..9fb73fb5 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java @@ -144,8 +144,14 @@ public class GT_MetaTileEntity_ElectricBlastFurnace addMufflerToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 3, zDir), 11); byte tUsedMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, 2, zDir); - boolean tUseAdvancedCoils = aBaseMetaTileEntity.getBlockOffset(xDir + 1, 2, zDir) == GregTech_API.sBlockCasings4; + boolean tUseAdvancedCoils = aBaseMetaTileEntity.getBlockOffset(xDir + 1, 2, zDir) == GregTech_API.sBlockCasings5; switch (tUsedMeta) { + case 4: + this.mHeatingCapacity = tUseAdvancedCoils ? 4500 : 0; + break; + case 5: + this.mHeatingCapacity = tUseAdvancedCoils ? 9001 : 0; + break; case 12: this.mHeatingCapacity = tUseAdvancedCoils ? 0 : 1800; break; @@ -153,10 +159,7 @@ public class GT_MetaTileEntity_ElectricBlastFurnace this.mHeatingCapacity = tUseAdvancedCoils ? 0 : 2700; break; case 14: - this.mHeatingCapacity = tUseAdvancedCoils ? 4500 : 3600; - break; - case 15: - this.mHeatingCapacity = tUseAdvancedCoils ? 9001 : 0; + this.mHeatingCapacity = tUseAdvancedCoils ? 0 : 3600; break; default: return false; @@ -168,14 +171,14 @@ public class GT_MetaTileEntity_ElectricBlastFurnace for (int j = -1; j < 2; j++) { if ((i != 0) || (j != 0)) { if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 2, zDir + j) != GregTech_API.sBlockCasings1 && !tUseAdvancedCoils || - aBaseMetaTileEntity.getBlockOffset(xDir + i, 2, zDir + j) != GregTech_API.sBlockCasings4 && tUseAdvancedCoils) { + aBaseMetaTileEntity.getBlockOffset(xDir + i, 2, zDir + j) != GregTech_API.sBlockCasings5 && tUseAdvancedCoils) { return false; } if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 2, zDir + j) != tUsedMeta) { return false; } if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 1, zDir + j) != GregTech_API.sBlockCasings1 && !tUseAdvancedCoils || - aBaseMetaTileEntity.getBlockOffset(xDir + i, 1, zDir + j) != GregTech_API.sBlockCasings4 && tUseAdvancedCoils) { + aBaseMetaTileEntity.getBlockOffset(xDir + i, 1, zDir + j) != GregTech_API.sBlockCasings5 && tUseAdvancedCoils) { return false; } if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 1, zDir + j) != tUsedMeta) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java index 49212225..21f45ac5 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java @@ -106,8 +106,14 @@ public class GT_MetaTileEntity_MultiFurnace addMufflerToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 2, zDir), 11); byte tUsedMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, 1, zDir); - boolean tUseAdvancedCoils = aBaseMetaTileEntity.getBlockOffset(xDir + 1, 1, zDir) == GregTech_API.sBlockCasings4; + boolean tUseAdvancedCoils = aBaseMetaTileEntity.getBlockOffset(xDir + 1, 1, zDir) == GregTech_API.sBlockCasings5; switch (tUsedMeta) { + case 4: + this.mLevel = tUseAdvancedCoils ? 8 : 0; + break; + case 5: + this.mLevel = tUseAdvancedCoils ? 16 : 0; + break; case 12: this.mLevel = tUseAdvancedCoils ? 0 : 1; break; @@ -115,10 +121,7 @@ public class GT_MetaTileEntity_MultiFurnace this.mLevel = tUseAdvancedCoils ? 0 : 2; break; case 14: - this.mLevel = tUseAdvancedCoils ? 8 : 4; - break; - case 15: - this.mLevel = tUseAdvancedCoils ? 16 : 0; + this.mLevel = tUseAdvancedCoils ? 0 : 4; break; default: return false; @@ -130,7 +133,7 @@ public class GT_MetaTileEntity_MultiFurnace for (int j = -1; j < 2; j++) { if ((i != 0) || (j != 0)) { if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 1, zDir + j) != GregTech_API.sBlockCasings1 && !tUseAdvancedCoils || - aBaseMetaTileEntity.getBlockOffset(xDir + i, 1, zDir + j) != GregTech_API.sBlockCasings4 && tUseAdvancedCoils) { + aBaseMetaTileEntity.getBlockOffset(xDir + i, 1, zDir + j) != GregTech_API.sBlockCasings5 && tUseAdvancedCoils) { return false; } if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 1, zDir + j) != tUsedMeta) { 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 49442816..98680f06 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 @@ -133,6 +133,7 @@ public class GT_Loader_Item_Block_And_Fluid GregTech_API.sBlockCasings2 = new GT_Block_Casings2(); GregTech_API.sBlockCasings3 = new GT_Block_Casings3(); GregTech_API.sBlockCasings4 = new GT_Block_Casings4(); + GregTech_API.sBlockCasings5 = new GT_Block_Casings5(); GregTech_API.sBlockGranites = new GT_Block_Granites(); GregTech_API.sBlockConcretes = new GT_Block_Concretes(); GregTech_API.sBlockOres1 = new GT_Block_Ores();