;(() => {
  // 奖励清单：按任务 key 维护，每个任务可配置多条奖励
  // 支持类型：
  // 1) item: { type: 'item', id: 'minecraft:bone_meal', count: 8 }
  // 2) xp: { type: 'xp', points: 100 } 或 { type: 'xp', levels: 1 }
  // 3) command: { type: 'command', command: 'say {player} completed barn task' }
  if (!global.cloudIslandBarnMission) global.cloudIslandBarnMission = {}

  global.cloudIslandBarnMission.rewardsByTask = {
    submit_wheat: [{ type: 'item', id: 'minecraft:bone_meal', count: 8 }],
    submit_beetroot: [{ type: 'item', id: 'minecraft:bone_meal', count: 8 }],
    submit_carrot: [{ type: 'item', id: 'minecraft:bone_meal', count: 8 }],
    submit_potato: [{ type: 'item', id: 'minecraft:bone_meal', count: 8 }],
    submit_cabbage: [{ type: 'item', id: 'minecraft:bone_meal', count: 8 }],
    submit_tomato: [{ type: 'item', id: 'minecraft:bone_meal', count: 8 }],
    submit_onion: [{ type: 'item', id: 'minecraft:bone_meal', count: 8 }],
    submit_rice_panicle: [{ type: 'item', id: 'minecraft:bone_meal', count: 8 }],
  }
})()
