212 lines
6.8 KiB
Python
212 lines
6.8 KiB
Python
|
|
vanilla_materials = [
|
||
|
|
"iron",
|
||
|
|
"golden",
|
||
|
|
# "diamond", # It's a gem
|
||
|
|
]
|
||
|
|
|
||
|
|
vanilla_tools = [
|
||
|
|
"shovel",
|
||
|
|
"pickaxe",
|
||
|
|
"axe",
|
||
|
|
"hoe",
|
||
|
|
"sword",
|
||
|
|
]
|
||
|
|
|
||
|
|
vanilla_armor = [
|
||
|
|
"helmet",
|
||
|
|
"chestplate",
|
||
|
|
"leggings",
|
||
|
|
"boots",
|
||
|
|
]
|
||
|
|
|
||
|
|
thermal_materials = [
|
||
|
|
"lead",
|
||
|
|
"electrum",
|
||
|
|
"steel",
|
||
|
|
"platinum",
|
||
|
|
"nickel",
|
||
|
|
"aluminum",
|
||
|
|
"silver",
|
||
|
|
"tin",
|
||
|
|
"copper",
|
||
|
|
"invar",
|
||
|
|
"bronze",
|
||
|
|
"constantan",
|
||
|
|
]
|
||
|
|
|
||
|
|
thermal_tools = [
|
||
|
|
"shovel",
|
||
|
|
"pickaxe",
|
||
|
|
"axe",
|
||
|
|
"hoe",
|
||
|
|
"fishing_rod",
|
||
|
|
"shears",
|
||
|
|
"sickle",
|
||
|
|
"hammer",
|
||
|
|
"excavator",
|
||
|
|
"sword",
|
||
|
|
"bow",
|
||
|
|
# "shield",
|
||
|
|
]
|
||
|
|
|
||
|
|
thermal_armor = [
|
||
|
|
"helmet",
|
||
|
|
"plate",
|
||
|
|
"legs",
|
||
|
|
"boots",
|
||
|
|
]
|
||
|
|
|
||
|
|
vanilla_thermal_materials = [
|
||
|
|
"iron",
|
||
|
|
"gold",
|
||
|
|
# "diamond", # It's a gem
|
||
|
|
]
|
||
|
|
|
||
|
|
vanilla_thermal_tools = [
|
||
|
|
"bow",
|
||
|
|
# "shield",
|
||
|
|
"fishing_rod",
|
||
|
|
"sickle",
|
||
|
|
"hammer",
|
||
|
|
"excavator",
|
||
|
|
]
|
||
|
|
|
||
|
|
ice_and_fire_materials = [
|
||
|
|
"dragonsteel_fire",
|
||
|
|
"dragonsteel_ice",
|
||
|
|
]
|
||
|
|
|
||
|
|
|
||
|
|
parts = {
|
||
|
|
"pickaxe": lambda material: f"<tconstruct:pick_head>.withTag({{Material: \"{material}\"}})",
|
||
|
|
"axe": lambda material: f"<tconstruct:axe_head>.withTag({{Material: \"{material}\"}})",
|
||
|
|
"shovel": lambda material: f"<tconstruct:shovel_head>.withTag({{Material: \"{material}\"}})",
|
||
|
|
"hoe": lambda material: f"<tconstruct:kama_head>.withTag({{Material: \"{material}\"}})",
|
||
|
|
"scythe": lambda material: f"<tconstruct:scythe_head>.withTag({{Material: \"{material}\"}})",
|
||
|
|
"knife": lambda material: f"<tconstruct:knife_blade>.withTag({{Material: \"{material}\"}})",
|
||
|
|
"sword": lambda material: f"<tconstruct:sword_blade>.withTag({{Material: \"{material}\"}})",
|
||
|
|
"hammer": lambda material: f"<tconstruct:hammer_head>.withTag({{Material: \"{material}\"}})",
|
||
|
|
"excavator": lambda material: f"<tconstruct:excavator_head>.withTag({{Material: \"{material}\"}})",
|
||
|
|
|
||
|
|
"helmet": lambda material: f"<conarm:helmet_core>.withTag({{Material: \"{material}\"}})",
|
||
|
|
"chestplate": lambda material: f"<conarm:chest_core>.withTag({{Material: \"{material}\"}})",
|
||
|
|
"leggings": lambda material: f"<conarm:leggings_core>.withTag({{Material: \"{material}\"}})",
|
||
|
|
"boots": lambda material: f"<conarm:boots_core>.withTag({{Material: \"{material}\"}})",
|
||
|
|
|
||
|
|
"rod": lambda material: f"<tconstruct:tool_rod>.withTag({{Material: \"{material}\"}})",
|
||
|
|
"stick": lambda material: "<ore:stickWood>",
|
||
|
|
"string": lambda material: "<ore:string>",
|
||
|
|
}
|
||
|
|
|
||
|
|
def ingot(material):
|
||
|
|
return f"<ore:ingot{material.capitalize()}>"
|
||
|
|
|
||
|
|
def common_recepie(part, material):
|
||
|
|
return f"[[{parts[part](material)}],[{parts['stick'](material)}],[{parts['stick'](material)}]]"
|
||
|
|
|
||
|
|
|
||
|
|
recepies = {
|
||
|
|
"shovel": lambda m: common_recepie("shovel", m),
|
||
|
|
"pickaxe": lambda m: common_recepie("pickaxe", m),
|
||
|
|
"axe": lambda m: common_recepie("axe", m),
|
||
|
|
"hoe": lambda m: common_recepie("hoe", m),
|
||
|
|
"fishing_rod": lambda m: f"[[null, null, {parts['rod'](m)}],[null, {parts['rod'](m)},{parts['string'](m)}], [{parts['rod'](m)}, null, {parts['string'](m)}]]",
|
||
|
|
"shears": lambda m: f"[[null, {parts['knife'](m)}], [{parts['knife'](m)}, null]]",
|
||
|
|
"sickle": lambda m: f"[[{parts['scythe'](m)}],[{parts['stick'](m)}]]",
|
||
|
|
"hammer": lambda m: common_recepie("hammer", m),
|
||
|
|
"excavator": lambda m: common_recepie("excavator", m),
|
||
|
|
"sword": lambda m: f"[[{parts['sword'](m)}],[{parts['stick'](m)}]]",
|
||
|
|
"bow": lambda m: f"[[null,{parts['rod'](m)},{parts['string'](m)}], [{parts['stick'](m)},null,{parts['string'](m)}], [null,{parts['rod'](m)},{parts['string'](m)}]]",
|
||
|
|
|
||
|
|
"helmet": lambda m: f"[[{parts['helmet'](m)}]]",
|
||
|
|
"chestplate": lambda m: f"[[{parts['chestplate'](m)}]]",
|
||
|
|
"leggings": lambda m: f"[[{parts['leggings'](m)}]]",
|
||
|
|
"boots": lambda m: f"[[{parts['boots'](m)}]]",
|
||
|
|
|
||
|
|
# Copies of "chestplate" and "leggings"
|
||
|
|
"plate": lambda m: f"[[{parts['chestplate'](m)}]]",
|
||
|
|
"legs": lambda m: f"[[{parts['leggings'](m)}]]",
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
with open("tools.zs", "w") as file:
|
||
|
|
def put(line=None):
|
||
|
|
if line is None:
|
||
|
|
line = ""
|
||
|
|
file.write(str(line)+"\n")
|
||
|
|
|
||
|
|
put("// Vanilla Tools")
|
||
|
|
put("\t// Shears")
|
||
|
|
put(f"\trecipes.remove(<minecraft:shears>);")
|
||
|
|
put(f"\trecipes.addShapedMirrored(<minecraft:shears>, {recepies['shears']('iron')});")
|
||
|
|
put()
|
||
|
|
for tool in vanilla_tools:
|
||
|
|
put(f"\t// {tool.capitalize()}")
|
||
|
|
for material in vanilla_materials:
|
||
|
|
put(f"\trecipes.remove(<minecraft:{material}_{tool}>);")
|
||
|
|
put(f"\trecipes.addShapedMirrored(<minecraft:{material}_{tool}>, {recepies[tool](material)});")
|
||
|
|
put()
|
||
|
|
put()
|
||
|
|
put()
|
||
|
|
|
||
|
|
put("// Thermal Tools")
|
||
|
|
for tool in thermal_tools:
|
||
|
|
put(f"\t// {tool.capitalize()}")
|
||
|
|
for material in thermal_materials:
|
||
|
|
put(f"\trecipes.remove(<thermalfoundation:tool.{tool}_{material}>);")
|
||
|
|
put(f"\trecipes.addShapedMirrored(<thermalfoundation:tool.{tool}_{material}>, {recepies[tool](material)});")
|
||
|
|
put()
|
||
|
|
put()
|
||
|
|
put()
|
||
|
|
|
||
|
|
put("// Thermal Tools (Vanilla)")
|
||
|
|
for tool in vanilla_thermal_tools:
|
||
|
|
put(f"\t// {tool.capitalize()}")
|
||
|
|
for material in vanilla_thermal_materials:
|
||
|
|
put(f"\trecipes.remove(<thermalfoundation:tool.{tool}_{material}>);")
|
||
|
|
put(f"\trecipes.addShapedMirrored(<thermalfoundation:tool.{tool}_{material}>, {recepies[tool](material)});")
|
||
|
|
put()
|
||
|
|
put()
|
||
|
|
put()
|
||
|
|
|
||
|
|
put("// Ice and Fire Tools")
|
||
|
|
for tool in vanilla_tools:
|
||
|
|
put(f"\t// {tool.capitalize()}")
|
||
|
|
for material in ice_and_fire_materials:
|
||
|
|
put(f"\trecipes.remove(<iceandfire:{material}_{tool}>);")
|
||
|
|
put(f"\trecipes.addShapedMirrored(<iceandfire:{material}_{tool}>, {recepies[tool](material)});")
|
||
|
|
put()
|
||
|
|
put()
|
||
|
|
put()
|
||
|
|
|
||
|
|
put("// Vanilla Armor")
|
||
|
|
for armor in vanilla_armor:
|
||
|
|
put(f"\t// {armor.capitalize()}")
|
||
|
|
for material in vanilla_materials:
|
||
|
|
put(f"\trecipes.remove(<minecraft:{material}_{armor}>);")
|
||
|
|
put(f"\trecipes.addShaped(<minecraft:{material}_{armor}>, {recepies[armor](material)});")
|
||
|
|
put()
|
||
|
|
put()
|
||
|
|
put()
|
||
|
|
|
||
|
|
put("// Thermal Armor")
|
||
|
|
for armor in thermal_armor:
|
||
|
|
put(f"\t// {armor.capitalize()}")
|
||
|
|
for material in thermal_materials:
|
||
|
|
put(f"\trecipes.remove(<thermalfoundation:armor.{armor}_{material}>);")
|
||
|
|
put(f"\trecipes.addShaped(<thermalfoundation:armor.{armor}_{material}>, {recepies[armor](material)});")
|
||
|
|
put()
|
||
|
|
put()
|
||
|
|
put()
|
||
|
|
|
||
|
|
# NOTE: No armor core casts !
|
||
|
|
#
|
||
|
|
# put("// Ice and Fire Armor")
|
||
|
|
# for tool in vanilla_armor:
|
||
|
|
# put(f"\t// {tool.capitalize()}")
|
||
|
|
# for material in ice_and_fire_materials:
|
||
|
|
# put(f"\trecipes.remove(<iceandfire:{material}_{tool}>);")
|
||
|
|
# put(f"\trecipes.addShapedMirrored(<iceandfire:{material}_{tool}>, {recepies[tool](material)});")
|
||
|
|
# put()
|
||
|
|
# put()
|
||
|
|
# put()
|