Require input as part of all recipes

This commit is contained in:
Andrew Miner
2015-01-01 19:06:04 -08:00
parent 0c781793c6
commit 1a9ae1791e
2 changed files with 2 additions and 7 deletions
-6
View File
@@ -1134,9 +1134,6 @@
}, { }, {
"output": "Pressure Plate (wood)", "output": "Pressure Plate (wood)",
"input": [[2, "Oak Wood Planks"]] "input": [[2, "Oak Wood Planks"]]
}, {
"output": "Pufferfish",
"tools": "Fishing Rod"
}, { }, {
"output": "Pumpkin Pie", "output": "Pumpkin Pie",
"input": ["Egg", "Pumpkin", "Sugar"] "input": ["Egg", "Pumpkin", "Sugar"]
@@ -1198,9 +1195,6 @@
"output": "Redstone", "output": "Redstone",
"input": ["Redstone Ore", "{furnace fuel}"], "input": ["Redstone Ore", "{furnace fuel}"],
"tools": "Furnace" "tools": "Furnace"
}, {
"output": "Redstone",
"tools": "Iron Pickaxe"
}, { }, {
"output": [[9, "Redstone"]], "output": [[9, "Redstone"]],
"input": "Block of Redstone" "input": "Block of Redstone"
+2 -1
View File
@@ -79,8 +79,9 @@ module.exports.V1 = class V1
output = @_parseItemList data.output, field:'output', canBeEmpty:false output = @_parseItemList data.output, field:'output', canBeEmpty:false
@_errorLocation = "recipe for #{output[0].name}" @_errorLocation = "recipe for #{output[0].name}"
data.input ?= [] if not data.input? then throw new Error "#{@_errorLocation} is missing input"
data.tools ?= [] data.tools ?= []
input = @_parseItemList data.input, field:'input', canBeEmpty:true input = @_parseItemList data.input, field:'input', canBeEmpty:true
tools = @_parseItemList data.tools, field:'tools', canBeEmpty:true tools = @_parseItemList data.tools, field:'tools', canBeEmpty:true