From 8594a3e2c7fe78968702cb0777cacb68baad56a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Mon, 6 Jan 2014 23:49:04 +0100 Subject: [PATCH] registering items in ore dictionary if they aren't already there that aren't in it by default (hi gregtech), fixes #67 --- li/cil/oc/Items.scala | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/li/cil/oc/Items.scala b/li/cil/oc/Items.scala index c25d198e7..a0f6f182f 100644 --- a/li/cil/oc/Items.scala +++ b/li/cil/oc/Items.scala @@ -2,7 +2,8 @@ package li.cil.oc import cpw.mods.fml.common.registry.GameRegistry import li.cil.oc.common.item -import net.minecraft.item.ItemStack +import net.minecraft.block.Block +import net.minecraft.item.{Item, ItemStack} import net.minecraftforge.oredict.OreDictionary object Items { @@ -113,6 +114,8 @@ object Items { // ----------------------------------------------------------------------- // + registerExclusive("craftingPiston", new ItemStack(Block.pistonBase), new ItemStack(Block.pistonStickyBase)) + registerExclusive("nuggetGold", new ItemStack(Item.goldNugget)) registerExclusive("nuggetIron", ironNugget.createItemStack()) register("oc:craftingCircuitBoardRaw", rawCircuitBoard.createItemStack()) register("oc:craftingCircuitBoard", circuitBoard.createItemStack()) @@ -150,9 +153,11 @@ object Items { } } - def registerExclusive(name: String, item: ItemStack) { + def registerExclusive(name: String, items: ItemStack*) { if (OreDictionary.getOres(name).isEmpty) { - OreDictionary.registerOre(name, item) + for (item <- items) { + OreDictionary.registerOre(name, item) + } } } } \ No newline at end of file