//市民药物
StartupEvents.registry("item", event => {
    event.create('snk:birch_liquid')
        .displayName('birch liquid')
        .texture('snk:item/birch_liquid')
        .food(food => {
            food.hunger(4)
                .saturation(0.6)
                .alwaysEdible()
        })
    event.create('snk:chrysanthemum_tea')
        .displayName('chrysanthemum tea')
        .texture('snk:item/chrysanthemum_tea')
        .food(food => {
            food.hunger(4)
                .saturation(0.6)
                .alwaysEdible()
        })
    event.create('snk:dandelion_tea')
        .displayName('dandelion tea')
        .texture('snk:item/dandelion_tea')
        .food(food => {
            food.hunger(4)
                .saturation(0.6)
                .alwaysEdible()
        })
})
//登记百年战争长矛
StartupEvents.registry("creative_mode_tab", (event) => {
    let tab = event.create("hundred_years_war:hundred_years_war")
    tab.content(() => [
        'hundred_years_war:diamond_pike',
        'hundred_years_war:golden_pike',
        'hundred_years_war:iron_pike',
        'hundred_years_war:stone_pike',
        'hundred_years_war:wooden_pike',
    ])
})

ItemEvents.modification(event => {
    event.modify("hundred_years_war:wooden_pike", modification => {
        modification.setAttackDamage(4)
        modification.addAttribute("minecraft:generic.movement_speed", "d01b773d-7c24-f563-787f-4e78aa4516e6", "pike", -0.15, "multiply_total")
    })
    event.modify("hundred_years_war:stone_pike", modification => {
        modification.setAttackDamage(5)
        modification.addAttribute("minecraft:generic.movement_speed", "d01b773d-7c24-f563-787f-4e78aa4516e6", "pike", -0.15, "multiply_total")
    })
    event.modify("hundred_years_war:iron_pike", modification => {
        modification.setAttackDamage(6)
        modification.addAttribute("minecraft:generic.movement_speed", "d01b773d-7c24-f563-787f-4e78aa4516e6", "pike", -0.15, "multiply_total")
    })
    event.modify("hundred_years_war:golden_pike", modification => {
        modification.setAttackDamage(4)
        modification.addAttribute("minecraft:generic.movement_speed", "d01b773d-7c24-f563-787f-4e78aa4516e6", "pike", -0.15, "multiply_total")
    })
    event.modify("hundred_years_war:diamond_pike", modification => {
        modification.setAttackDamage(7)
        modification.addAttribute("minecraft:generic.movement_speed", "d01b773d-7c24-f563-787f-4e78aa4516e6", "pike", -0.15, "multiply_total")
    })
    //伤害测试斧头添加诅咒效果
    event.modify("born_in_chaos_v1:supreme_measure", modification => {
        modification.addAttribute("minecraft:generic.armor", "d01b773d-7c24-f563-787f-4e78aa4516e6", "curse", -0.5, "multiply_total")
        modification.addAttribute("minecraft:generic.armor_toughness", "d01b773d-7c24-f563-787f-4e78aa4516e6", "curse", -0.5, "multiply_total")
    })
})