/* ░░░▒▒▓▓██▣ RES INTERFACE ▣██▓▓▒▒░░░ ══ [ 2026-04-10 ] ══ [joesOres.js] ═════════
    ┳┳┓┏┓┓┏┓┏┳┏┓┓ ┏ ╭╭────────●▬▬▬▬๑۩۩๑▬▬▬▬▬●────────●▬▬▬▬๑۩۩๑▬▬▬▬▬●────────●▬▬▬▬๑۩۩๑▬▬▬▬▬●────────╮╮
    ┃┃┃┣┫┗┫┃┃┃┣ ┃┃┃ || server_scripts | JOres | loot_table Modification and Tooltips 
    ┛ ┗┛┗┗┛┗┛┻┗┛┗┻┛ ╰╰────────●▬▬▬▬๑۩۩๑▬▬▬▬▬●────────●▬▬▬▬๑۩۩๑▬▬▬▬▬●────────●▬▬▬▬๑۩۩๑▬▬▬▬▬●────────╯╯
*/ console.info("[RES:CORE] Initializing joesOres.js");
LootJS.modifiers(e => {
    const petrifiedLogs = [
        "mangrove",
        "spruce",
        "jungle",
        "cherry",
        "acacia",
        "birch",
        "dark_oak",
        "oak"
    ]
    petrifiedLogs.forEach(log => e.addTableModifier(`minecraft:blocks/${log}_log`).addLoot(LootEntry.of("ores:petrified_bark").when(c => c.randomChance(0.00025))))

    const phantasmMobs = [
        "zombie",
        "zombie_villager",
        "stray",
        "bogged",
        "husk",
        "drowned",
        "wither_skeleton",
        "skeleton",
    ]
    phantasmMobs.forEach(mob => e.addTableModifier(`minecraft:entities/${mob}`).addLoot(LootEntry.of("ores:ectoplasm").when(c => c.randomChance(0.0004))))

    const mushPlants = [
        "potatoes",
        "carrots",
        "beetroots",
        "wheat"
    ]
    mushPlants.forEach(plant => e.addTableModifier(`minecraft:blocks/${plant}`).addLoot(LootEntry.of("ores:mush").when(c => c.randomChance(0.0005))))

    const quickSilverSoils = [
        "suspicious_gravel",
        "grass_block",
        "sand",
        "gravel",
        "coarse_dirt",
        "rooted_dirt",
        "dirt_path",
        "farmland",
        "podzol",
        "mycelium",
        "suspicious_sand",
        "dirt",
    ]
    quickSilverSoils.forEach(soil => e.addTableModifier(`minecraft:blocks/${soil}`).addLoot(LootEntry.of("ores:quicksilver").when(c => c.randomChance(0.0001))))
})

RecipeViewerEvents.addInformation('item', e => {
    e.add("ores:adamantite_furnace", [
        "Can smelt Raw Celestium into either Solarium Ingots or Lunarium Ingots depending on the time of day."
    ])
    e.add("ores:lunarium_ingot", [
        "Obtained by smelting Raw Celestium in an Adamantite Furnace during the night."
    ])
    e.add("ores:solarium_ingot", [
        "Obtained by smelting Raw Celestium in an Adamantite Furnace during the day."
    ])
    e.add("ores:raw_celestium", [
        "Can be smelted inside an Adamantite Furnace.",
        "Turns into Solarium Ingots when smelted during the day.",
        "Turns into Lunarium Ingots when smelted during the night."
    ])

    e.add(
        [
            "ores:solarium_helmet", 
            "ores:solarium_chestplate", 
            "ores:solarium_leggings", 
            "ores:solarium_boots"
        ],
        [
            "A full set gives the following bonus during the day or inside of the Nether:",
            "- Increased health",
            "- Increased speed",
            "- Increased jump height",
            "- Increase fall distance before taking damage",
            "- Increased block break speed"
        ],
    )

    e.add(
        [
            "ores:lunarium_helmet", 
            "ores:lunarium_chestplate", 
            "ores:lunarium_leggings", 
            "ores:lunarium_boots"
        ],
        [
            "A full set gives the following bonus during the night or inside of the End:",
            "- Increased health",
            "- Increased speed",
            "- Increased jump height",
            "- Increase fall distance before taking damage",
            "- Increased block break speed"
        ],
    )

    e.add("ores:petrified_bark", [
        "Very rarely drops from any VANILLA log."
    ])
    e.add("ores:mush", [
        "Very rarely drops from any VANILLA crop."
    ])
    e.add("ores:ectoplasm", [
        "Very rarely drops from any VANILLA undead mob."
    ])
    e.add("ores:quicksilver", [
        "Very rarely drops from any VANILLA dirt related blocks."
    ])

    e.add("ores:raw_morphite", [
        "Can be synthesized into various ingots inside of a Morphite Synthesizer"
    ])
    e.add("ores:morphite_synthesizer", [
        "Synthesizes Morphite with Dragon's Breath and certain materials into ingots."
    ])

    e.add("ores:necronium_sword", [
        "Damages entites around the target on a critical hit."
    ])
    // e.add("ores:geovar_pickaxe", [
    //     ""
    // ])
    // e.add("ores:petrafite_axe", [
    //     ""
    // ])
    // e.add("ores:swiftite_shovel", [
    //     ""
    // ])
    e.add("ores:florite_hoe", [
        "Applies bone meal around an area."
    ])
})