diff --git a/li/cil/oc/Recipes.scala b/li/cil/oc/Recipes.scala index d3e34af6a..c934bd696 100644 --- a/li/cil/oc/Recipes.scala +++ b/li/cil/oc/Recipes.scala @@ -58,7 +58,6 @@ object Recipes { val hdd1 = Items.hdd1.createItemStack() val hdd2 = Items.hdd2.createItemStack() val hdd3 = Items.hdd3.createItemStack() - val ironNugget = Items.ironNugget.createItemStack() val lanCard = Items.lan.createItemStack() val pcb = Items.pcb.createItemStack() val ram1 = Items.ram1.createItemStack() @@ -72,7 +71,7 @@ object Recipes { // ----------------------------------------------------------------------- // GameRegistry.addRecipe(new ShapelessOreRecipe(Items.ironNugget.createItemStack(9), ironIngot)) - GameRegistry.addShapelessRecipe(Items.cuttingWire.createItemStack(1), new ItemStack(Item.shears, 1, OreDictionary.WILDCARD_VALUE), ironNugget, stick) + GameRegistry.addShapelessRecipe(Items.cuttingWire.createItemStack(1), new ItemStack(Item.shears, 1, OreDictionary.WILDCARD_VALUE), Items.ironNugget.createItemStack(), stick) GameRegistry.addShapelessRecipe(rawBoard, Items.cuttingWire.createItemStack(), new ItemStack(Block.blockClay), cactusGreen) FurnaceRecipes.smelting().addSmelting(rawBoard.itemID, rawBoard.getItemDamage, board, 1) GameRegistry.addRecipe(new ShapelessOreRecipe(acid, Item.bucketWater, sugar, roseRed, slimeBall, spiderEye, boneMeal)) @@ -88,13 +87,13 @@ object Recipes { " i ", "i i", " i ", - 'i', ironNugget) + 'i', "nuggetIron") addRecipe(transistor, "iii", "grg", " t ", - 'i', ironNugget, + 'i', "nuggetIron", 'g', goldNugget, 'r', redstoneDust, 't', redstoneTorch) @@ -133,7 +132,7 @@ object Recipes { 'r', repeater, 's', transistor, 't', redstoneTorch, - 'i', ironNugget, + 'i', "nuggetIron", 'd', redstoneDust) addRecipe(cu, @@ -160,7 +159,7 @@ object Recipes { "ict", "ibb", "igg", - 'i', ironNugget, + 'i', "nuggetIron", 'c', chip1, 't', transistor, 'b', pcb, @@ -334,7 +333,7 @@ object Recipes { " i ", "iri", " i ", - 'i', ironNugget, + 'i', "nuggetIron", 'r', redstoneDust) // ----------------------------------------------------------------------- // @@ -373,7 +372,7 @@ object Recipes { "ili", "bdb", "ipi", - 'i', ironNugget, + 'i', "nuggetIron", 'l', lever, 'b', board, 'd', disk, diff --git a/li/cil/oc/server/component/Computer.scala b/li/cil/oc/server/component/Computer.scala index 2df3c70ba..7529f3bc2 100644 --- a/li/cil/oc/server/component/Computer.scala +++ b/li/cil/oc/server/component/Computer.scala @@ -1133,8 +1133,10 @@ class Computer(val owner: tileentity.Computer) extends ManagedComponent with Con if (state.size == 0 || state.top != Computer.State.Stopped) { state.clear() state.push(Computer.State.Stopped) - lua.setTotalMemory(Integer.MAX_VALUE) - lua.close() + if (lua != null) { + lua.setTotalMemory(Integer.MAX_VALUE) + lua.close() + } lua = null kernelMemory = 0 signals.clear()