// priority: 1

// by blueversal

Platform.mods.kubejs.name = 'Beyond Ocean';

StartupEvents.registry('item', event => {

  event.create('fish')
    .displayName('Fish')
    .food(food => {
      food.hunger(1)
      food.saturation(0.1)
    })
})

ItemEvents.modification(event => {
  event.modify('minecraft:wooden_sword', item => {
    item.attackDamage = 4
    item.attackSpeed = -1.6
    item.maxDamage = 75
  })
  event.modify('minecraft:wooden_pickaxe', item => {
    item.maxDamage = 75
  })
  event.modify('minecraft:wooden_axe', item => {
    item.maxDamage = 75
  })
  event.modify('minecraft:wooden_shovel', item => {
    item.maxDamage = 75
  })
  event.modify('minecraft:wooden_hoe', item => {
    item.maxDamage = 75
  })
})

ItemEvents.modification(event => {
    const woodenTools = [
        "minecraft:wooden_sword",
        "minecraft:wooden_pickaxe",
        "minecraft:wooden_axe",
        "minecraft:wooden_shovel",
        "minecraft:wooden_hoe"
    ]
    woodenTools.forEach(id => {
        event.modify(id, item => {
            item.setFoodProperties(e =>
                e.hunger(4).saturation(0.4)
            )
        })
    })
})

ItemEvents.modification(event => {
  event.modify('minecraft:nether_star', item => {
    item.fireResistant = true
  });
});
