Add V2 file format
This commit is contained in:
@@ -18,20 +18,16 @@ describe 'CraftingPlan', ->
|
||||
|
||||
beforeEach ->
|
||||
modPack = new ModPack
|
||||
modPack.loadModVersionData {
|
||||
dataVersion: 1
|
||||
name: 'Minecraft'
|
||||
version: '1.7.10'
|
||||
recipes: [
|
||||
{ input:'Oak Log', output:[[4, 'Oak Plank']] }
|
||||
{ input:[[2, 'Oak Plank']], output:[[4, 'Stick']] }
|
||||
{ input:[[4, 'Oak Plank']], output:'Crafting Table' }
|
||||
{ input:[[8, 'Cobblestone']], tools:'Crafting Table', output:'Furnace' }
|
||||
{ input:['Iron Ore', 'furnace fuel'], tools:'Furnace', output:'Iron Ingot' }
|
||||
{ input:[[2, 'Iron Ingot'], 'Stick'], tools:'Crafting Table', output:'Iron Sword' }
|
||||
]
|
||||
}
|
||||
modPack.loadModVersionData """
|
||||
schema:2; name:Minecraft; version:1.7.10
|
||||
|
||||
item:Oak Plank; recipe:; input:Oak Log; pattern:... .0. ...; quantity:4
|
||||
item:Stick; recipe:; input:Oak Plank; pattern:... .0. .0.; quantity:4
|
||||
item:Crafting Table; recipe:; input:Oak Plank; pattern:00. 00. ...
|
||||
item:Furnace; recipe:; input:Cobblestone; pattern:000 0.0 000; tools:Crafting Table
|
||||
item:Iron Ingot; recipe:; input:Iron Ore, furnace fuel; pattern:.0. ... .1.; tools:Furnace
|
||||
item:Iron Sword; recipe:; input:Iron Ingot, Stick; pattern:.0. .0. .1.; tools:Crafting Table
|
||||
"""
|
||||
plan = new CraftingPlan modPack:modPack, includingTools:false
|
||||
|
||||
describe 'craft', ->
|
||||
@@ -81,5 +77,3 @@ describe 'CraftingPlan', ->
|
||||
plan.result.toList().should.eql [
|
||||
'crafting_table', 'furnace', 'iron_sword', [2, 'oak_plank'], [3, 'stick']
|
||||
]
|
||||
|
||||
describe 'using existing inventory', ->
|
||||
|
||||
Reference in New Issue
Block a user