[BUGFIX] Allow fixing netherite armors on anvil

* `mcl_armor`: API change: if `disable_craft` is true, the API will not generate the craft recipe
* `mcl_armor`: Netherite change: add `disable_craft` to the armor defination
This commit is contained in:
1F616EMO 2021-06-05 21:38:59 +08:00
parent 65f7ca383e
commit 608f7ce69a
Signed by: Emojigit
GPG Key ID: 2443E5F619026B90
2 changed files with 3 additions and 1 deletions

View File

@ -138,7 +138,7 @@ function mcl_armor.register_set(def)
_mcl_upgradable = def.upgradable,
})
if def.craft_material then
if def.craft_material and not(def.disable_craft) then
minetest.register_craft({
output = itemstring,
recipe = element.craft(def.craft_material),

View File

@ -94,6 +94,8 @@ mcl_armor.register_set({
feet = 3,
},
toughness = 3,
craft_material = "mcl_nether:netherite_ingot",
disable_craft = true,
})
mcl_armor.register_protection_enchantment({