Anvil Recipes?
robertmaxton42 opened this issue ยท 6 comments
Any chance we could get an addAnvil function, for custom anvil recipes? I saw booker's issue about crafting table recipes that consume xp, which is a good interim solution, but it'd be cool to be able to, say, let players apply an enchantment they couldn't normally through the normal anvil interface.
Thanks for the amazing tweaker!
(Also, while I'm asking - how would you add an enchantment to an input item in zenscript? I'm guessing something like inputs.<name>.<foo>
, but I'm not sure what the <foo>
should be.)
@robertmaxton42 enchantments are NBT tags, you can add them via <minecraft:stick>.withTag({ench: [{id: 33 as short, lvl: 1 as short}]})
. If I know correctly, the example will add you a stick with Silk Touch enchanment on it.
If you want it as a crafting ingredient or input, you should replace withTag
with onlyWithTag
. This will filter your recipe to only accept silk-touch stick.
Not what he is taking for. He, and I, want to be able to craft in the anvil and set an xp cost.
I replied to this:
(Also, while I'm asking - how would you add an enchantment to an input item in zenscript? I'm guessing something like inputs.., but I'm not sure what the should be.)
@hron84
Gotcha, my bad.