From c64809a300962048d4df35b1e72b46d4da47d748 Mon Sep 17 00:00:00 2001 From: CovertJaguar Date: Wed, 17 Apr 2013 03:38:14 -0700 Subject: [PATCH] Don't register our own blocks, ... ...let FML do that. --- common/buildcraft/core/ItemBlockBuildCraft.java | 6 +----- common/buildcraft/core/proxy/CoreProxy.java | 3 +-- common/buildcraft/energy/ItemEngine.java | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/common/buildcraft/core/ItemBlockBuildCraft.java b/common/buildcraft/core/ItemBlockBuildCraft.java index f969c40f..890e674d 100644 --- a/common/buildcraft/core/ItemBlockBuildCraft.java +++ b/common/buildcraft/core/ItemBlockBuildCraft.java @@ -6,11 +6,8 @@ import buildcraft.core.utils.StringUtil; public class ItemBlockBuildCraft extends ItemBlock { - protected String name; - - public ItemBlockBuildCraft(int id, String name) { + public ItemBlockBuildCraft(int id) { super(id); - this.name = name; } @Override @@ -22,5 +19,4 @@ public class ItemBlockBuildCraft extends ItemBlock { public String getItemDisplayName(ItemStack itemstack) { return StringUtil.localize(getUnlocalizedName(itemstack)); } - } diff --git a/common/buildcraft/core/proxy/CoreProxy.java b/common/buildcraft/core/proxy/CoreProxy.java index 88da7541..f25d4dd1 100644 --- a/common/buildcraft/core/proxy/CoreProxy.java +++ b/common/buildcraft/core/proxy/CoreProxy.java @@ -100,8 +100,7 @@ public class CoreProxy { /* REGISTRATION */ public void registerBlock(Block block) { - Item.itemsList[block.blockID] = null; - Item.itemsList[block.blockID] = new ItemBlockBuildCraft(block.blockID - 256, block.getUnlocalizedName()); + GameRegistry.registerBlock(block, ItemBlockBuildCraft.class, block.getUnlocalizedName()); } @SuppressWarnings({ "rawtypes", "unchecked" }) diff --git a/common/buildcraft/energy/ItemEngine.java b/common/buildcraft/energy/ItemEngine.java index c79d3971..5f738be8 100644 --- a/common/buildcraft/energy/ItemEngine.java +++ b/common/buildcraft/energy/ItemEngine.java @@ -15,7 +15,7 @@ import buildcraft.core.ItemBlockBuildCraft; public class ItemEngine extends ItemBlockBuildCraft { public ItemEngine(int i) { - super(i, "engine"); + super(i); setMaxDamage(0); setHasSubtypes(true); }