
// let $CreativeTabHandler = Java.loadClass("net.yiran.morerequirement.CreativeTabHandler");

// let $MoreRequirement = Java.loadClass("net.yiran.morerequirement.MoreRequirement");
// let $MRDataManager = Java.loadClass("net.yiran.morerequirement.data.MRDataManager");
// let $HexCodec = Java.loadClass("se.mickelus.mutil.util.HexCodec")
// let $ScrollItem = Java.loadClass("se.mickelus.tetra.blocks.scroll.ScrollItem");



// let $ScrollData = Java.loadClass("se.mickelus.tetra.blocks.scroll.ScrollData");
// let aaa = $ScrollData.read()



// let bbb = $CreativeTabHandler.getScrollItem(aaa)

// console.log(aaa)
// console.log(bbb)


// //卷轴描述增加
// let scrollRolledTooltip = Utils.newMap()

// scrollRolledTooltip.put("tetra/deepling", ["§8[§3提供模块§8]§f", "   §8[§7无§8]§f", "§8[§3提供改进§8]§f", "   §8[§7珊瑚化§8]§f", "§8[§3改进适用的部件§8]§f", "   §8[§7单头工具(头部)§8]§f: 矛头 戟头"])
// scrollRolledTooltip.put("tetra/trident", ["§8[§3提供模块§8]§f", "   §8[§7单头工具(头部)§8]§f: 三叉戟", "§8[§3提供改进§8]§f", "   §8[§7无§8]§f"])
// scrollRolledTooltip.put("sword/kobole", ["§8[§3提供模块§8]§f", "   §8[§7无§8]§f", "§8[§3提供改进§8]§f", "   §8[§7古咒§8]§f", "§8[§3改进适用的部件§8]§f", "   §8[§7刀剑(剑刃)§8]§f: 行刑剑 重剑"])
// scrollRolledTooltip.put("sword/howling", ["§8[§3提供模块§8]§f", "   §8[§7刀剑(附层)§8]§f: 风啸剑刃", "§8[§3提供改进§8]§f", "   §8[§7无§8]§f"])
// scrollRolledTooltip.put("single/scythe", ["§8[§3提供模块§8]§f", "   §8[§7单头工具(头部)§8]§f: 巨镰", "§8[§3提供改进§8]§f", "   §8[§7无§8]§f"])
// scrollRolledTooltip.put("double/aptr", ["§8[§3提供模块§8]§f", "   §8[§7无§8]§f", "§8[§3提供改进§8]§f", "   §8[§7劫难§8]§f", "§8[§3改进适用的部件§8]§f", "   §8[§7双头工具(左/右头部)§8]§f: 斧头"])
// scrollRolledTooltip.put("sword/katana/katana_blade", ["§8[§3提供模块§8]§f", "   §8[§7刀剑(剑刃)§8]§f: 武士刀", "   §8[§7刀剑(护手)§8]§f: 刀镡", "§8[§3提供改进§8]§f", "   §8[§7无§8]§f"])
// scrollRolledTooltip.put("tetra/rending_scissor_complete", ["§8[§3提供模块§8]§f", "   §8[§7刀剑(剑刃)§8]§f: 斩断之剪", "   §8[§7刀剑(剑刃)§8]§f: 左片剪太刀", "   §8[§7刀剑(剑刃)§8]§f: 右片剪太刀", "§8[§3提供改进§8]§f", "   §8[§7无§8]§f"])
// scrollRolledTooltip.put("single/head/mace_head/mace_head", ["§8[§3提供模块§8]§f", "   §8[§7单头工具(头部)§8]§f: 钉锤头", "§8[§3提供改进§8]§f", "   §8[§7无§8]§f"])
// scrollRolledTooltip.put("bow/stave/dreadnought_stave", ["§8[§3提供模块§8]§f", "   §8[§7弓(弓材)§8]§f: 无畏弓", "   §8[§7弩(弓材)§8]§f: 无畏弓", "§8[§3提供改进§8]§f", "   §8[§7无§8]§f"])
// scrollRolledTooltip.put("shou_tao/blazing_grips", ["§8[§3提供模块§8]§f", "   §8[§7手套(拳套)§8]§f: 炽热之握", "§8[§3提供改进§8]§f", "   §8[§7无§8]§f"])
// scrollRolledTooltip.put("armor/chestplate/purgatory_chestplate", ["§8[§3提供模块§8]§f", "   §8[§7头盔(头盔)§8]§f: 炼狱头盔", "   §8[§7胸甲(胸甲)§8]§f: 炼狱胸甲", "   §8[§7护腿(腰带)§8]§f: 炼狱腰带", "   §8[§7靴子(靴子)§8]§f: 炼狱靴子", "§8[§3提供改进§8]§f", "   §8[§7无§8]§f"])
// scrollRolledTooltip.put("armor/chestplate/pestilence_chestplate", ["§8[§3提供模块§8]§f", "   §8[§7头盔(头盔)§8]§f: 瘟疫头盔", "   §8[§7胸甲(胸甲)§8]§f: 瘟疫胸甲", "   §8[§7护腿(腰带)§8]§f: 瘟疫腰带", "   §8[§7靴子(靴子)§8]§f: 瘟疫靴子", "§8[§3提供改进§8]§f", "   §8[§7无§8]§f"])

// ItemEvents.tooltip(event => {
//   event.addAdvanced("tetra:scroll_rolled", (item, advanced, text) => {
//     let datas = item?.nbt?.BlockEntityTag?.data
//     if (!datas) return
//     let data = datas[0]
//     if (!data) return
//     let extraTooltip = scrollRolledTooltip.get(data.key)
//     if (!extraTooltip) return
//     let tooltipBuffer = Utils.newList()

//     if (event.isCtrl()) {
//       tooltipBuffer.add("§8[§fctrl§8]§f + ")
//       tooltipBuffer.addAll(extraTooltip)
//     } else {
//       tooltipBuffer.add("§7[§8ctrl§7]§8 + [查看卷轴提供的改进与适用模块]")
//     }
//     text.addAll(6, tooltipBuffer)
//   })
// })

// let $Registries = Java.loadClass("net.minecraft.core.registries.Registries")
// let $I18n = Java.loadClass("net.minecraft.client.resources.language.I18n")
// let result = Utils.newMap()
// let result1 = Utils.newMap()
// let result2 = Utils.newMap()
// Utils.getServer().registryAccess().registryOrThrow($Registries.STRUCTURE).keySet().forEach(key => {
//   let lang = "structure." + key.toLanguageKey()
//   if ($I18n.exists(lang)) {
//     result2.put(lang, $I18n.get(lang))
//   }
//   else {
//     result1.put(lang, key.toString())
//   }
// })
// result.putAll(result1)
// result.putAll(result2)
// JsonIO.write("kubejs/structure.json", result)



ClientEvents.highPriorityAssets(e => {
    e.add('kubejs:particles/flame', {
        textures: [
            "kubejs:flame"
        ]
    })
})