Intro to Items
Minecraft Bedrock allows us to add custom items into our world with various vanilla-like properties
This tutorial will cover how to create basic items for the stable version of Minecraft.
Registering Items
Item definitions are structured similarly to entities: they contain a description and a list of components that defines the item's behavior.
Below is the minimum behavior-side code to get a custom item into the creative inventory.
{
"format_version": "1.21.10",
"minecraft:item": {
"description": {
"identifier": "wiki:custom_item",
"menu_category": {
"category": "construction"
}
},
"components": {} // Must be here, even if empty!
}
}
Item Description
- Defines the item's identifier - a unique ID in the format of
namespace:identifier
. - Configures which
menu_category
the item is placed into.- Also takes the optional parameters
group
andis_hidden_in_commands
.
- Also takes the optional parameters
Adding Components
Right now, our custom item is using the default component values (which can be found here).
Let's configure our own functionality!
{
"format_version": "1.21.10",
"minecraft:item": {
"description": {
"identifier": "wiki:custom_item",
"menu_category": {
"category": "construction"
}
},
"components": {
"minecraft:damage": 10,
"minecraft:durability": {
"max_durability": 36
},
"minecraft:hand_equipped": true
}
}
}
Browse more item components here!
Applying Textures
We need to create a texture shortname to link it to an image in RP/textures/item_texture.json
.
{
"resource_pack_name": "wiki",
"texture_name": "atlas.items",
"texture_data": {
"custom_item": {
"textures": "textures/items/custom_item"
}
}
}
In our item file, we will add the minecraft:icon
component to apply the texture.
{
"format_version": "1.21.10",
"minecraft:item": {
"description": {
"identifier": "wiki:custom_item",
"menu_category": {
"category": "construction"
}
},
"components": {
"minecraft:icon": "custom_item"
}
}
}
Defining Names
Finally, we will give our item a name. Additionally, you can use the Display Name component.
tile.wiki:custom_item.name=Custom Item
Result
In this page, you've learnt about the following: