ServerEvents.recipes(event => {
  const types = ['pickaxe', 'axe', 'shovel', 'hoe', 'sword']
  
  types.forEach(type => {
    event.shaped(`minecraft:wooden_${type}`, getPattern(type), {
      A: '#minecraft:planks',
      S: 'minecraft:stick'
    })
  })

  types.forEach(type => {
    event.shaped(`minecraft:stone_${type}`, getPattern(type), {
      A: '#minecraft:stone_crafting_materials',
      S: 'minecraft:stick'
    })
  })

  // Helper function for patterns
  function getPattern(type) {
    if (type === 'pickaxe') return ['AAA', ' S ', ' S ']
    if (type === 'axe')     return ['AA ', 'AS ', ' S ']
    if (type === 'shovel')  return [' A ', ' S ', ' S ']
    if (type === 'hoe')     return ['AA ', ' S ', ' S ']
    if (type === 'sword')   return [' A ', ' A ', ' S ']
  }
})