-
Notifications
You must be signed in to change notification settings - Fork 0
Creating a New Item
This page is for how to create a new item using the item command. If using the Pro version, an easier setup using the Item Creator GUI Can be found here
The first step in creating an item is simply getting the item you wish to bind attributes to from vanilla. ItemAttributes also supports any item with custom components set through the /give command, such as durability. For this example, we will be using a diamond sword with custom durability set.
Example give command:
/give @s diamond_sword[minecraft:max_damage=10000]
After you have your item, the first step is binding a template. To put it simply, a template simply controls the display of the item, and how attributes and slots are displayed. The plugin comes with two default ones built in, equipment and gem. For this example, we will be using the equipment template. For more information on modifying the default templates, see the Modifying Item Templates page.
To start, simply run /items template bind equipment while holding your item. This will bind the template to the item.

Initially, it will appear as if nothing happened, however, your item will now be rendered using the equipment template. As the default template specifies a durability renderer, you will see upon using the item, the durability will be rendered differently.

The next steps involve editing what you visually see on the item, such as the name and lore.
The item name can very simply be set by running the /items name <name> command, and specifying the name. This also supports MiniMessage which lets you define colors.
Setting the lore (or description) can be set using the /items name <description> command. The template will control where and how the lore will display on the item, which in the case of the default equipment template, it will wrap the text and style it as gray. Newlines can also be used by using the MiniMessage <br> tag.

This example is done using the built-in equipment template, which can be modified. See the Modifying Item Templates page for more information on modifying existing templates, or creating new ones.