Don't register our own blocks, ...
...let FML do that.
This commit is contained in:
parent
df09099ca6
commit
c64809a300
3 changed files with 3 additions and 8 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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" })
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue