ModTweaker

ModTweaker

88M Downloads

Anvil Recipes?

robertmaxton42 opened this issue ยท 6 comments

commented

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.)

commented

This seems like it would be more appropriate at CraftTweaker's repo.

commented

@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.

commented

Not what he is taking for. He, and I, want to be able to craft in the anvil and set an xp cost.

commented

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.)

commented

@hron84
Gotcha, my bad.

commented

out of scope for Modtweaker.