// priority: 0

onEvent('recipes', e => {
  //removals
  removeRecipeByOutput(e, [
    SE("wooden_shield"),
    SE("golden_shield"),
    SE("iron_shield"),
    SE("diamond_shield"),
  ])

  //chainable shields
  const shields = {
	wooden: { mat: MC("#planks"), core: MC("stick") },
	iron: { mat: F("#ingots/iron"), core: SE("wooden_shield") },
	golden: { mat: F("#ingots/gold"), core: MC("stick") },
	diamond: { mat: F("#gems/diamond"), core: SE("iron_shield") },
  }
  for (let shield in shields) {
	e.shaped(SE(`${shield}_shield`), [
		  'ABA',
		  'AAA',
		  ' A '
	  ], {
		  A: shields[shield].mat,
		  B: shields[shield].core
	  }).id(KJ(`${shield}_shield`))
  }
})
