Skip to content

Commit

Permalink
Add tutorial on Item Component
Browse files Browse the repository at this point in the history
  • Loading branch information
HSGamer authored Jun 8, 2024
1 parent 3b164f1 commit b5f9ef9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions content/modifier/nbt/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}]"
```

0 comments on commit b5f9ef9

Please sign in to comment.