ServerEvents.highPriorityData(event => {

    // 1. 金星石 (新加)
    tetraMaterialBuilder(event, "venus_stone").setCategory("stone")
        .setPrimary(8).setSecondary(6).setTertiary(3.5)
        .setDurability(130).setIntegrityCost(3).setIntegrityGain(3)
        .setMagicCapacity(70).setToolLevel(2).setToolEfficiency(5)
        .addAttributes("**attributeslib:fire_damage", 0.10)
        .setTints("d35400", "e67e22") 
        .addTexture("grainy").addTexture("crude")
        .addItemMaterial('ad_astra:venus_stone')
        .setRequiredTool("hammer_dig", 1)
        .build();

    // 2. 炎狱尖塔块 (已修正)
    tetraMaterialBuilder(event, "infernal_spire_block").setCategory("stone")
        .setPrimary(9).setSecondary(4).setTertiary(4) // 次要属性设为4
        .setDurability(140).setIntegrityCost(4).setIntegrityGain(4)
        .setMagicCapacity(80).setToolLevel(5).setToolEfficiency(8)
        .addAttributes("attributeslib:fire_damage", 2.0) // 火焰伤害改为+2
        .setTints("b03a2e", "78281f")
        .addTexture("grainy").addTexture("crude").addTexture("default")
        .addItemMaterial('ad_astra:infernal_spire_block')
        .setRequiredTool("hammer_dig", 1)
        .build();

    // 3. 震动合金 (无需修改)
    tetraMaterialBuilder(event, "vibrant_alloy_ingot").setCategory("metal")
        .setPrimary(9.6).setSecondary(7).setTertiary(4.8)
        .setDurability(220).setIntegrityCost(5).setIntegrityGain(4)
        .setMagicCapacity(90).setToolLevel(3).setToolEfficiency(5.5)
        .addAttributes("minecraft:generic.armor", 1.0)
        .setTints("a3fb66", "7dbd4a") 
        .addTexture("metal").addTexture("shiny")
        .addItemMaterial('enderio:vibrant_alloy_ingot')
        .setRequiredTool("hammer_dig", 1)
        .addEffects("fot:fe_store", 24000)
        .build();

    // 4. 门瑞欧结晶 (无需修改)
    tetraMaterialBuilder(event, "crystalized_menril_chunk").setCategory("gem")
        .setPrimary(8).setSecondary(12).setTertiary(4)
        .setDurability(200).setIntegrityCost(5).setIntegrityGain(4)
        .setMagicCapacity(100).setToolLevel(2).setToolEfficiency(6)
        .addAttributes("minecraft:generic.armor_toughness", 0.75)
        .setTints("25faf3", "428dc7") 
        .addTexture("shiny").addTexture("crude")
        .addItemMaterial('integrateddynamics:crystalized_menril_chunk')
        .setRequiredTool("hammer_dig", 1)
        .addEnchantment("minecraft:efficiency", 1)
        .build();

    // 5. 爆裂紫颂果 (已修正说明)
    tetraMaterialBuilder(event, "popped_chorus_fruit").setCategory("misc")
        .setPrimary(9).setSecondary(12).setTertiary(6)
        .setDurability(120).setIntegrityCost(4).setIntegrityGain(5)
        .setMagicCapacity(110).setToolLevel(2).setToolEfficiency(4.5)
        .addAttributes("attributeslib:armor_pierce", 2.0) // 修改为护甲穿透
        .setTints("8e44ad", "2e113d") 
        .addTexture("crude").addTexture("default")
        .addItemMaterial('minecraft:popped_chorus_fruit')
        .setRequiredTool("hammer_dig", 1)
        .build();

    // 6. 耐热金属 (无需修改)
    tetraMaterialBuilder(event, "calorite").setCategory("metal")
        .setPrimary(15).setSecondary(3).setTertiary(7.5)
        .setDurability(260).setIntegrityCost(4).setIntegrityGain(5)
        .setMagicCapacity(120).setToolLevel(4).setToolEfficiency(7)
        .addAttributes("slashblade_sendims:frenzy_resistance", 0.05)
        .addAttributes("slashblade_sendims:frenzy_damage", 0.05)
        .addAttributes("minecraft:generic.max_health", 4.0)
        .setTints("e74c3c", "922b21") 
        .addTexture("metal").addTexture("heavy")
        .setTagMaterial('forge:ingots/calorite')
        .setRequiredTool("hammer_dig", 1)
        .addEffects("fot:fe_store", 18000)
        .build();

    // 7. 水星石 (新加)
    tetraMaterialBuilder(event, "mercury_stone").setCategory("stone")
        .setPrimary(10).setSecondary(5).setTertiary(6)
        .setDurability(130).setIntegrityCost(4).setIntegrityGain(4)
        .setMagicCapacity(80).setToolLevel(2).setToolEfficiency(5)
        .addAttributes("**attributeslib:cold_damage", 0.10)
        .setTints("85929e", "5d6d7e") 
        .addTexture("grainy").addTexture("crude")
        .addItemMaterial('ad_astra:mercury_stone')
        .setRequiredTool("hammer_dig", 1)
        .build();

    // 8. 墨丘利耐火结构组件 (新加)
    tetraMaterialBuilder(event, "mercury_refractory").setCategory("metal")
        .setPrimary(22).setSecondary(22).setTertiary(11.5)
        .setDurability(260).setIntegrityCost(4).setIntegrityGain(6)
        .setMagicCapacity(130).setToolLevel(3).setToolEfficiency(7)
        .addAttributes("**minecraft:generic.attack_damage", 0.02)
        .addAttributes("slashblade_sendims:frenzy_resistance", 0.05)
        .addAttributes("minecraft:generic.knockback_resistance", 0.05)
        .setTints("d35400", "873600") 
        .addTexture("metal").addTexture("heavy")
        .addItemMaterial('kubejs:mercury_refractory_structural_component')
        .setRequiredTool("hammer_dig", 1)
        .build();

    // 9. 逻辑导向零件 (修改颜色)
    tetraMaterialBuilder(event, "logic_director").setCategory("metal")
        .setPrimary(14).setSecondary(6).setTertiary(7)
        .setDurability(240).setIntegrityCost(6).setIntegrityGain(5)
        .setMagicCapacity(130).setToolLevel(3).setToolEfficiency(6.5)
        .addAttributes("slashblade_sendims:ap_gain_percentage", 0.1)
        .addAttributes("attributeslib:experience_gained", 0.1)
        .setTints("8e44ad", "2e113d") 
        .addTexture("metal").addTexture("default")
        .addItemMaterial('integrateddynamics:logic_director')
        .setRequiredTool("hammer_dig", 1)
        .build();

    tetraMaterialBuilder(event, "manasteel").setCategory("metal")
        .setPrimary(14).setSecondary(5).setTertiary(7.5)
        .setDurability(280).setIntegrityCost(6).setIntegrityGain(6)
        .setMagicCapacity(230).setToolLevel(3).setToolEfficiency(7.5)
        .addAttributes("slashblade_sendims:magic_penetration", 1)
        .setTints("6ea8f1", "0e60e5") 
        .addTexture("shiny").addTexture("metal")
        .addItemMaterial("botania:manasteel_ingot")
        .setRequiredTool("hammer_dig", 1)
        .addImprovements("mana_repair", 1)
        .addEffects("mana_resonance", [1, 0])
        .build();

    // 10. 紫菘玻璃 (无需修改)
    tetraMaterialBuilder(event, "chorus_glass").setCategory("gem")
        .setPrimary(18).setSecondary(4).setTertiary(10)
        .setDurability(180).setIntegrityCost(6).setIntegrityGain(6)
        .setMagicCapacity(115).setToolLevel(3).setToolEfficiency(8)
        .addAttributes("slashblade_sendims:ap_reduce_amount", 10.0)
        .addAttributes("attributeslib:armor_pierce", 2.0)
        .setTints("d7bde2", "633974") 
        .addTexture("shiny").addTexture("crude")
        .addItemMaterial('integratedterminals:chorus_glass')
        .setRequiredTool("hammer_dig", 1)
        .build();

    // // 11. 虚金 (无需修改)
    // tetraMaterialBuilder(event, "virtual_gold_ingot").setCategory("metal")
    //     .setPrimary(15.5).setSecondary(6).setTertiary(8)
    //     .setDurability(200).setIntegrityCost(6).setIntegrityGain(6)
    //     .setMagicCapacity(140).setToolLevel(3).setToolEfficiency(7.5)
    //     .addAttributes("attributeslib:crit_chance", 0.05)
    //     .addAttributes("minecraft:generic.knockback_resistance", 0.1)
    //     .setTints("f1c40f", "d4ac0d") 
    //     .addTexture("metal").addTexture("shiny")
    //     .addItemMaterial('kubejs:virtual_gold_ingot')
    //     .setRequiredTool("hammer_dig", 1)
    //     .build();

    // 12. 扼塞 (新加)
    tetraMaterialBuilder(event, "cloggrum").setCategory("metal")
        .setPrimary(14).setSecondary(5).setTertiary(6)
        .setDurability(180).setIntegrityCost(5).setIntegrityGain(5)
        .setMagicCapacity(100).setToolLevel(2).setToolEfficiency(6)
        .addAttributes("attributeslib:crit_chance", -0.03)
        .addAttributes("**minecraft:generic.attack_damage", 0.03)
        .setTints("7d765c", "eddb8c") 
        .addTexture("metal").addTexture("crude")
        .addItemMaterial('undergarden:cloggrum_ingot')
        .setRequiredTool("hammer_dig", 1)
        .build();

    // 13. 御腐 (Utherium - 已修正)
    tetraMaterialBuilder(event, "utherium").setCategory("metal")
        .setPrimary(14).setSecondary(5).setTertiary(7.5)
        .setDurability(250).setIntegrityCost(6).setIntegrityGain(7)
        .setMagicCapacity(100).setToolLevel(3).setToolEfficiency(6.5)
        .addAttributes("attributeslib:crit_damage", -0.05)
        .addAttributes("minecraft:generic.attack_damage", 1.5)
        .setTints("ff7578", "f55659") 
        .addTexture("metal").addTexture("heavy")
        .setTagMaterial('forge:ingots/utherium')
        .setRequiredTool("hammer_dig", 1)
        .build();

    // 14. 霜钢 (已修正)
    tetraMaterialBuilder(event, "frost_steel").setCategory("metal")
        .setPrimary(15).setSecondary(7).setTertiary(9) // 修正主属性为 15
        .setDurability(280).setIntegrityCost(7).setIntegrityGain(7)
        .setMagicCapacity(140).setToolLevel(4).setToolEfficiency(7.5)
        .addAttributes("attributeslib:cold_damage", 4.0)
        .setTints("85c1e9", "2e86c1") 
        .addTexture("metal").addTexture("heavy")
        .setTagMaterial('forge:ingots/froststeel') 
        .setRequiredTool("hammer_dig", 1)
        .build();

    // 15. 极限合金 (已修正)
    tetraMaterialBuilder(event, "extreme_alloy").setCategory("metal")
        .setPrimary(16).setSecondary(10).setTertiary(9.8) // 修正主属性为 16
        .setDurability(300).setIntegrityCost(7).setIntegrityGain(7)
        .setMagicCapacity(150).setToolLevel(4).setToolEfficiency(8)
        .addAttributes("attributeslib:armor_shred", 0.025) // 修正为 2.5% 盔甲撕裂
        .addAttributes("minecraft:generic.armor_toughness", 0.5) // 新增韧性+0.5
        .setTints("566573", "2c3e50") 
        .addTexture("metal").addTexture("heavy")
        .setTagMaterial('forge:ingots/extreme')
        .setRequiredTool("hammer_dig", 1)
        .build();

    // 16. 贵豪 (无需修改)
    tetraMaterialBuilder(event, "regalium").setCategory("metal")
        .setPrimary(20).setSecondary(10).setTertiary(10)
        .setDurability(290).setIntegrityCost(8).setIntegrityGain(8)
        .setMagicCapacity(160).setToolLevel(4).setToolEfficiency(7.5)
        .addAttributes("attributeslib:experience_gained", 0.15)
        .addAttributes("attributeslib:crit_damage", 0.05)
        .setTints("f39c12", "e67e22") 
        .addTexture("metal").addTexture("shiny")
        .setTagMaterial('forge:ingots/regalium')
        .setRequiredTool("hammer_dig", 1)
        .build();

    // 17. 遗忆 (无需修改)
    tetraMaterialBuilder(event, "forgotten").setCategory("metal")
        .setPrimary(23).setSecondary(8).setTertiary(11)
        .setDurability(300).setIntegrityCost(8).setIntegrityGain(8)
        .setMagicCapacity(140).setToolLevel(4).setToolEfficiency(8)
        .addAttributes("minecraft:generic.armor", 1.0)
        .addAttributes("attributeslib:armor_pierce", 1.0)
        .setTints("d5dbdb", "808b96") 
        .addTexture("metal").addTexture("crude")
        .setTagMaterial('forge:ingots/forgotten_metal')
        .setRequiredTool("hammer_dig", 1)
        .build();

    // 18. 中子 (Neutronium - 原有修复)
    tetraMaterialBuilder(event, "neutronium").setCategory("metal")
        .setPrimary(17).setSecondary(18).setTertiary(10)
        .setDurability(300).setIntegrityCost(8).setIntegrityGain(8)
        .setMagicCapacity(160).setToolLevel(4).setToolEfficiency(5)
        .addAttributes("**minecraft:generic.movement_speed", -0.05)
        .addAttributes("minecraft:generic.attack_damage", 2.0)
        .setTints("17202a", "000000") 
        .addTexture("metal").addTexture("heavy")
        .setTagMaterial('forge:ingots/neutronium')
        .setRequiredTool("hammer_dig", 1)
        .build();

    // 20. 悲哀线圈 (新加)
    tetraMaterialBuilder(event, "coil_of_sorrow").setCategory("metal")
        .setPrimary(25).setSecondary(8).setTertiary(11)
        .setDurability(280).setIntegrityCost(7).setIntegrityGain(9)
        .setMagicCapacity(150).setToolLevel(4).setToolEfficiency(7)
        .addAttributes("attributeslib:armor_pierce", 1.5)
        .addAttributes("slashblade_sendims:frenzy_damage", 0.05)
        .addAttributes("minecraft:generic.max_health", 4.0)
        .setTints("7b241c", "4a2311") 
        .addTexture("metal").addTexture("shiny")
        .addItemMaterial('kubejs:coil_of_sorrow')
        .setRequiredTool("hammer_dig", 1)
        .addEffects("fot:fe_store", 24000)
        .build();

    // 21. Xenorium 298 (新加)
    tetraMaterialBuilder(event, "xenorium_298").setCategory("metal")
        .setPrimary(19).setSecondary(23).setTertiary(10)
        .setDurability(300).setIntegrityCost(6).setIntegrityGain(6)
        .setMagicCapacity(160).setToolLevel(4).setToolEfficiency(8)
        .addAttributes("slashblade_sendims:frenzy_damage", 0.1)
        .addAttributes("attributeslib:fire_damage", 4.0)
        .addAttributes("minecraft:generic.max_health", 4.0)
        .setTints("5b2c6f", "21043f") 
        .addTexture("metal").addTexture("shiny")
        .addItemMaterial('nuclearcraft:xenorium_298')
        .setRequiredTool("hammer_dig", 1)
        .build();

    // 22. 铍青铜复合材料 (替换原铍青铜)
    tetraMaterialBuilder(event, "menril-silicon_sic_sic_cmc").setCategory("metal")
        .setPrimary(26).setSecondary(19).setTertiary(13)
        .setDurability(300).setIntegrityCost(8).setIntegrityGain(9)
        .setMagicCapacity(150).setToolLevel(4).setToolEfficiency(8)
        .addAttributes("minecraft:generic.armor_toughness", 1)
        .addAttributes("slashblade_sendims:frenzy_resistance", 0.05)
        .addAttributes("attributeslib:crit_chance", 0.03)
        .setTints("fffccc", "82fffb") 
        .addTexture("metal").addTexture("heavy")
        .addItemMaterial('kubejs:menril-silicon_sic_sic_cmc_ingot')
        .setRequiredTool("hammer_dig", 1)
        .build();

    // 23. 虚空石 (新加)
    tetraMaterialBuilder(event, "void_stone").setCategory("stone")
        .setPrimary(19).setSecondary(12).setTertiary(10)
        .setDurability(200).setIntegrityCost(6).setIntegrityGain(6)
        .setMagicCapacity(130).setToolLevel(4).setToolEfficiency(8)
        .addAttributes("terra_curio:aggro", -30)
        .addAttributes("attributeslib:armor_pierce", 1.5)
        .setTints("17202a", "000000") 
        .addTexture("grainy").addTexture("heavy")
        .addItemMaterial('cataclysm:void_stone')
        .setRequiredTool("hammer_dig", 1)
        .build();

    // 24. 虚空核心 (新加)
    tetraMaterialBuilder(event, "void_core").setCategory("gem")
        .setPrimary(18).setSecondary(35).setTertiary(13)
        .setDurability(250).setIntegrityCost(6).setIntegrityGain(8)
        .setMagicCapacity(160).setToolLevel(4).setToolEfficiency(8)
        .addAttributes("attributeslib:armor_shred", 0.03)
        .setTints("512e5f", "150a21") 
        .addTexture("metal").addTexture("shiny")
        .addItemMaterial('cataclysm:void_core')
        .setRequiredTool("hammer_dig", 1)
        .addEnchantment("minecraft:power", 1)
        .addEnchantment("minecraft:sharpness", 1)
        .build();

    // 25. 幻境石水晶 (无需修改)
    tetraMaterialBuilder(event, "myalite_crystal").setCategory("gem")
        .setPrimary(14).setSecondary(25).setTertiary(10)
        .setDurability(280).setIntegrityCost(9).setIntegrityGain(9)
        .setMagicCapacity(160).setToolLevel(4).setToolEfficiency(7)
        .addAttributes("attributeslib:crit_damage", 0.05)
        .setTints("d2b4de", "7d3c98") 
        .addTexture("shiny").addTexture("default")
        .addItemMaterial('quark:myalite_crystal')
        .setRequiredTool("hammer_dig", 1)
        .addEnchantment("last_smith:spirit_slash", 1)
        .addEnchantment("last_smith:spirit_absorption", 1)
        .build();

    // 26. 紫颂果结晶 (已修正)
    tetraMaterialBuilder(event, "crystalized_chorus").setCategory("gem")
        .setPrimary(13).setSecondary(12).setTertiary(9)
        .setDurability(220).setIntegrityCost(9).setIntegrityGain(10)
        .setMagicCapacity(140).setToolLevel(3).setToolEfficiency(6)
        .addAttributes("attributeslib:cold_damage", 4) // 修正为由之前火冰均属性修改为仅仅冰霜伤害+7.5
        .setTints("bb8fce", "5b2c6f") 
        .addTexture("shiny").addTexture("crude")
        .addItemMaterial('integrateddynamics:crystalized_chorus_chunk')
        .setRequiredTool("hammer_dig", 1)
        .build();

    // 27. 末地钢锭 (已修正)
    tetraMaterialBuilder(event, "end_steel").setCategory("metal")
        .setPrimary(25).setSecondary(13).setTertiary(12)
        .setDurability(300).setIntegrityCost(9).setIntegrityGain(10)
        .setMagicCapacity(160).setToolLevel(4).setToolEfficiency(8)
        .addAttributes("slashblade_sendims:sprint_cd", 0.05)
        .addAttributes("slashblade_sendims:ap_reduce_amount", 15.0)
        .addAttributes("minecraft:generic.attack_damage", 1.0)
        .setTints("273746", "1d8348") 
        .addTexture("metal").addTexture("heavy").addTexture("shiny")
        .addItemMaterial('enderio:end_steel_ingot')
        .setRequiredTool("hammer_dig", 1)
        .addEffects("mana_resonance", [1, 0])
        .addEffects("fot:fe_store", 32000)
        .build();

    // 28. 紫菘逻辑线圈 (新加)
    tetraMaterialBuilder(event, "chorus_logic_composite_coil").setCategory("metal")
        .setPrimary(25).setSecondary(10).setTertiary(12)
        .setDurability(280).setIntegrityCost(8).setIntegrityGain(12)
        .setMagicCapacity(160).setToolLevel(4).setToolEfficiency(8)
        .addAttributes("attributeslib:experience_gained", 0.1)
        .addAttributes("attributeslib:cold_damage", 8.0)
        .addAttributes("minecraft:generic.attack_damage", -2.5)
        .setTints("8e44ad", "2e113d") 
        .addTexture("metal").addTexture("shiny")
        .addItemMaterial('kubejs:chorus_logic_composite_coil')
        .setRequiredTool("hammer_dig", 1)
        .build();

    // 30. 夜冥
    tetraMaterialBuilder(event, "nagrilite").setCategory("metal")
        .setPrimary(13).setSecondary(7).setTertiary(8)
        .setDurability(220).setIntegrityCost(3).setIntegrityGain(5)
        .setMagicCapacity(100).setToolLevel(3).setToolEfficiency(6)
        .addAttributes("minecraft:generic.armor", 1.0)
        .setTints("5b2c6f", "2e113d")
        .addTexture("metal").addTexture("heavy")
        .addItemMaterial('midnight:nagrilite_ingot')
        .setRequiredTool("hammer_dig", 1)
        .addEnchantment("last_smith:spirit_absorption", 1.5)
        .build();

    // 31. 黯铁
    tetraMaterialBuilder(event, "ebonite").setCategory("fibre")
        .setPrimary(9.5).setSecondary(16).setTertiary(9)
        .setDurability(240).setIntegrityCost(3).setIntegrityGain(5)
        .setMagicCapacity(110).setToolLevel(3).setToolEfficiency(6.5)
        .addAttributes("**minecraft:generic.movement_speed", 0.05)
        .setTints("1a1520", "0d0a0f")
        .addTexture("metal").addTexture("shiny")
        .addItemMaterial('midnight:ebonite')
        .setRequiredTool("hammer_dig", 1)
        .addEnchantment("last_smith:spirit_slash", 1.5)
        .build();

    // 32. 幽光
    tetraMaterialBuilder(event, "virilux").setCategory("gem")
        .setPrimary(21).setSecondary(0).setTertiary(10)
        .setDurability(270).setIntegrityCost(3).setIntegrityGain(6)
        .setMagicCapacity(140).setToolLevel(4).setToolEfficiency(7.5)
        .addAttributes("attributeslib:armor_pierce", 3.0)
        .setTints("d4a5ff", "7d3c98")
        .addTexture("metal").addTexture("shiny")
        .addItemMaterial('midnight:virilux')
        .setRequiredTool("hammer_dig", 1)
        .build();

    // 33. 铼碎片
    tetraMaterialBuilder(event, "rendium").setCategory("bone")
        .setPrimary(10).setSecondary(1).setTertiary(9)
        .setDurability(220).setIntegrityCost(4).setIntegrityGain(6)
        .setMagicCapacity(130).setToolLevel(3).setToolEfficiency(6)
        .addAttributes("attributeslib:cold_damage", 8.0)
        .setTints("5dade2", "1f618d")
        .addTexture("metal").addTexture("crude")
        .addItemMaterial('midnight:rendium_shard')
        .setRequiredTool("hammer_dig", 1)
        .addEnchantment("apotheosis:miners_fervor", 2)
        .build();

    // 34. 熔渣锭
    tetraMaterialBuilder(event, "scoria").setCategory("metal")
        .setPrimary(13).setSecondary(26).setTertiary(10)
        .setDurability(280).setIntegrityCost(4).setIntegrityGain(4)
        .setMagicCapacity(150).setToolLevel(4).setToolEfficiency(7.5)
        .addAttributes("attributeslib:fire_damage", 6.0)
        .setTints("e74c3c", "922b21")
        .addTexture("metal").addTexture("heavy")
        .addItemMaterial('kubejs:scoria_ingot')
        .setRequiredTool("hammer_dig", 1)
        .build();

})