📎Custom item NBT

Adding custom NBT attributes to the item

You can specify custom NBT attributes to be merged into the custom item.

Make sure to provide a valid NBT (json) or it won't work!

Make sure to escape the " character using \.

This feature supports legacy NBT and the new 1.20.5+ modern NBT too! It will automatically convert the legacy NBT if needed.

More info on the 1.20.5+ changes (scroll down).

Example custom attribute

For example I want to merge these tags into my item: {my-custom-nbt-tag:"hello this is a custom tag", another-tag:"useless"}

items:
  custom_nbt_item:
    display_name: "Just an example"
    permission: examples.custom_nbt_item
    nbt: '{my-custom-nbt-tag:"hello this is a custom tag", another-tag:"useless"}'
    resource:
      material: DIAMOND_SWORD
      generate: true
      model_path: "minecraft:item/diamond"
    durability:
      max_custom_durability: 1324

Example item name

items:
  example_item_custom_name:
    enabled: true
    display_name: example_item_custom_name
    permission: custom.example_item_custom_name
    nbt: "{display:{Name:'{\"text\":\"TEST\", \"font\": \"alt\"}'}}"

Last updated