From b5f9ef94c0bee318c4d136a888d9e4d5ea8ff630 Mon Sep 17 00:00:00 2001 From: Huynh Tien Date: Sat, 8 Jun 2024 20:06:24 +0700 Subject: [PATCH] Add tutorial on Item Component --- content/modifier/nbt/_index.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/content/modifier/nbt/_index.md b/content/modifier/nbt/_index.md index 4a072df..9ec0774 100644 --- a/content/modifier/nbt/_index.md +++ b/content/modifier/nbt/_index.md @@ -42,3 +42,19 @@ colored-leather-chestplate: position-x: 2 position-y: 1 ``` + +## Item Component + +In 1.20.5 and above, Mojang decided to replace NBT with their new Item Component. +To use Item Component, you can use its square-bracket format `[]` as the value to the modifier. + +For example, for a typical `/give` command like this: +``` +/give @s leather_helmet[dyed_color={rgb:456345,show_in_tooltip:false}] +``` + +You can take this part `[dyed_color={rgb:456345,show_in_tooltip:false}]` and use it in the modifier like this: + +```yaml +nbt: "[dyed_color={rgb:456345,show_in_tooltip:false}]" +```