AtomicStryker / atomicstrykers-minecraft-mods

Repository for my open source Minecraft Mods
https://atomicstryker.github.io/
181 stars 97 forks source link

Question: is it possible to add NBT data to a dropped item? #445

Closed belathus closed 2 years ago

belathus commented 2 years ago

I tried adding the following to the list of items dropped by an infernal mob, but it just dropped a tome with no NBT data attached:

"{Count:1b,id:\"quark:ancient_tome\",StoredEnchantments:[{lvl:3,id:\"minecraft:unbreaking\"}]}"

I'm not sure what the right format would be to add a specific enchantment to the list of drops.

AtomicStryker commented 2 years ago

Sorry, i don't know either. Ask in minecraft modding forums or discords, people there should be able to point you to the correct NBT format

belathus commented 2 years ago

I got it. This is what it should look like:

"{Count:1b,id:\"quark:ancient_tome\", tag: {StoredEnchantments:[{lvl:3,id:\"minecraft:unbreaking\"}]}}"