Item properties

Works with

About item properties

Items properties (also known as item states) is a feature for the item element that allows players to update the texture and model based on a condition.

There are two sections to the Item State screen, they are called "custom property" and "state definition". We will cover both of these sections below.

Custom property

Adding a custom property

Clicking on the "Add custom property" button will prompt you for a name for the custom property. This name should not be used already.

Property name

Once you have a property name you can make a condition for the property.

Making a property condition

One thing to remember is that some server-side procedure blocks may not work with item states. In the case that your texture or model does not update there is a chance that the condition can't work on client-side.

The condition works a lot like other conditions in MCreator. You need to return a value using the return block found under "Flow control". There is one major difference and that is that the return block needs to be a number return block (the dark blue return block).

You can add an if statement and return different numbers based on different conditions. However, your last block should return a default value.

Once you have saved your condition you should see it be selected in the "property value provider". If this is the case you will be able to use the values of the return blocks in your "state definitions" section which we will cover next.

State definition

Adding a state definition

Clicking on the "Add state definition" button will open a window for you to select what state definitions you want to use for your item state.

There are some built-in definitions:

Definition Operation Type
Damaged Equal to (=) Boolean
Damage Equal to or greater than (>=) Number
Left Handed Equal to (=) Boolean
Cooldown Equal to or greater than (>=) Number
Trim Type Equal to or greater than (>=) Number
Custom property Equal to or greater than (>=) Number

Selecting a definition

You can select the definition by checking the box on the left side of the definition name. You can add more definition properties even as the same type as long as the value is something different.

Textures and models

Each definition you add gives you two additional settings that you can change for the item. These settings are "Item texture" and "Item model".

Video tutorial



Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.