====== .modify ======
^ .modify ^^
|{{ modify.webp?500 |The .help entry for .modify.}}||
^Type|[[:Command]]|
^Category|[[:No Category|none]]|
^In-game description|"Allows you to modify NBT data of items.\\ \\ Syntax: .modify add \\ .modify set \\ .modify remove \\ Use $ for colors, use $$ for $.\\ \\ Example:\\ .modify add {display:{Name:%%'%%{%%"%%text%%"%%:%%"%%$cRed Name%%"%%}%%'%%}}\\ (changes the item's name to Red Name)"|
^[[:keybinds#default_keybinds|Default keybind]]|none|
^Source code|[[w7src>net/wurstclient/commands/ModifyCmd.java]]|
.modify is a [[:command|chat command]] that allows the user to modify the [[mc>NBT]] data of [[mc>items]].
Using .modify requires [[mc>creative mode]], but doesn't require [[mc>Permission level|OP]].
NBT data is a complex topic that goes far beyond the scope of this page. See the [[mc>NBT format]] page in the official Minecraft Wiki to learn more about how NBT works.
===== Syntax =====
Main article: [[Command Syntax]]
* ''.modify add '' adds to the currently held item.\\ \\
* ''.modify set '' replaces the currently held item's NBT data with .\\ \\
* ''.modify remove '' removes all NBT data within from the currently held item.\\ \\
Examples:
* ''.modify add {display:{Name:%%'%%{%%"%%text%%"%%:%%"%%$cRed Name%%"%%}%%'%%}}'' changes the item's name to Red Name.\\ \\
===== See also =====
* [[mc>NBT format]] - more about the NBT format and how it works.\\ \\
* [[cmd:.viewnbt]] - a command to view existing NBT data in an item.\\ \\
* [[:InfiniChat]] - a hack to remove the 256 character limit in chat messages. Necessary for complex item modifications.\\ \\
===== Changes =====
^Version^Changes^
|[[update:Wurst 2.15]]|Added ''.modify''.|
|[[update:Wurst 7.0pre1]]|Temporarily removed ''.modify''.|
|[[update:Wurst 7.0pre8]]|Re-added ''.modify''.|
|[[update:Wurst 6.27.1]] (Minecraft 1.8 & 1.12),\\ [[update:Wurst 7.0pre8]] (Minecraft 1.14+)|Added color support to ''.modify''. Use $ for colors, use $$ for $.|
{{tag>creative_mode_only NBT_data}}