KubeJS (Old)

KubeJS (Old)

3M Downloads

Recipe ingredients and ouputs don't get nbt data

omoflop opened this issue ยท 1 comments

commented

I'm running fabric on 1.16.5, and items don't get their nbt data when crafted, as well as nbt data isn't checked for ingredients.

Here's the piece of code I'm using:
event.replaceOutput({}, 'minecraft:diamond_shovel', Item.of('minecraft:wooden_axe', {Damage:0,Enchantments:[{id:"minecraft:sharpness",lvl:1}]}))

Result in game:
image

Afterwards, I tried copying an example from the wiki and putting it in my code:
event.replaceOutput({}, 'minecraft:diamond_shovel', Item.of('minecraft:enchanted_book').enchant('minecraft:respiration', 2))

And in game it still has no nbt data attached:
image

commented

Fabric / Vanilla doesn't support NBT output in recipes by default, you will need to use other mods (like NBT crafting) to potentially re-add support for that.