Require input as part of all recipes
This commit is contained in:
@@ -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"
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user