[QUESTION] NBT on enchants in 1.20.1?
Valdifer opened this issue ยท 1 comments
Question
Hello, i saw you could use withNBT tags in some enchants and i saw the example u used in other closed question that was this:
// Restricts access to all level 5 enchantments.
// Note: With JEI auto hiding, you will need to manually add another entry for the version of the item in JEI.
mods.ItemStages.addItemStage("one", <minecraft:enchanted_book>.withTag({StoredEnchantments: [{lvl: 5 as short}]}));
As far i saw to put enchants now is like the next way:
ItemStages.restrict(<enchantment:minecraft:looting>, "enchant_level_1");
But when i use:
ItemStages.restrict(<enchantment:minecraft:looting>.withTag({StoredEnchantments:[{lvl: 8 as short}]}), "enchant_level_1");
I get the next error:
No such member: withTag
It is possible to stage enchant levels? and how?
Thx for the mod and greetings!
Hello, please join the CraftTweaker discord for any questions related to CraftTweaker scripts.