"""Material definitions for the Truly Modular addon. One entry per material. `generate_materials.py` turns these into MIAPI material JSON, pulling the colour palette out of the source mod's own item texture. Stat calibration follows Tinkers' Construct 3 (1.20.1) in spirit, re-scaled onto MIAPI's vanilla-derived numbers: material hardness density durability ench tier mining copper 4.2 3.6 200 13 2 5 iron 5.0 3.8 235 14 3 6 diamond 6.0 2.0 1546 10 4 8 netherite 7.0 2.0 2016 15 5 9 Tinkers' character mapping used below: cobalt -> titanium light, fast, durable, unremarkable damage steel -> steel balanced workhorse, no frills hepatizon -> brass/bronze copper alloys, damage and enchantability manyullyn -> dragonsteel top damage, endgame gate rose gold -> refined glowstone / pixie dust fragile, huge enchantability ancient hide -> dragon scales, chitin armour-first, high toughness Tiers 6 and 7 sit above netherite by request: 6 = refined obsidian, shadow steel, refined radiance, atomic alloy; 7 = dragonsteel and antimatter. """ # Mining level tags, indexed by tier. MINING_LEVEL = { 1: "minecraft:incorrect_for_wooden_tool", 2: "minecraft:incorrect_for_stone_tool", 3: "minecraft:incorrect_for_iron_tool", 4: "minecraft:incorrect_for_diamond_tool", 5: "minecraft:incorrect_for_netherite_tool", 6: "minecraft:incorrect_for_netherite_tool", 7: "minecraft:incorrect_for_netherite_tool", } NUGGET = 0.11112 # 1/9, matching MIAPI's own nugget values BLOCK = 9.0 # Sub-packs. Each becomes a NeoForge built-in datapack that is only registered # when its mod is present, so a material never references a missing item. # Where two mods add the same metal, one is picked as the provider and the # material lives in that mod's pack - see the Immersive Engineering section. PACKS = { "mekanism": {"mod": "mekanism", "name": "Mekanism Materials"}, "create": {"mod": "create", "name": "Create Materials"}, "iceandfire": {"mod": "iceandfire", "name": "Ice and Fire Materials"}, "air_war": {"mod": "create_the_air_wars", "name": "Create: The Air War Materials"}, "cosmonautics": {"mod": "rocketnautics", "name": "Create: Cosmonautics Materials"}, "irons_spellbooks": {"mod": "irons_spellbooks", "name": "Iron's Spells Materials"}, "interstellar": {"mod": "vsie", "name": "Interstellar Expansion Materials"}, "immersiveengineering": {"mod": "immersiveengineering", "name": "Immersive Engineering Materials"}, } # Attribute this mod registers itself, so a material can grant something the # game has no attribute for. See FireImmunity.java. FIRE_IMMUNITY = "cmmodular:fire_immunity" def attribute(attr, value, slot, operation="+"): return {"attribute": attr, "value": str(value), "operation": operation, "slot": slot} def M(name, pack, group, translation, palette_from, items, tier, hardness, density, flexibility, durability, enchantability, mining_speed, *, groups=None, toughness=0, armor_durability=None, armor_toughness=None, knockback_resistance=None, textures=("metallic",), properties=None, icon=None, mining_level=None): """One material. `palette_from` is the item whose texture seeds the palette.""" return { "name": name, "pack": pack, "group": group, "translation": translation, "palette_from": palette_from, "icon": icon or palette_from, "items": items, "groups": list(groups) if groups else [group], "textures": list(textures), "properties": properties or {}, "stats": { "hardness": hardness, "density": density, "flexibility": flexibility, "durability": durability, "enchantability": enchantability, "toughness": toughness, "tier": tier, "mining_speed": mining_speed, "mining_level": mining_level or MINING_LEVEL[tier], **({"armor_durability": armor_durability} if armor_durability is not None else {}), **({"armor_toughness": armor_toughness} if armor_toughness is not None else {}), **({"knockback_resistance": knockback_resistance} if knockback_resistance is not None else {}), }, } def ingots(mod, ingot, nugget=None, block=None, extra=()): out = [{"item": f"{mod}:{ingot}", "value": 1.0}] if nugget: out.append({"item": f"{mod}:{nugget}", "value": NUGGET}) if block: out.append({"item": f"{mod}:{block}", "value": BLOCK}) out.extend(extra) return out def speed(value): """Attack speed tweak on held modules: positive is faster.""" return {"attributes": [{"attribute": "generic.attack_speed", "value": str(value), "operation": "+", "slot": "mainhand"}]} MATERIALS = [ # ------------------------------------------------------------------ Mekanism M("tin", "mekanism", "metal", "Tin", "mekanism:ingot_tin", ingots("mekanism", "ingot_tin", "nugget_tin", "block_tin"), tier=2, hardness=3.4, density=2.6, flexibility=2.5, durability=150, enchantability=16, mining_speed=5, armor_durability=9, textures=("metallic", "bright")), # Soft, light and cheap: the tier-2 filler metal. Tinkers has no tin, so # this reads off real tin - low hardness, corrosion-proof, easy to work. M("lead", "mekanism", "metal", "Lead", "mekanism:ingot_lead", ingots("mekanism", "ingot_lead", "nugget_lead", "block_lead"), tier=3, hardness=4.2, density=6.0, flexibility=0.5, durability=300, enchantability=8, mining_speed=4, toughness=1, armor_durability=16, knockback_resistance=0.05, properties={"handheld": speed(-0.12)}), # The heaviest thing here. Slow swing, poor enchanting, but it plants you. M("osmium", "mekanism", "metal", "Osmium", "mekanism:ingot_osmium", ingots("mekanism", "ingot_osmium", "nugget_osmium", "block_osmium"), tier=4, hardness=5.6, density=5.6, flexibility=0.5, durability=620, enchantability=10, mining_speed=6, toughness=2, armor_durability=22, armor_toughness=1.0, properties={"handheld": speed(-0.08)}), # Densest metal that exists. Heavy-weapon material: big density offset, # real toughness, sluggish in hand. M("bronze", "mekanism", "metal", "Bronze", "mekanism:ingot_bronze", ingots("mekanism", "ingot_bronze", "nugget_bronze", "block_bronze"), tier=3, hardness=4.9, density=4.0, flexibility=1, durability=420, enchantability=12, mining_speed=6, toughness=1, armor_durability=19), # Tinkers' amethyst bronze slot: a solid step past iron, nothing exotic. M("steel", "mekanism", "metal", "Steel", "mekanism:ingot_steel", ingots("mekanism", "ingot_steel", "nugget_steel", "block_steel"), tier=4, hardness=6.0, density=4.2, flexibility=1.5, durability=720, enchantability=9, mining_speed=7, toughness=2, armor_durability=26, armor_toughness=1.0), # Tinkers' steel almost verbatim: diamond harvest tier, balanced, boring # in the way a workhorse should be. Poor enchantability is the cost. M("uranium", "mekanism", "metal", "Uranium", "mekanism:ingot_uranium", ingots("mekanism", "ingot_uranium", "nugget_uranium", "block_uranium"), tier=4, hardness=6.2, density=5.8, flexibility=0.5, durability=900, enchantability=6, mining_speed=6, toughness=2, armor_durability=24, properties={"default": {"emissive": {"sky": 3, "block": 3}}, "handheld": {"leeching": "0.5", **speed(-0.06)}}), # Dense, faintly glowing, actively bad for you - leeching stands in for # radiation, and enchantability is the worst on the list. M("refined_obsidian", "mekanism", "metal", "Refined Obsidian", "mekanism:ingot_refined_obsidian", ingots("mekanism", "ingot_refined_obsidian", "nugget_refined_obsidian", "block_refined_obsidian"), tier=6, hardness=8.0, density=4.6, flexibility=2, durability=2600, enchantability=12, mining_speed=12, toughness=4, armor_durability=42, armor_toughness=4.0, properties={"default": {"fire_proof": True}, "handheld": speed(-0.05)}), M("refined_glowstone", "mekanism", "metal", "Refined Glowstone", "mekanism:ingot_refined_glowstone", ingots("mekanism", "ingot_refined_glowstone", "nugget_refined_glowstone", "block_refined_glowstone"), tier=5, hardness=5.0, density=2.4, flexibility=4, durability=700, enchantability=30, mining_speed=11, toughness=1, armor_durability=22, textures=("emissive", "metallic"), properties={"default": {"emissive": {"sky": 15, "block": 15}}, "tool": {"luminious_learning": "1"}}), # Tinkers' rose gold role: fragile for its tier, best-in-slot enchanting. M("infused_alloy", "mekanism", "metal", "Infused Alloy", "mekanism:alloy_infused", [{"item": "mekanism:alloy_infused", "value": 1.0}], tier=4, hardness=5.8, density=3.6, flexibility=2, durability=800, enchantability=16, mining_speed=8, toughness=2, armor_durability=26), M("reinforced_alloy", "mekanism", "metal", "Reinforced Alloy", "mekanism:alloy_reinforced", [{"item": "mekanism:alloy_reinforced", "value": 1.0}], tier=5, hardness=6.6, density=4.0, flexibility=2, durability=1600, enchantability=14, mining_speed=9, toughness=3, armor_durability=34, armor_toughness=2.0), M("atomic_alloy", "mekanism", "metal", "Atomic Alloy", "mekanism:alloy_atomic", [{"item": "mekanism:alloy_atomic", "value": 1.0}], tier=6, hardness=7.8, density=3.8, flexibility=3, durability=2800, enchantability=18, mining_speed=11, toughness=4, armor_durability=44, armor_toughness=3.5, properties={"default": {"fire_proof": True}}), # Mekanism's alloy ladder ends here, so it tops out the tier-6 band. M("fluorite", "mekanism", "crystal", "Fluorite", "mekanism:fluorite_gem", [{"item": "mekanism:fluorite_gem", "value": 1.0}, {"item": "mekanism:block_fluorite", "value": 4.0}], tier=4, hardness=5.6, density=2.2, flexibility=0, durability=600, enchantability=18, mining_speed=8, toughness=1, armor_durability=20, groups=("crystal", "gem"), textures=("crystal", "bright"), properties={"default": {"emissive": {"sky": 4, "block": 4}}}), # Real fluorite fluoresces, hence the faint glow; brittle, so no flex. M("hdpe", "mekanism", "metal", "HDPE", "mekanism:hdpe_sheet", [{"item": "mekanism:hdpe_sheet", "value": 1.0}, {"item": "mekanism:hdpe_pellet", "value": 0.25}, {"item": "mekanism:hdpe_rod", "value": 0.5}], tier=3, hardness=3.2, density=0.9, flexibility=6, durability=450, enchantability=20, mining_speed=3, toughness=1, armor_durability=18, textures=("rough",), properties={"handheld": speed(0.1)}), # Plastic: nearly weightless, very flexible, hopeless at cutting rock. M("plutonium", "mekanism", "metal", "Plutonium", "mekanism:pellet_plutonium", [{"item": "mekanism:pellet_plutonium", "value": 1.0}], tier=5, hardness=6.8, density=5.6, flexibility=0.5, durability=1500, enchantability=8, mining_speed=8, toughness=3, armor_durability=30, properties={"default": {"emissive": {"sky": 5, "block": 5}}, "handheld": {"leeching": "0.7"}}), M("polonium", "mekanism", "metal", "Polonium", "mekanism:pellet_polonium", [{"item": "mekanism:pellet_polonium", "value": 1.0}], tier=5, hardness=6.6, density=5.0, flexibility=1, durability=1400, enchantability=9, mining_speed=8, toughness=3, armor_durability=30, properties={"default": {"emissive": {"sky": 6, "block": 6}}, "handheld": {"leeching": "0.7"}}), M("antimatter", "mekanism", "metal", "Antimatter", "mekanism:pellet_antimatter", [{"item": "mekanism:pellet_antimatter", "value": 1.0}], tier=7, hardness=9.5, density=2.0, flexibility=3, durability=4000, enchantability=22, mining_speed=15, toughness=5, armor_durability=52, armor_toughness=5.0, textures=("emissive", "metallic"), properties={"default": {"fire_proof": True, "emissive": {"sky": 12, "block": 12}}, "handheld": {"immolate": "5"}}), # The single most expensive item in Mekanism, so it shares the ceiling # with dragonsteel. # -------------------------------------------------------------------- Create M("zinc", "create", "metal", "Zinc", "create:zinc_ingot", ingots("create", "zinc_ingot", "zinc_nugget", "zinc_block"), tier=2, hardness=3.8, density=3.0, flexibility=1.5, durability=180, enchantability=15, mining_speed=5, armor_durability=10, textures=("metallic", "bright")), # Brittle in reality, so it stays a tier-2 stepping stone to brass. M("brass", "create", "metal", "Brass", "create:brass_ingot", ingots("create", "brass_ingot", "brass_nugget", "brass_block", extra=[{"item": "create:brass_sheet", "value": 1.0}]), tier=3, hardness=5.0, density=3.4, flexibility=2, durability=380, enchantability=18, mining_speed=8, toughness=1, armor_durability=18, textures=("metallic", "bright")), # Create's precision metal, and Tinkers' hepatizon slot: quick and # enchantable rather than durable. M("andesite_alloy", "create", "metal", "Andesite Alloy", "create:andesite_alloy", [{"item": "create:andesite_alloy", "value": 1.0}, {"item": "create:andesite_alloy_block", "value": BLOCK}], tier=2, hardness=4.4, density=4.2, flexibility=1, durability=210, enchantability=8, mining_speed=4, toughness=1, armor_durability=12, groups=("metal", "stone"), textures=("rough", "metallic")), # Half rock, half metal - grouped as both so stone and metal modules take it. M("refined_radiance", "create", "metal", "Refined Radiance", "create:refined_radiance", [{"item": "create:refined_radiance", "value": 1.0}], tier=6, hardness=7.4, density=2.0, flexibility=4, durability=2500, enchantability=28, mining_speed=12, toughness=4, armor_durability=40, armor_toughness=3.0, textures=("emissive", "metallic"), properties={"default": {"fire_proof": True, "emissive": {"sky": 15, "block": 15}}, "tool": {"luminious_learning": "1"}, "handheld": {"illager_bane": "1"}}), M("shadow_steel", "create", "metal", "Shadow Steel", "create:shadow_steel", [{"item": "create:shadow_steel", "value": 1.0}], tier=6, hardness=8.2, density=4.8, flexibility=2, durability=2700, enchantability=14, mining_speed=10, toughness=4, armor_durability=42, armor_toughness=3.5, properties={"default": {"fire_proof": True}, "handheld": {"leeching": "1"}}), # Create's two chapter-end materials are deliberately a matched pair: # radiance enchants and glows, shadow steel hits and drains. # ----------------------------------------------------------------- Aerospace # Both Air War and Cosmonautics add titanium. This is one material fed by # tags so either mod (or both) supplies it; see the c: tag files. M("titanium", "cosmonautics", "metal", "Titanium", "rocketnautics:titanium_ingot", [{"item": "rocketnautics:titanium_ingot", "value": 1.0}, {"item": "rocketnautics:titanium_nugget", "value": NUGGET}, {"item": "rocketnautics:titanium_sheet", "value": 1.0}, {"item": "rocketnautics:titanium_block", "value": BLOCK}], tier=4, hardness=5.8, density=1.6, flexibility=3, durability=1150, enchantability=11, mining_speed=9, toughness=2, armor_durability=32, armor_toughness=1.5, properties={"default": {"fire_proof": True}, "handheld": speed(0.06)}), # Tinkers' cobalt: light, fast, very durable, damage only average. Heat # resistance is what separates it from steel. M("titanium_alloy", "cosmonautics", "metal", "Titanium Alloy", "rocketnautics:titanium_alloy", [{"item": "rocketnautics:titanium_alloy", "value": 1.0}, {"item": "rocketnautics:titanium_alloy_nugget", "value": NUGGET}, {"item": "rocketnautics:titanium_alloy_sheet", "value": 1.0}, {"item": "rocketnautics:titanium_alloy_block", "value": BLOCK}], tier=5, hardness=6.8, density=2.2, flexibility=3, durability=1900, enchantability=12, mining_speed=10, toughness=3, armor_durability=36, armor_toughness=2.0, properties={"default": {"fire_proof": True}}), # ------------------------------------------------------- Create: The Air War M("sulfur", "air_war", "crystal", "Sulfur", "create_the_air_wars:raw_sulfur", [{"item": "create_the_air_wars:raw_sulfur", "value": 1.0}, {"item": "create_the_air_wars:crashedsulfur", "value": 1.0}], tier=2, hardness=3.0, density=2.0, flexibility=1, durability=140, enchantability=14, mining_speed=4, armor_durability=6, groups=("crystal",), textures=("crystal", "rough"), properties={"default": {"immolate": "2"}}), # Barely a tool material - it is here because it burns. M("amalgam", "air_war", "metal", "Amalgam", "create_the_air_wars:rough_amalgam", [{"item": "create_the_air_wars:rough_amalgam", "value": 1.0}, {"item": "create_the_air_wars:crushed_amalgam", "value": 1.0}], tier=3, hardness=4.4, density=5.5, flexibility=3, durability=320, enchantability=21, mining_speed=7, armor_durability=15, textures=("metallic", "shiny"), properties={"handheld": {"leeching": "0.3", **speed(-0.08)}}), # Mercury alloy: heavy, quick to enchant, quietly poisonous. # -------------------------------------------------------------- Ice and Fire M("silver", "iceandfire", "metal", "Silver", "iceandfire:silver_ingot", ingots("iceandfire", "silver_ingot", "silver_nugget", "silver_block"), tier=3, hardness=4.6, density=3.4, flexibility=2, durability=220, enchantability=20, mining_speed=7, armor_durability=13, textures=("metallic", "bright"), properties={"handheld": {"fake_enchants": {"minecraft:smite": 2}}}), # Folklore does the design work: soft metal, great for enchanting, # murder on the undead. M("dragonbone", "iceandfire", "bone", "Dragonbone", "iceandfire:dragonbone", [{"item": "iceandfire:dragonbone", "value": 1.0}, {"item": "iceandfire:dragon_bone_block", "value": 4.0}], tier=4, hardness=6.2, density=4.4, flexibility=3, durability=700, enchantability=12, mining_speed=7, toughness=2, armor_durability=24, groups=("bone",), textures=("rough",), properties={"head": {"fracturing": "10"}}), # Vanilla bone with the numbers pushed to diamond tier; keeps the # fracturing quirk MIAPI gives bone. M("witherbone", "iceandfire", "bone", "Witherbone", "iceandfire:witherbone", [{"item": "iceandfire:witherbone", "value": 1.0}, {"item": "iceandfire:wither_shard", "value": 0.25}], tier=3, hardness=5.8, density=4.6, flexibility=3, durability=520, enchantability=10, mining_speed=6, toughness=1, armor_durability=20, groups=("bone",), textures=("rough",), properties={"head": {"fracturing": "15"}, "handheld": {"leeching": "0.5"}}), M("hippogryph_talon", "iceandfire", "bone", "Talon", "iceandfire:hippogryph_talon", [{"item": "iceandfire:hippogryph_talon", "value": 1.0}], tier=3, hardness=6.6, density=2.4, flexibility=2, durability=300, enchantability=14, mining_speed=6, armor_durability=14, groups=("bone",), textures=("rough",), properties={"handheld": speed(0.08)}), # Sharp and light: high hardness, low durability, fast in hand. M("sapphire", "iceandfire", "crystal", "Sapphire", "iceandfire:sapphire_gem", [{"item": "iceandfire:sapphire_gem", "value": 1.0}, {"item": "iceandfire:sapphire_block", "value": BLOCK}], tier=4, hardness=6.2, density=2.2, flexibility=0, durability=1200, enchantability=14, mining_speed=8, toughness=2, armor_durability=30, groups=("crystal", "gem"), textures=("crystal", "bright")), M("pixie_dust", "iceandfire", "crystal", "Pixie Dust", "iceandfire:pixie_dust", [{"item": "iceandfire:pixie_dust", "value": 1.0}], tier=3, hardness=4.0, density=0.5, flexibility=6, durability=220, enchantability=34, mining_speed=9, armor_durability=10, groups=("crystal",), textures=("emissive", "crystal"), properties={"default": {"emissive": {"sky": 7, "block": 7}}, "tool": {"luminious_learning": "1"}}), # Highest enchantability in the set and almost no durability to go with # it - the rose gold extreme. M("dread_shard", "iceandfire", "crystal", "Dread", "iceandfire:dread_shard", [{"item": "iceandfire:dread_shard", "value": 1.0}], tier=5, hardness=6.4, density=3.0, flexibility=2, durability=1100, enchantability=16, mining_speed=8, toughness=2, armor_durability=28, groups=("crystal", "metal"), textures=("crystal", "rough"), properties={"handheld": {"leeching": "1"}}), M("ghost_ingot", "iceandfire", "metal", "Phantasmal", "iceandfire:ghost_ingot", [{"item": "iceandfire:ghost_ingot", "value": 1.0}], tier=5, hardness=6.0, density=0.6, flexibility=5, durability=1300, enchantability=26, mining_speed=10, toughness=2, armor_durability=28, textures=("emissive", "metallic"), properties={"default": {"emissive": {"sky": 6, "block": 6}}, "handheld": speed(0.12)}), # Almost no density: the fastest-swinging material here. M("dragonsteel_fire", "iceandfire", "metal", "Fire Dragonsteel", "iceandfire:dragonsteel_fire_ingot", [{"item": "iceandfire:dragonsteel_fire_ingot", "value": 1.0}, {"item": "iceandfire:dragonsteel_fire_block", "value": BLOCK}], tier=7, hardness=9.0, density=4.0, flexibility=3, durability=3600, enchantability=18, mining_speed=13, toughness=5, armor_durability=50, armor_toughness=5.0, textures=("emissive", "metallic"), properties={"default": {"fire_proof": True, "emissive": {"sky": 6, "block": 6}}, "handheld": {"immolate": "3"}}), M("dragonsteel_ice", "iceandfire", "metal", "Ice Dragonsteel", "iceandfire:dragonsteel_ice_ingot", [{"item": "iceandfire:dragonsteel_ice_ingot", "value": 1.0}, {"item": "iceandfire:dragonsteel_ice_block", "value": BLOCK}], tier=7, hardness=8.8, density=4.2, flexibility=3, durability=3600, enchantability=18, mining_speed=13, toughness=5, armor_durability=50, armor_toughness=5.0, textures=("metallic", "bright"), properties={"armor": {"fake_item_tag": ["minecraft:freeze_immune_wearables"]}, "boot": {"can_walk_on_snow": True}}), M("dragonsteel_lightning", "iceandfire", "metal", "Lightning Dragonsteel", "iceandfire:dragonsteel_lightning_ingot", [{"item": "iceandfire:dragonsteel_lightning_ingot", "value": 1.0}, {"item": "iceandfire:dragonsteel_lightning_block", "value": BLOCK}], tier=7, hardness=8.8, density=3.4, flexibility=4, durability=3600, enchantability=20, mining_speed=14, toughness=5, armor_durability=50, armor_toughness=5.0, textures=("emissive", "metallic"), properties={"default": {"emissive": {"sky": 8, "block": 8}}, "handheld": speed(0.15)}), # The three dragonsteels share a stat line and differ only in behaviour, # exactly how Ice and Fire treats them. M("troll_leather_forest", "iceandfire", "fabric", "Forest Troll Leather", "iceandfire:troll_leather_forest", [{"item": "iceandfire:troll_leather_forest", "value": 1.0}], tier=3, hardness=3.6, density=1.8, flexibility=5, durability=400, enchantability=12, mining_speed=0, toughness=2, armor_durability=22, groups=("fabric", "leather"), textures=("fabric",), mining_level=MINING_LEVEL[1], properties={"armor": {"fake_enchants": {"minecraft:projectile_protection": 2}}}), M("troll_leather_frost", "iceandfire", "fabric", "Frost Troll Leather", "iceandfire:troll_leather_frost", [{"item": "iceandfire:troll_leather_frost", "value": 1.0}], tier=3, hardness=3.6, density=1.8, flexibility=5, durability=400, enchantability=12, mining_speed=0, toughness=2, armor_durability=22, groups=("fabric", "leather"), textures=("fabric",), mining_level=MINING_LEVEL[1], properties={"armor": {"fake_enchants": {"minecraft:projectile_protection": 2}, "fake_item_tag": ["minecraft:freeze_immune_wearables"]}, "boot": {"can_walk_on_snow": True}}), M("troll_leather_mountain", "iceandfire", "fabric", "Mountain Troll Leather", "iceandfire:troll_leather_mountain", [{"item": "iceandfire:troll_leather_mountain", "value": 1.0}], tier=3, hardness=3.6, density=1.8, flexibility=5, durability=400, enchantability=12, mining_speed=0, toughness=2, armor_durability=22, groups=("fabric", "leather"), textures=("fabric",), mining_level=MINING_LEVEL[1], properties={"armor": {"fake_enchants": {"minecraft:projectile_protection": 2}}}), # Ice and Fire's troll armour cuts projectile damage; projectile # protection is the closest MIAPI-native equivalent. M("stymphalian_feather", "iceandfire", "fletching", "Stymphalian", "iceandfire:stymphalian_bird_feather", [{"item": "iceandfire:stymphalian_bird_feather", "value": 1.0}, {"item": "iceandfire:stymphalian_feather_bundle", "value": 4.0}], tier=3, hardness=3.4, density=0.4, flexibility=6, durability=140, enchantability=15, mining_speed=0, armor_durability=8, groups=("fletching", "feather"), textures=("feather",), mining_level=MINING_LEVEL[1]), # Metal feathers - sharper than a normal fletching, hence the hardness. M("amphithere_feather", "iceandfire", "fletching", "Amphithere", "iceandfire:amphithere_feather", [{"item": "iceandfire:amphithere_feather", "value": 1.0}], tier=3, hardness=2.6, density=0.3, flexibility=7, durability=120, enchantability=18, mining_speed=0, armor_durability=8, groups=("fletching", "feather"), textures=("feather",), mining_level=MINING_LEVEL[1]), # -------------------------------------------------- Iron's Spells 'n Spellbooks # The two essences are gems and deliberately strong: they are worth using # over a tier-6 metal only because of what they grant, since their raw # numbers are no better and their durability is worse. M("arcane_essence", "irons_spellbooks", "crystal", "Arcane", "irons_spellbooks:arcane_essence", [{"item": "irons_spellbooks:arcane_essence", "value": 1.0}], tier=6, hardness=6.8, density=1.4, flexibility=5, durability=2400, enchantability=32, mining_speed=11, toughness=3, armor_durability=38, armor_toughness=2.5, groups=("crystal", "gem"), textures=("crystal", "bright"), properties={ "default": {"emissive": {"sky": 6, "block": 6}}, "armor": {"attributes": [ # Per armour piece, so a full set is roughly +400 on top of the # 100 base pool Iron's Spells gives a player. attribute("irons_spellbooks:max_mana", 100, "armor"), attribute("irons_spellbooks:mana_regen", 0.15, "armor", "*"), ]}, "handheld": {"attributes": [ attribute("irons_spellbooks:spell_power", 0.10, "mainhand", "*"), attribute("irons_spellbooks:cooldown_reduction", 0.05, "mainhand", "*"), ]}, }), M("cinder_essence", "irons_spellbooks", "crystal", "Cinder", "irons_spellbooks:cinder_essence", [{"item": "irons_spellbooks:cinder_essence", "value": 1.0}], tier=6, hardness=7.4, density=2.6, flexibility=3, durability=2400, enchantability=20, mining_speed=11, toughness=4, armor_durability=40, armor_toughness=3.0, groups=("crystal", "gem"), textures=("emissive", "crystal"), properties={ "default": {"fire_proof": True, "emissive": {"sky": 8, "block": 8}}, # One armour piece is enough: the handler treats anything at or above # 1 as immune, so this is genuine immunity rather than a resistance # that stacks up to it. "armor": {"attributes": [ attribute(FIRE_IMMUNITY, 1, "armor"), attribute("irons_spellbooks:fire_magic_resist", 0.20, "armor", "*"), ]}, "handheld": { "immolate": "3", "attributes": [attribute("irons_spellbooks:fire_spell_power", 0.20, "mainhand", "*")], }, }), # The mod's three craftable metals, for completeness - ordinary materials # that happen to sit late in its progression. M("mithril", "irons_spellbooks", "metal", "Mithril", "irons_spellbooks:mithril_ingot", [{"item": "irons_spellbooks:mithril_ingot", "value": 1.0}], tier=5, hardness=6.4, density=1.2, flexibility=4, durability=1800, enchantability=24, mining_speed=11, toughness=3, armor_durability=36, armor_toughness=2.0, textures=("metallic", "bright"), properties={"handheld": speed(0.12)}), # Light enough to swing fast and enchant well, in the Tolkien sense. M("arcane_metal", "irons_spellbooks", "metal", "Arcane Steel", "irons_spellbooks:arcane_ingot", [{"item": "irons_spellbooks:arcane_ingot", "value": 1.0}], tier=5, hardness=6.2, density=2.8, flexibility=3, durability=1700, enchantability=26, mining_speed=9, toughness=3, armor_durability=34, armor_toughness=2.0, properties={"handheld": {"attributes": [ attribute("irons_spellbooks:spell_power", 0.05, "mainhand", "*")]}}), # ------------------------------------------------- Immersive Engineering # Steel, lead, uranium and silver are not here - Immersive Engineering adds # those too, so they live in the tag-fed shared packs above and accept # either mod's ingots. M("aluminum", "immersiveengineering", "metal", "Aluminium", "immersiveengineering:ingot_aluminum", ingots("immersiveengineering", "ingot_aluminum", "nugget_aluminum", extra=[{"item": "immersiveengineering:plate_aluminum", "value": 1.0}]), tier=3, hardness=4.0, density=1.2, flexibility=3, durability=260, enchantability=17, mining_speed=6, armor_durability=14, textures=("metallic", "bright"), properties={"handheld": speed(0.10)}), # Light and corrosion-proof but soft - the cheap way to a fast tool, at # the cost of everything else. M("nickel", "immersiveengineering", "metal", "Nickel", "immersiveengineering:ingot_nickel", ingots("immersiveengineering", "ingot_nickel", "nugget_nickel", extra=[{"item": "immersiveengineering:plate_nickel", "value": 1.0}]), tier=3, hardness=5.4, density=4.4, flexibility=1, durability=480, enchantability=10, mining_speed=6, toughness=1, armor_durability=20, armor_toughness=0.5), # Hard, tough and stubbornly corrosion resistant; dull to enchant. M("constantan", "immersiveengineering", "metal", "Constantan", "immersiveengineering:ingot_constantan", ingots("immersiveengineering", "ingot_constantan", "nugget_constantan", extra=[{"item": "immersiveengineering:plate_constantan", "value": 1.0}]), tier=4, hardness=5.6, density=4.0, flexibility=2, durability=640, enchantability=14, mining_speed=7, toughness=2, armor_durability=24), # A copper-nickel alloy prized for not changing under heat or strain, # so it is the steady middle option: no weakness, no standout. M("electrum", "immersiveengineering", "metal", "Electrum", "immersiveengineering:ingot_electrum", ingots("immersiveengineering", "ingot_electrum", "nugget_electrum", extra=[{"item": "immersiveengineering:plate_electrum", "value": 1.0}]), tier=3, hardness=4.4, density=3.6, flexibility=2, durability=260, enchantability=26, mining_speed=9, armor_durability=14, textures=("metallic", "bright"), properties={"tool": {"luminious_learning": "0.5"}}), # Gold-silver alloy, so it inherits gold's bargain: superb to enchant, # falls apart quickly. M("hop_graphite", "immersiveengineering", "metal", "Graphite", "immersiveengineering:ingot_hop_graphite", ingots("immersiveengineering", "ingot_hop_graphite", None, extra=[{"item": "immersiveengineering:plate_hop_graphite", "value": 1.0}]), tier=4, hardness=4.2, density=2.0, flexibility=1, durability=520, enchantability=12, mining_speed=10, toughness=2, armor_durability=18, textures=("rough", "metallic"), properties={"default": {"fire_proof": True}, "handheld": speed(0.08)}), # Graphite is a dry lubricant and shrugs off heat, hence the quick swing, # high mining speed and fireproofing - but it is soft, so it hits weakly. # --------------------------------- Aeronautics: Interstellar Expansion (vsie) # Mostly a machinery mod; these are the three items that are a material # rather than a component. Solid E-710 is deliberately left out - it is # rocket fuel, not something to build a tool out of. M("microlattice", "interstellar", "metal", "Microlattice", "vsie:metalic_microlattice", [{"item": "vsie:metalic_microlattice", "value": 1.0}], tier=5, hardness=5.2, density=0.3, flexibility=7, durability=1400, enchantability=20, mining_speed=9, toughness=2, armor_durability=34, armor_toughness=1.5, textures=("metallic", "bright"), properties={"handheld": speed(0.18)}), # Real metallic microlattice is 99.99% air and lighter than styrofoam. # Lowest density and fastest swing of any metal here, which is the whole # reason to pick it - it will never out-hit osmium. M("silicon_carbide", "interstellar", "crystal", "Silicon Carbide", "vsie:silicon_carbide", [{"item": "vsie:silicon_carbide", "value": 1.0}], tier=5, hardness=7.6, density=2.4, flexibility=0, durability=1300, enchantability=12, mining_speed=13, toughness=3, armor_durability=34, armor_toughness=3.0, groups=("crystal",), textures=("crystal", "rough"), properties={"default": {"fire_proof": True}}), # A ceramic: nearly as hard as diamond and the industrial abrasive of # choice, hence the mining speed - but brittle, so no flex and less # durability than its tier would suggest. M("computronic_substrate", "interstellar", "metal", "Computronic", "vsie:computronic_substrate", [{"item": "vsie:computronic_substrate", "value": 1.0}], tier=5, hardness=4.6, density=1.8, flexibility=3, durability=1100, enchantability=28, mining_speed=9, toughness=2, armor_durability=28, textures=("emissive", "metallic"), properties={"default": {"emissive": {"sky": 4, "block": 4}}, "tool": {"luminious_learning": "1"}}), # Soft and unimpressive as a weapon; it is here for enchantability. M("pyrium", "irons_spellbooks", "metal", "Pyrium", "irons_spellbooks:pyrium_ingot", [{"item": "irons_spellbooks:pyrium_ingot", "value": 1.0}], tier=5, hardness=6.8, density=3.4, flexibility=2, durability=1750, enchantability=18, mining_speed=9, toughness=3, armor_durability=36, armor_toughness=2.0, textures=("emissive", "metallic"), properties={"default": {"fire_proof": True, "emissive": {"sky": 5, "block": 5}}, "handheld": {"immolate": "2"}}), ] # --------------------------------------------------------------------- scales # Generated rather than written out: colours differ only in palette, which is # read from each colour's own texture. Stats and behaviour follow the element. DRAGON_SCALE_ELEMENTS = { "fire": ["red", "bronze", "green", "gray"], "ice": ["blue", "white", "sapphire", "silver"], "lightning": ["electric", "amethyst", "copper", "black"], } DRAGON_SCALE_PROPERTIES = { "fire": {"default": {"fire_proof": True}, "armor": {"fake_enchants": {"minecraft:fire_protection": 2}}}, "ice": {"armor": {"fake_item_tag": ["minecraft:freeze_immune_wearables"]}, "boot": {"can_walk_on_snow": True}}, "lightning": {"default": {"emissive": {"sky": 5, "block": 5}}, "handheld": speed(0.08)}, } SEA_SERPENT_COLORS = ["blue", "bronze", "deepblue", "green", "purple", "red", "teal"] DEATHWORM_COLORS = {"red": "Red", "white": "White", "yellow": "Tan"} def _scales(): out = [] for element, colors in DRAGON_SCALE_ELEMENTS.items(): for color in colors: out.append(M( f"dragonscales_{color}", "iceandfire", "scute", f"{color.replace('_', ' ').title()} Dragonscale", f"iceandfire:dragonscales_{color}", [{"item": f"iceandfire:dragonscales_{color}", "value": 1.0}, {"item": f"iceandfire:dragonscale_{color}", "value": BLOCK}], tier=5, hardness=6.0, density=2.6, flexibility=4, durability=1500, enchantability=15, mining_speed=7, toughness=4, armor_durability=44, armor_toughness=3.5, mining_level=MINING_LEVEL[4], groups=("scute",), textures=("rough", "shiny"), properties=DRAGON_SCALE_PROPERTIES[element])) # Armour-first, like Tinkers' ancient hide: high toughness and # armour durability, unremarkable as a cutting edge. for color in SEA_SERPENT_COLORS: out.append(M( f"sea_serpent_scales_{color}", "iceandfire", "scute", f"{color.replace('deepblue', 'deep blue').title()} Serpent Scale", f"iceandfire:sea_serpent_scales_{color}", [{"item": f"iceandfire:sea_serpent_scales_{color}", "value": 1.0}, {"item": f"iceandfire:sea_serpent_scale_block_{color}", "value": BLOCK}], tier=4, hardness=5.4, density=2.4, flexibility=5, durability=950, enchantability=16, mining_speed=6, toughness=3, armor_durability=32, armor_toughness=2.5, groups=("scute",), textures=("rough", "shiny"), properties={"armor": {"fake_enchants": {"minecraft:respiration": 1}}, "boot": {"fake_enchants": {"minecraft:depth_strider": 1}}})) for color, label in DEATHWORM_COLORS.items(): out.append(M( f"deathworm_chitin_{color}", "iceandfire", "scute", f"{label} Chitin", f"iceandfire:deathworm_chitin_{color}", [{"item": f"iceandfire:deathworm_chitin_{color}", "value": 1.0}], tier=4, hardness=5.6, density=2.2, flexibility=4, durability=880, enchantability=13, mining_speed=6, toughness=3, armor_durability=30, armor_toughness=2.0, groups=("scute",), textures=("rough",), properties={"default": {"fire_proof": True}})) # Desert worms, so heat immunity comes with the shell. return out MATERIALS.extend(_scales()) # Gem sockets do not look for the "gem" group. Truly Modular: Arsenal gates its # melee gem modules on `gem_melee` and Armory gates its armour ones on # `gem_armor`, so a material tagged only "crystal"/"gem" is rejected by every # socket - which is exactly what happened to the two essences. Anything gem-like # gets both, so it fits any gem slot regardless of size or whether the item is # a weapon or a piece of armour. GEM_SOCKET_GROUPS = ("gem_melee", "gem_armor") for _material in MATERIALS: if {"gem", "crystal"} & set(_material["groups"]): _material["groups"] = list(_material["groups"]) + [ g for g in GEM_SOCKET_GROUPS if g not in _material["groups"]] # Extensions add data to a material that already exists rather than replacing it. # Ice and Fire's amethyst is the same stone MIAPI already ships, so it just # becomes another way to craft it. EXTENSIONS = [ { "pack": "iceandfire", "path": "crystal/amethyst", "data": { "key": "miapi:crystal/amethyst", "items": [{"item": "iceandfire:amethyst_gem", "value": 1.0}], }, }, ]