✅ Select

https://minecraft.wiki/w/Items_model_definition#select

Render an item model based on discrete property.

When using "minecraft:select," you need to specify a property type. cases represent a list of scenarios to match against, while fallback represents the item model object that will be used if no valid entry is found. It is optional, but if not provided, a "missing" error model will be rendered.

items:
  default:select_item:
    model:
      type: "minecraft:select"
      property: "minecraft:charge_type"
      cases:
        - when: arrow
          model:
            type: minecraft:model
            path: "minecraft:item/custom/model_1"
        - when: rocket
          model:
            type: minecraft:model
            path: "minecraft:item/custom/model_2"
      fallback:
        type: minecraft:model
        path: "minecraft:item/custom/model_3"

Available Properties

minecraft:charge_type

Return charge type stored in minecraft:charged_projectiles component.

minecraft:context_dimension

Return the ID of the dimension in context, if any.

minecraft:context_entity_type

Return the holding entity type, if present.

minecraft:display_context

Return context this item is rendered in.

minecraft:main_hand

Return main hand of holding player.

minecraft:trim_material

Return value of material field from minecraft:trim component, if present.

minecraft:block_state

Return value for some property from minecraft:block_state component.

type: "minecraft:select"
property: "minecraft:block_state"
block-state-property: "facing"

minecraft:component

Return value from a component. If the selected value comes from a registry and the current datapacks does not provide it, the entry will be silently ignored.

type: "minecraft:select"
property: "minecraft:component"
component: "minecraft:unbreakable"

minecraft:custom_model_data

Return value from strings list in minecraft:custom_model_data component.

type: "minecraft:select"
property: "minecraft:custom_model_data"
index: 0

minecraft:local_time

Returns the current time formatted according to a given pattern. The value is updated every second. For full format documentation for locale, time zone and pattern, see ICU (International Components for Unicode) documentation.

type: "minecraft:select"
property: "minecraft:local_time"
locale: "en_US"
time-zone: "GMT+0:45"
pattern: "HH:mm:ss"

Last updated