From 11ac46daebe901a6012a09ba5f6fe44af5b1be06 Mon Sep 17 00:00:00 2001 From: Marcin Sciesinski Date: Sun, 21 Apr 2013 19:01:18 +0100 Subject: [PATCH] Fixing the GameRegistry. Now it is possible to register a Block with a BlockItem using following code: MyBlock myBlock = new MyBlock(); GameRegistry.registerBlock(myBlock, MyBlockItem.class, "myBlock"); where MyBlockItem class has one constructor with signature: public MyBlockItem(int id, Block block) --- common/cpw/mods/fml/common/registry/GameRegistry.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/cpw/mods/fml/common/registry/GameRegistry.java b/common/cpw/mods/fml/common/registry/GameRegistry.java index 06b05723c5..ea019b80c3 100644 --- a/common/cpw/mods/fml/common/registry/GameRegistry.java +++ b/common/cpw/mods/fml/common/registry/GameRegistry.java @@ -221,7 +221,7 @@ public class GameRegistry } catch (NoSuchMethodException e) { - itemCtor = itemclass.getConstructor(int.class, Block.class); + itemCtor = itemclass.getConstructor(int.class, net.minecraft.block.Block.class); i = itemCtor.newInstance(blockItemId, block); } GameRegistry.registerItem(i,name, modId);