// priority: 0

StartupEvents.registry("item", (event) => {
    event.create('desertopolis:cactus_slice').displayName('Cactus Slice')
    event.create('desertopolis:cooked_cactus_slice').displayName('Cooked Cactus Slice')
    event.create('desertopolis:silicon_blend').displayName('Silicon Blend')

    event.create('desertopolis:sandstone_sword', 'sword').tier('stone').attackDamageBaseline(1.0)
    event.create('desertopolis:sandstone_shovel', 'shovel').tier('stone').attackDamageBaseline(1.0)
    event.create('desertopolis:sandstone_pickaxe', 'pickaxe').tier('stone').attackDamageBaseline(1.0)
    event.create('desertopolis:sandstone_axe', 'axe').tier('stone').attackDamageBaseline(1.0)
    event.create('desertopolis:sandstone_hoe', 'hoe').tier('stone').attackDamageBaseline(1.0)

  
    event.create('desertopolis:pillager_map').displayName('Pillager Map (Right Click To Open!)').texture("minecraft:item/paper").glow(true)
    event.create('desertopolis:village_map').displayName('Village Map (Right Click To Open!)').texture("minecraft:item/paper").glow(true)
    event.create('desertopolis:mineshaft_map').displayName('Mineshaft Map (Right Click To Open!)').texture("minecraft:item/paper").glow(true)
    event.create('desertopolis:great_pyramid_map').displayName('Pyramid Map (Right Click To Open!)').texture("minecraft:item/paper").glow(true)
    event.create('desertopolis:red_sandstone_temple_map').displayName('Red Sandstone Temple Map (Right Click To Open!)').texture("minecraft:item/paper").glow(true)
    event.create('desertopolis:badlands_map').displayName('Badlands Biome Map (Right Click To Open!)').texture("minecraft:item/paper").glow(true)

    event.create('desertopolis:fused_alloy').displayName('Fused Alloy').texture("enderio:item/grains_of_infinity").color(0, 0xFF5511)
})

ItemEvents.modification((event) => {
    event.modify("desertopolis:cactus_slice", (item) => {
      item.setFoodProperties((food) => {
        food.saturation(0.64);
        food.fastToEat();
        food.hunger(2);
      })
    })
    event.modify("desertopolis:cooked_cactus_slice", (item) => {
      item.setFoodProperties((food) => {
        food.saturation(0.87);
        food.hunger(4);
      })
    })
    event.modify("toughasnails:leaf_chestplate", item => {
        item.setMaxDamage == 56;
    })
    event.modify("toughasnails:leaf_leggings", item => {
        item.setMaxDamage == 56;
    })
    event.modify("toughasnails:leaf_helmet", item => {
        item.setMaxDamage == 56;
    })
    event.modify("toughasnails:leaf_boots", item => {
        item.setMaxDamage == 56;
    })

})

  