diff --git a/common/buildcraft/BuildCraftTransport.java b/common/buildcraft/BuildCraftTransport.java index 1df4938d..5cfeafc8 100644 --- a/common/buildcraft/BuildCraftTransport.java +++ b/common/buildcraft/BuildCraftTransport.java @@ -314,39 +314,52 @@ public class BuildCraftTransport { diamondTextures[j] = 1 * 16 + 6 + j; } - redPipeWire = new ItemBuildCraft(DefaultProps.RED_PIPE_WIRE).setIconIndex(4 * 16 + 0); + Property redPipeWireId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("redPipeWire.id", Configuration.CATEGORY_ITEM, DefaultProps.RED_PIPE_WIRE); + redPipeWire = new ItemBuildCraft(Integer.parseInt(redPipeWireId.value)).setIconIndex(4 * 16 + 0); redPipeWire.setItemName("redPipeWire"); + redPipeWire.setTabToDisplayOn(CreativeTabs.tabMisc); LanguageRegistry.addName(redPipeWire, "Red Pipe Wire"); 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))); - bluePipeWire = new ItemBuildCraft(DefaultProps.BLUE_PIPE_WIRE).setIconIndex(4 * 16 + 1); + Property bluePipeWireId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("bluePipeWire.id", Configuration.CATEGORY_ITEM, DefaultProps.BLUE_PIPE_WIRE); + bluePipeWire = new ItemBuildCraft(Integer.parseInt(bluePipeWireId.value)).setIconIndex(4 * 16 + 1); bluePipeWire.setItemName("bluePipeWire"); + bluePipeWire.setTabToDisplayOn(CreativeTabs.tabMisc); LanguageRegistry.addName(bluePipeWire, "Blue Pipe Wire"); 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))); - greenPipeWire = new ItemBuildCraft(DefaultProps.GREEN_PIPE_WIRE).setIconIndex(4 * 16 + 2); + Property greenPipeWireId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("greenPipeWire.id", Configuration.CATEGORY_ITEM, DefaultProps.GREEN_PIPE_WIRE); + greenPipeWire = new ItemBuildCraft(Integer.parseInt(greenPipeWireId.value)).setIconIndex(4 * 16 + 2); greenPipeWire.setItemName("greenPipeWire"); + greenPipeWire.setTabToDisplayOn(CreativeTabs.tabMisc); LanguageRegistry.addName(greenPipeWire, "Green Pipe Wire"); 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))); - yellowPipeWire = new ItemBuildCraft(DefaultProps.YELLOW_PIPE_WIRE).setIconIndex(4 * 16 + 3); + Property yellowPipeWireId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("yellowPipeWire.id", Configuration.CATEGORY_ITEM, DefaultProps.YELLOW_PIPE_WIRE); + yellowPipeWire = new ItemBuildCraft(Integer.parseInt(yellowPipeWireId.value)).setIconIndex(4 * 16 + 3); yellowPipeWire.setItemName("yellowPipeWire"); + yellowPipeWire.setTabToDisplayOn(CreativeTabs.tabMisc); LanguageRegistry.addName(yellowPipeWire, "Yellow Pipe Wire"); 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))); - pipeGate = new ItemGate(DefaultProps.GATE_ID, 0).setIconIndex(2 * 16 + 3); + Property pipeGateId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("pipeGate.id", Configuration.CATEGORY_ITEM, DefaultProps.GATE_ID); + pipeGate = new ItemGate(Integer.parseInt(pipeGateId.value), 0).setIconIndex(2 * 16 + 3); pipeGate.setItemName("pipeGate"); - pipeGateAutarchic = new ItemGate(DefaultProps.GATE_AUTARCHIC_ID, 1).setIconIndex(2 * 16 + 3); + Property pipeGateAutarchicId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("pipeGateAutarchic.id", Configuration.CATEGORY_ITEM, DefaultProps.GATE_AUTARCHIC_ID); + pipeGateAutarchic = new ItemGate(Integer.parseInt(pipeGateAutarchicId.value), 1).setIconIndex(2 * 16 + 3); pipeGateAutarchic.setItemName("pipeGateAutarchic"); - facadeItem = new ItemFacade(DefaultProps.PIPE_FACADE_ID); + Property pipeFacadeId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("pipeFacade.id", Configuration.CATEGORY_ITEM, DefaultProps.PIPE_FACADE_ID); + facadeItem = new ItemFacade(Integer.parseInt(pipeFacadeId.value)); facadeItem.setItemName("pipeFacade"); ItemFacade.initialize(); + + BuildCraftCore.mainConfiguration.save(); new BptBlockPipe(genericPipeBlock.blockID); diff --git a/common/buildcraft/builders/BlockBlueprintLibrary.java b/common/buildcraft/builders/BlockBlueprintLibrary.java index 49e7e184..c9ec9c93 100644 --- a/common/buildcraft/builders/BlockBlueprintLibrary.java +++ b/common/buildcraft/builders/BlockBlueprintLibrary.java @@ -12,6 +12,7 @@ package buildcraft.builders; import java.util.ArrayList; import net.minecraft.src.BlockContainer; +import net.minecraft.src.CreativeTabs; import net.minecraft.src.EntityLiving; import net.minecraft.src.EntityPlayer; import net.minecraft.src.ItemStack; @@ -28,6 +29,7 @@ public class BlockBlueprintLibrary extends BlockContainer { public BlockBlueprintLibrary(int i) { super(i, Material.wood); + setCreativeTab(CreativeTabs.tabRedstone); setHardness(0.7F); } diff --git a/common/buildcraft/transport/ItemGate.java b/common/buildcraft/transport/ItemGate.java index c30fc545..21387756 100644 --- a/common/buildcraft/transport/ItemGate.java +++ b/common/buildcraft/transport/ItemGate.java @@ -64,7 +64,6 @@ public class ItemGate extends ItemBuildCraft { @Override @SideOnly(Side.CLIENT) public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List itemList) { - super.getSubItems(par1, par2CreativeTabs, itemList); itemList.add(new ItemStack(this, 1, 0)); itemList.add(new ItemStack(this, 1, 1)); itemList.add(new ItemStack(this, 1, 2));