From 696c2067929c10c93b31282a6d0877749c6ea37c Mon Sep 17 00:00:00 2001 From: CovertJaguar Date: Wed, 13 Nov 2013 17:23:12 -0800 Subject: [PATCH] Register all items with FML so they survive 1.7 --- build.xml | 2 +- common/buildcraft/BuildCraftBuilders.java | 10 ++++++---- common/buildcraft/BuildCraftEnergy.java | 2 ++ common/buildcraft/BuildCraftTransport.java | 12 +++++++++++- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/build.xml b/build.xml index 27642e35..65fbdaca 100644 --- a/build.xml +++ b/build.xml @@ -19,7 +19,7 @@ - + diff --git a/common/buildcraft/BuildCraftBuilders.java b/common/buildcraft/BuildCraftBuilders.java index c72cd496..2254f6b8 100644 --- a/common/buildcraft/BuildCraftBuilders.java +++ b/common/buildcraft/BuildCraftBuilders.java @@ -242,10 +242,12 @@ public class BuildCraftBuilders { templateItem = new ItemBptTemplate(templateItemId.getInt()); templateItem.setUnlocalizedName("templateItem"); LanguageRegistry.addName(templateItem, "Template"); + CoreProxy.proxy.registerItem(templateItem); blueprintItem = new ItemBptBluePrint(blueprintItemId.getInt()); blueprintItem.setUnlocalizedName("blueprintItem"); LanguageRegistry.addName(blueprintItem, "Blueprint"); + CoreProxy.proxy.registerItem(blueprintItem); markerBlock = new BlockMarker(markerId.getInt()); CoreProxy.proxy.registerBlock(markerBlock.setUnlocalizedName("markerBlock")); @@ -333,11 +335,11 @@ public class BuildCraftBuilders { FillerManager.registry.addRecipe(new FillerFillPyramid(), new Object[]{" ", " b ", "bbb", 'g', Block.glass, 'b', Block.brick}); FillerManager.registry.addRecipe(new FillerFillStairs(), new Object[]{" b", " bb", "bbb", 'g', Block.glass, 'b', Block.brick}); } - + @EventHandler - public void processIMCRequests(FMLInterModComms.IMCEvent event) { - InterModComms.processIMC(event); - } + public void processIMCRequests(FMLInterModComms.IMCEvent event) { + InterModComms.processIMC(event); + } public static BptPlayerIndex getPlayerIndex(String name) { BptRootIndex rootIndex = getBptRootIndex(); diff --git a/common/buildcraft/BuildCraftEnergy.java b/common/buildcraft/BuildCraftEnergy.java index eb84eb13..400b4c7d 100644 --- a/common/buildcraft/BuildCraftEnergy.java +++ b/common/buildcraft/BuildCraftEnergy.java @@ -189,6 +189,7 @@ public class BuildCraftEnergy { bucketOil = new ItemBucketBuildcraft(bucketOilId, blockOil.blockID); bucketOil.setUnlocalizedName("bucketOil").setContainerItem(Item.bucketEmpty); LanguageRegistry.addName(bucketOil, "Oil Bucket"); + CoreProxy.proxy.registerItem(bucketOil); FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("oil", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketOil), new ItemStack(Item.bucketEmpty)); } @@ -196,6 +197,7 @@ public class BuildCraftEnergy { bucketFuel = new ItemBucketBuildcraft(bucketFuelId, blockFuel.blockID); bucketFuel.setUnlocalizedName("bucketFuel").setContainerItem(Item.bucketEmpty); LanguageRegistry.addName(bucketFuel, "Fuel Bucket"); + CoreProxy.proxy.registerItem(bucketFuel); FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("fuel", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketFuel), new ItemStack(Item.bucketEmpty)); } diff --git a/common/buildcraft/BuildCraftTransport.java b/common/buildcraft/BuildCraftTransport.java index 71e12747..309cd3fe 100644 --- a/common/buildcraft/BuildCraftTransport.java +++ b/common/buildcraft/BuildCraftTransport.java @@ -264,7 +264,9 @@ public class BuildCraftTransport { pipeWaterproof = new ItemBuildCraft(pipeWaterproofId.getInt()); pipeWaterproof.setUnlocalizedName("pipeWaterproof"); - LanguageRegistry.addName(pipeWaterproof, "Pipe Waterproof"); + LanguageRegistry.addName(pipeWaterproof, "Pipe Sealant"); + CoreProxy.proxy.registerItem(pipeWaterproof); + genericPipeBlock = new BlockGenericPipe(genericPipeId.getInt()); CoreProxy.proxy.registerBlock(genericPipeBlock.setUnlocalizedName("pipeBlock"), ItemBlock.class); @@ -310,6 +312,7 @@ public class BuildCraftTransport { redPipeWire = new ItemBuildCraft(redPipeWireId.getInt()).setPassSneakClick(true); redPipeWire.setUnlocalizedName("redPipeWire"); LanguageRegistry.addName(redPipeWire, "Red Pipe Wire"); + CoreProxy.proxy.registerItem(redPipeWire); AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[]{new ItemStack(Item.dyePowder, 1, 1), new ItemStack(Item.redstone, 1), new ItemStack(Item.ingotIron, 1)}, 500, new ItemStack(redPipeWire, 8))); @@ -317,6 +320,7 @@ public class BuildCraftTransport { bluePipeWire = new ItemBuildCraft(bluePipeWireId.getInt()).setPassSneakClick(true); bluePipeWire.setUnlocalizedName("bluePipeWire"); LanguageRegistry.addName(bluePipeWire, "Blue Pipe Wire"); + CoreProxy.proxy.registerItem(bluePipeWire); AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[]{new ItemStack(Item.dyePowder, 1, 4), new ItemStack(Item.redstone, 1), new ItemStack(Item.ingotIron, 1)}, 500, new ItemStack(bluePipeWire, 8))); @@ -324,6 +328,7 @@ public class BuildCraftTransport { greenPipeWire = new ItemBuildCraft(greenPipeWireId.getInt()).setPassSneakClick(true); greenPipeWire.setUnlocalizedName("greenPipeWire"); LanguageRegistry.addName(greenPipeWire, "Green Pipe Wire"); + CoreProxy.proxy.registerItem(greenPipeWire); AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[]{new ItemStack(Item.dyePowder, 1, 2), new ItemStack(Item.redstone, 1), new ItemStack(Item.ingotIron, 1)}, 500, new ItemStack(greenPipeWire, 8))); @@ -331,25 +336,30 @@ public class BuildCraftTransport { yellowPipeWire = new ItemBuildCraft(yellowPipeWireId.getInt()).setPassSneakClick(true); yellowPipeWire.setUnlocalizedName("yellowPipeWire"); LanguageRegistry.addName(yellowPipeWire, "Yellow Pipe Wire"); + CoreProxy.proxy.registerItem(yellowPipeWire); AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[]{new ItemStack(Item.dyePowder, 1, 11), new ItemStack(Item.redstone, 1), new ItemStack(Item.ingotIron, 1)}, 500, new ItemStack(yellowPipeWire, 8))); Property pipeGateId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_ITEM, "pipeGate.id", DefaultProps.GATE_ID); pipeGate = new ItemGate(pipeGateId.getInt(), 0); pipeGate.setUnlocalizedName("pipeGate"); + CoreProxy.proxy.registerItem(pipeGate); Property pipeGateAutarchicId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_ITEM, "pipeGateAutarchic.id", DefaultProps.GATE_AUTARCHIC_ID); pipeGateAutarchic = new ItemGate(pipeGateAutarchicId.getInt(), 1); pipeGateAutarchic.setUnlocalizedName("pipeGateAutarchic"); + CoreProxy.proxy.registerItem(pipeGateAutarchic); Property pipeFacadeId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_ITEM, "pipeFacade.id", DefaultProps.PIPE_FACADE_ID); facadeItem = new ItemFacade(pipeFacadeId.getInt()); facadeItem.setUnlocalizedName("pipeFacade"); + CoreProxy.proxy.registerItem(facadeItem); Property pipePlugId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_ITEM, "pipePlug.id", DefaultProps.PIPE_PLUG_ID); plugItem = new ItemPlug(pipePlugId.getInt()); plugItem.setUnlocalizedName("pipePlug"); + CoreProxy.proxy.registerItem(plugItem); Property filteredBufferId = BuildCraftCore.mainConfiguration.getBlock("filteredBuffer.id", DefaultProps.FILTERED_BUFFER_ID); filteredBufferBlock = new BlockFilteredBuffer(filteredBufferId.getInt());