Intro to Items

guide

beginner

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.

BP/items/custom_item.jsonCopy
json
{
    "format_version": "1.20.50",
    "minecraft:item": {
        "description": {
            "identifier": "wiki:custom_item",
            "menu_category": {
              "category": "construction"
            }
        },
        "components": {} // Must be here, even if empty!
    }
}
1
2
3
4
5
6
7
8
9
10
11
12

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 and is_hidden_in_commands.

Adding Components

Right now, our custom item is using the default component values (which can be found here).

Let's configure our own functionality!

BP/items/custom_item.jsonCopy
json
{
    "format_version": "1.20.50",
    "minecraft:item": {
        "description": {
            "identifier": "wiki:custom_item",
            "menu_category": {
                "category": "construction"
            }
        },
        "components": {
            "minecraft:damage": {
                "value": 10
            },
            "minecraft:durability":{
                "max_durability": 36
            },
            "minecraft:hand_equipped": {
                "value": true
            }
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

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.

RP/textures/item_texture.jsonCopy
json
{
    "resource_pack_name": "wiki",
    "texture_name": "atlas.items",
    "texture_data": {
        "custom_item": {
            "textures": "textures/items/custom_item"
        }
    }
}
1
2
3
4
5
6
7
8
9

In our item file, we will add the minecraft:icon component to apply the texture.

BP/items/custom_item.jsonCopy
json
{
    "format_version": "1.20.50",
    "minecraft:item": {
        "description": {
            "identifier": "wiki:custom_item",
            "menu_category": {
                "category": "construction"
            }
        },
        "components": {
            "minecraft:icon": {
                "texture": "custom_item"
            }
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

Defining Names

Finally, we will give our item a name. Additionally, you can use the Display Name component.

RP/texts/en_US.langCopy
c
tile.wiki:custom_item.name=Custom Item
1

Result

In this page, you've learnt about the following:

Contributors

yanasakanaMedicalJewel105