// priority: 0

// Visit the wiki for more info - https://kubejs.com/

console.info('Executing KubeJS Recipe Scripts...')

ServerEvents.recipes(event => {
  event.recipes.create.compacting('minecraft:tuff', ['minecraft:andesite', 'minecraft:diorite', 'minecraft:cobblestone', 'minecraft:granite'])
  event.recipes.create.haunting('minecraft:redstone', 'minecraft:glowstone_dust')
  event.recipes.create.crushing('minecraft:glowstone_dust', 'minecraft:redstone_torch')
  //event.recipes.create.mixing('jaffactory:jaffa_base', ['create:dough', 'minecraft:sugar', 'minecraft:egg']).heated()
  //event.recipes.create.mixing('createaddition:biomass', ['jaffactory:orange_sapling', Fluid.of('createaddition:seed_oil', 100)]).heated()
	event.recipes.create.filling('jaffactory:jaffa_cake', ['jaffactory:jaffa_slime_base', Fluid.of('create:chocolate', 250)])
	event.recipes.create.deploying('create:andesite_casing', ['jaffactory:stripped_orange_log', 'create:andesite_alloy'])
	event.recipes.create.deploying('create:brass_casing', ['jaffactory:stripped_orange_log', 'create:brass_ingot'])
	event.recipes.create.deploying('create:copper_casing', ['jaffactory:stripped_orange_log', 'minecraft:copper_ingot'])
	event.shaped(
  	Item.of('minecraft:chest'), // arg 1: output
	  [ 
    	'AAA', 
	    'A A', // arg 2: the shape (array of strings)
    	'AAA'  
	  ],
  	{
	    A: 'jaffactory:orange_planks_block'
  	}
	)

  event.shaped(
    Item.of('ae2:facade'), // arg 1: output
    [ 
      ' A ', 
      'ABA', // arg 2: the shape (array of strings)
      ' A '  
    ],
    {
      A: 'ae2:cable_anchor',
      B: 'minecraft:stone'
    }
  )

event.recipes.shapeless('jaffactory:jaffa_cake', ['jaffactory:jaffa_slime_base', 'create:chocolate_bucket'])
	event.remove({id:'jaffactory:jaffa_chocolating'})

event.recipes.shapeless('jaffactory_continued:empty_jaffa_pallet', ['3x #minecraft:planks', '2x #forge:rods/iron'])

event.custom({
    "type":"create:cutting",
  "ingredients": [
    {
      "item": "jaffactory:orange_log"
    }
  ],
  "processingTime": 50,
  "results": [
    {
      "item": "jaffactory:stripped_orange_log"
    }
  ]
})

event.custom({
    "type":"create:cutting",
  "ingredients": [
    {
      "item": "jaffactory:stripped_orange_log"
    }
  ],
  "processingTime": 50,
  "results": [
    {
    	"count": 6,
      "item": "jaffactory:orange_planks_block"
    }
  ]
})

event.custom({
    "type":"create:cutting",
  "ingredients": [
    {
      "item": "jaffactory:stripped_orange_wood"
    }
  ],
  "processingTime": 50,
  "results": [
    {
    	"count": 6,
      "item": "jaffactory:orange_planks_block"
    }
  ]
})

event.custom({
    "type":"create:cutting",
  "ingredients": [
    {
      "item": "jaffactory:orange_wood"
    }
  ],
  "processingTime": 50,
  "results": [
    {
    	"count": 6,
      "item": "jaffactory:stripped_orange_wood"
    }
  ]
})

event.custom({
  "type":"createaddition:rolling",
  "input": {
        "item": "jaffactory_continued:printed_jaffa_cake_box"
  },
  "result": {
    "item": "jaffactory_continued:empty_jaffa_cake_box",
    "count": 1
  }
  })


event.custom({
    "type":"createaddition:rolling",
  "input": [
    {
      "item": "jaffactory_continued:printed_jaffa_cake_box",
    }
  ],
  "processingTime": 50,
  "results": [
    {
      "item": "jaffactory_continued:empty_jaffa_cake_box",
    }
  ]
})

event.shapeless('2x create:brass_nugget', ['minecraft:copper_nugget', 'create:zinc_nugget'])

event.recipes.create.milling('24x jaffactory_continued:box_of_jaffa_cakes', 'jaffactory_continued:tied_jaffa_cake_pallet')
event.shapeless('24x jaffactory_continued:box_of_jaffa_cakes', 'jaffactory_continued:tied_jaffa_cake_pallet')

event.recipes.create.sequenced_assembly([  //OK
		Item.of('jaffactory_continued:box_of_jaffa_cakes'), // this is the item that will appear in JEI as the result
	], 'jaffactory_continued:empty_jaffa_cake_box', [ // 'create:golden_sheet' is the input
		// the transitional item set by `transitionalItem('create:incomplete_large_cogwheel')` is the item used during the intermediate stages of the assembly
		event.recipes.createDeploying('jaffactory_continued:incomplete_jaffa_cake_box', ['jaffactory_continued:incomplete_jaffa_cake_box', Item.of('jaffactory:jaffa_cake')]),
	]).transitionalItem('jaffactory_continued:incomplete_jaffa_cake_box').loops(8) // set the transitional item and the number of loops

event.recipes.create.sequenced_assembly([  //OK
    Item.of('jaffactory_continued:untied_jaffa_cake_pallet'), // this is the item that will appear in JEI as the result
  ], 'jaffactory_continued:empty_jaffa_pallet', [ // 'create:golden_sheet' is the input
    // the transitional item set by `transitionalItem('create:incomplete_large_cogwheel')` is the item used during the intermediate stages of the assembly
    event.recipes.createDeploying('jaffactory_continued:incomplete_jaffa_cake_pallet', ['jaffactory_continued:incomplete_jaffa_cake_pallet', Item.of('jaffactory_continued:box_of_jaffa_cakes')]),
  ]).transitionalItem('jaffactory_continued:incomplete_jaffa_cake_pallet').loops(24) // set the transitional item and the number of loops

  event.recipes.create.deploying('jaffactory_continued:tied_jaffa_cake_pallet', ['jaffactory_continued:untied_jaffa_cake_pallet', 'minecraft:string']) //OK

event.custom({
  "type": "tfmg:distillation",
  "ingredients": [

    {
      "fluid": "tfmg:lpg",
      "nbt": {},
      "amount": 100
    }
  ],
  "results": [
    {
      "fluid": "tfmg:diesel",
      "amount": 35
    },
    {
      "fluid": "tfmg:gasoline",
      "amount": 35
    }
  ]
})

event.custom({
  "type": "tfmg:distillation",
  "ingredients": [
      {
        "fluid": "tfmg:kerosene",
        "nbt": {},
        "amount": 100
      }
    ],
    "results": [
      {
        "fluid": "tfmg:diesel",
        "amount": 65
      },
      {
        "fluid": "tfmg:gasoline",
        "amount": 25
      }
    ]
  })

event.custom({
  "type":"createaddition:liquid_burning",
  "input": {
        "fluid": "tfmg:creosote",
        "amount": 1000
  },
  "burnTime": 4800,
  "superheated": true
})

event.custom({
  "type":"createaddition:liquid_burning",
  "input": {
        "fluid": "tfmg:kerosene",
        "amount": 1000
  },
  "burnTime": 48000,
  "superheated": false
})

event.custom({
  "type":"createaddition:liquid_burning",
  "input": {
        "fluid": "tfmg:lpg",
        "amount": 1000
  },
  "burnTime": 18000,
  "superheated": false
})
})

ServerEvents.tags('item', event => {
	 event.get('forge:plates/zinc').add('createdeco:zinc_sheet')
})

ServerEvents.compostableRecipes(event => {
	event.add('jaffactory:orange_sapling', 0.35)
})