Added tools
This commit is contained in:
94
tools/metblock.py
Normal file
94
tools/metblock.py
Normal file
@ -0,0 +1,94 @@
|
||||
nuggets = [
|
||||
"<minecraft:iron_nugget>",
|
||||
"<minecraft:gold_nugget>",
|
||||
"<thermalfoundation:material:192>",
|
||||
"<thermalfoundation:material:193>",
|
||||
"<thermalfoundation:material:194>",
|
||||
"<thermalfoundation:material:195>",
|
||||
"<thermalfoundation:material:196>",
|
||||
"<thermalfoundation:material:197>",
|
||||
"<thermalfoundation:material:198>",
|
||||
"<thermalfoundation:material:199>",
|
||||
"<thermalfoundation:material:200>",
|
||||
"<thermalfoundation:material:224>",
|
||||
"<thermalfoundation:material:225>",
|
||||
"<thermalfoundation:material:226>",
|
||||
"<thermalfoundation:material:227>",
|
||||
"<thermalfoundation:material:228>",
|
||||
"<thermalfoundation:material:229>",
|
||||
"<thermalfoundation:material:230>",
|
||||
"<thermalfoundation:material:231>",
|
||||
"<tconstruct:nuggets>",
|
||||
"<tconstruct:nuggets:1>",
|
||||
"<tconstruct:nuggets:2>",
|
||||
"<tconstruct:nuggets:3>",
|
||||
"<tconstruct:nuggets:4>",
|
||||
"<tconstruct:nuggets:5>",
|
||||
"<tcomplement:materials:20>",
|
||||
]
|
||||
|
||||
ingots = [
|
||||
"<minecraft:iron_ingot>",
|
||||
"<minecraft:gold_ingot>",
|
||||
"<thermalfoundation:material:128>",
|
||||
"<thermalfoundation:material:129>",
|
||||
"<thermalfoundation:material:130>",
|
||||
"<thermalfoundation:material:131>",
|
||||
"<thermalfoundation:material:132>",
|
||||
"<thermalfoundation:material:133>",
|
||||
"<thermalfoundation:material:134>",
|
||||
"<thermalfoundation:material:135>",
|
||||
"<thermalfoundation:material:136>",
|
||||
"<thermalfoundation:material:160>",
|
||||
"<thermalfoundation:material:161>",
|
||||
"<thermalfoundation:material:162>",
|
||||
"<thermalfoundation:material:163>",
|
||||
"<thermalfoundation:material:164>",
|
||||
"<thermalfoundation:material:165>",
|
||||
"<thermalfoundation:material:166>",
|
||||
"<thermalfoundation:material:167>",
|
||||
"<tconstruct:ingots>",
|
||||
"<tconstruct:ingots:1>",
|
||||
"<tconstruct:ingots:2>",
|
||||
"<tconstruct:ingots:3>",
|
||||
"<tconstruct:ingots:4>",
|
||||
"<tconstruct:ingots:5>",
|
||||
"<tcomplement:materials:10>",
|
||||
]
|
||||
|
||||
blocks = [
|
||||
"<minecraft:iron_block>",
|
||||
"<minecraft:gold_block>",
|
||||
"<thermalfoundation:storage>",
|
||||
"<thermalfoundation:storage:1>",
|
||||
"<thermalfoundation:storage:2>",
|
||||
"<thermalfoundation:storage:3>",
|
||||
"<thermalfoundation:storage:4>",
|
||||
"<thermalfoundation:storage:5>",
|
||||
"<thermalfoundation:storage:6>",
|
||||
"<thermalfoundation:storage:7>",
|
||||
"<thermalfoundation:storage:8>",
|
||||
"<thermalfoundation:storage_alloy>",
|
||||
"<thermalfoundation:storage_alloy:1>",
|
||||
"<thermalfoundation:storage_alloy:2>",
|
||||
"<thermalfoundation:storage_alloy:3>",
|
||||
"<thermalfoundation:storage_alloy:4>",
|
||||
"<thermalfoundation:storage_alloy:5>",
|
||||
"<thermalfoundation:storage_alloy:6>",
|
||||
"<thermalfoundation:storage_alloy:7>",
|
||||
"<tconstruct:metal>",
|
||||
"<tconstruct:metal:1>",
|
||||
"<tconstruct:metal:2>",
|
||||
"<tconstruct:metal:3>",
|
||||
"<tconstruct:metal:4>",
|
||||
"<tconstruct:metal:5>",
|
||||
"<tcomplement:storage:1>",
|
||||
]
|
||||
|
||||
|
||||
with open("metal-ban.zs", "w") as file:
|
||||
for nug, ing, blk in zip(nuggets, ingots, blocks):
|
||||
file.write(f"recipes.removeShaped({ing}, [[{nug},{nug},{nug}],[{nug},{nug},{nug}],[{nug},{nug},{nug}]]);\n")
|
||||
file.write(f"recipes.removeShaped({blk}, [[{ing},{ing},{ing}],[{ing},{ing},{ing}],[{ing},{ing},{ing}]]);\n")
|
||||
file.write(f"recipes.removeShapeless({nug}*9, [{ing}]);\n")
|
||||
file.write(f"recipes.removeShapeless({ing}*9, [{blk}]);\n")
|
||||
212
tools/tools.py
Normal file
212
tools/tools.py
Normal file
@ -0,0 +1,212 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user