🔢 Item Data
What is Item Data?
Item Data refers to the NBT (Named Binary Tag) of an item in older versions, or the item Components in version 1.20.5 and above. Through this data, we can customize various aspects of an item such as its name, description, attributes, and other functionalities.
Hard-coded Data
Hardcoded data, in this context, means that the configuration formats are provided and maintained by plugin, which ensures compatibility across different versions. These formats are defined by the plugin, so they may differ from the standard NBT (Named Binary Tag) or Components formats used by the game itself. The advantage of this approach is that the plugin handles all the maintenance, including version compatibility, so users do not need to worry about changes or updates between game versions.
display-name
Determines the displayed name of the item.
lore
Determines the displayed description of the item.
unbreakable
Determines whether the item is unbreakable
Customizable Data
Customizable Data is not maintained by plugins, and its format can change with updates to Minecraft, particularly with the frequent recent changes to Components. If you want to avoid extensive configuration overhauls due to version updates, you might consider using templates to establish a standardized configuration file format. When a new version is released, you can simply update the template to accommodate any changes. If you are unfamiliar with how to use templates, please make sure to read the guide provided at 📄 Templates [MUST READ]. This approach can help streamline the update process and reduce the effort required to keep your configurations compatible with the latest game versions.
NBT (1.20-1.20.4)
Since NBT (Named Binary Tag) has become outdated, it will not be discussed in detail here.
Components (1.20.5+)
The format for custom Components strictly adheres to the Minecraft Wiki guidelines. Below, I will guide you through a few examples to help you become familiar with how to configure custom Components.
From the image, we can see that max_damage
accepts an I
(which stands for an integer type parameter). Therefore, in our configuration, we simply need to use a numerical value directly.
From the image, we can see that food
requires three parameters: nutrition
of type int
, saturation
of type float
, and can_always_eat
of type boolean
.
Now, let's try working with a compound tag. The {}
signifies that you need to open a new section in your YAML configuration.
However, upon closer inspection of the wiki, you'll notice that this method becomes obsolete in version 1.21.5. When 1.21.5 is released, you will need to update your configuration file as follows:
In the following example, the issue arises due to changes in Minecraft versions causing Components to become obsolete.
To avoid such frustrations, you might create a template as outlined below:
Last updated