EliteFantasy ResourcePack Guide
  • ResourcePack Guide
    • Introduction
    • Beginning
      • lang
      • sounds
      • texts
      • particles
      • atlases
      • fonts
      • blockstates
      • textures
        • Equipment
        • Entity Textures
      • models
        • Blockbench Models
        • ItemsModels & CustomModelData
          • custommodeldata (old)
          • custommodeldata extras (old)
        • Understanding the system the new item system
      • shaders
  • Components Guide
    • Introduction
      • Components
  • Discord
    • Discord
Powered by GitBook
On this page
  • What is this?
  • What are the types what that can be used with this?
  • minecraft:model Type Example
  • minecraft:composite Type Example
  • minecraft:condition Type Example
  • minecraft:select Type Example
  • minecraft:range_dispatch Type Example
  • minecraft:empty Type Example
  • minecraft:bundle/selected_item Type Example
  • minecraft:special Type Example
  • Tints types
  • Different model with different durability
  1. ResourcePack Guide
  2. Beginning
  3. models

Understanding the system the new item system

What is this?

This is a feature added in 1.21.4 that allows you to create a lot of things using models, with conditions and other options available using the items section.

📦resource_pack.zip
  └── 📁assets
       └── 📁minecraft
           └── 📁items
                ├── 📑diamond.json
                ├── 📑bow.json
                ├── 📑crossbow.json
                ├── 📑shield.json
                ├── 📑fishing_rod.json
                ├── 📑potion.json
                └── 📑<more_items>.json

hand_animation_on_swap optional. Describing if down-and-up animation should be played in first-person view when item slot is changed (either type, count, components or by swapping the item into the other hand). Default: true

{
    "hand_animation_on_swap": true,
    "model": {
        // code
    }
}

What are the types what that can be used with this?

These are all the types that you can use inside the model and we are going to see each one and its properties

Parameter
Description

minecraft:model

Render a plain model from the models directory

minecraft:composite

Render multiple sub-models in the same space.

minecraft:condition

Renders a model if the condition is met

minecraft:select

Render an item model based on discrete property.

minecraft:range_dispatch

Render an item model based on numeric property. Will select last entry with threshold less or equal to property value.

minecraft:empty

Does not render anything.

minecraft:bundle/selected_item

Render the selected stack in minecraft:bundle_contents component, if present, otherwise does nothing.

minecraft:special

Render a special model.

📑Root model item model object
  ├── 📑type
  │    ├── 📑minecraft:model
  │    │    └── 📑model: <model>
  │    ├── 📑minecraft:composite
  │    │    └── 📑models:
  │    │         └── 📑<list_of_models>
  │    ├── 📑minecraft:condition
  │    │     └── 📑property
  │    │         ├── 📑minecraft:broken
  │    │         │    ├── 📑on_true
  │    │         │    │     └── <stuff>
  │    │         │    └── 📑on_false
  │    │         ├── 📑minecraft:bundle/has_selected_item
  │    │         ├── 📑minecraft:carried
  │    │         ├── 📑minecraft:component
  │    │         └── 📑<stuff>
  │    ├── 📑minecraft:select
  │    │    └── 📑property
  │    │         └── 📑<stuff>
  │    ├── 📑minecraft:range_dispatch
  │    ├── 📑minecraft:empty
  │    ├── 📑minecraft:bundle/selected_item
  │    └── 📑minecraft:special
  └──📑tints
      ├── 📑minecraft:constant
      ├── 📑minecraft:dye
      ├── 📑minecraft:firework
      ├── 📑minecraft:grass
      ├── 📑minecraft:map_color
      ├── 📑minecraft:potion
      ├── 📑minecraft:team
      └── 📑minecraft:custom_model_data

The available model types are quite curious, since you can put one type of model inside another type of model like this

{
    "model": {
        "type": "minecraft:composite",
        "models": [
            {
                "type": "minecraft:condition",
                "property": "minecraft:keybind_down",
                "keybind": "key.right",
                "on_true": {
                    "type": "minecraft:select",
                    "property": "minecraft:local_time",
                    "locale": "",
                    "pattern": "HH",
                    "cases": [
                        {
                            "when": "12",
                            "model": {
                                "model": "minecraft:item/key_left_12_hour_diamond",
                                "type": "minecraft:model"
                            }
                        }
                    ],
                    "fallback": {
                        "type": "minecraft:model",
                        "model": "minecraft:item/diamond"
                    }
                },
                "on_false": {
                    "type": "minecraft:model",
                    "model": "minecraft:item/diamond"
                }
            }
        ]
    }
}

minecraft:model Type Example

{
    "model": {
        "type": "minecraft:model",
        "model": "minecraft:item/potion"
    }
}

minecraft:composite Type Example

{
    "model": {
        "type": "minecraft:composite",
        "models": [
            {
                "type": "minecraft:model",
                "model": "minecraft:item/custom/model_1"
            },
            {
                "type": "minecraft:model",
                "model": "minecraft:item/custom/model_2"
            },
            {
                "type": "minecraft:model",
                "model": "minecraft:item/custom/model_3"
            }
        ]
    }
}

minecraft:condition Type Example

Property Types

Parameter
Description

minecraft:broken

Return true if the item is damageable and has only one use remaining before breaking.

minecraft:bundle/has_selected_item

Return true if bundle is "open", i.e. it has selected item visible in GUI.

minecraft:carried

Return true if item is carried between slots in GUI.

minecraft:component

Uses component item sub predicates to match item components.

minecraft:damaged

Return true if the item is damageable and has been used at least once.

minecraft:extended_view

Return true if player has requested extended details by holding shift key down. Only works when item is displayed in UI. Note: not a keybind, can't be rebound.

minecraft:fishing_rod/cast

Return true if there is a fishing bobber attached to currently used fishing rod.

minecraft:has_component

Return true if the given component is present on the item.

minecraft:keybind_down

Return true if keybind is currently active.

minecraft:selected

Return true if item is selected on a hotbar.

minecraft:using_item

Return true if player is currently using this item.

minecraft:view_entity

  • When not spectating, return true if context entity is the local player entity, i.e. the one controlled by client.

  • When spectating, return true if context entity is the spectated entity.

  • If context entity is not present, will return false.

minecraft:custom_model_data

Return value from flags list in minecraft:custom_model_data component.

Additional fiels depending on value of boolean property type

Parameter
Description

on_true

The Item model object when the property is true.

on_false

The Item model object when the property is false

minecraft:component Condition Example

Only Available for +1.21.5

{
    "model": {
        "type": "minecraft:condition",
        "property": "minecraft:component",
        "component": "minecraft:custom_name",
        "cases": [
            {
                "when": "This is a Test",
                "model": {
                    "model": "minecraft:item/awesome_item",
                    "type": "minecraft:model"
                }
            }
        ],
        "scale": 1,
        "fallback": {
            "type": "minecraft:model",
            "model": "minecraft:item/diamond"
        }
    }
}

minecraft:has_component Condition Example

{
    "model": {
        "type": "minecraft:condition",
        "property": "minecraft:has_component",
        "component": "minecraft:enchantments",
        "ignore_default": true,
        "on_false": {
            "type": "minecraft:model",
            "model": "minecraft:item/golden_hoe"
        },
        "on_true": {
            "type": "minecraft:model",
            "model": "minecraft:item/enchanted_golden_hoe"
        },
        "scale": 1,
        "fallback": {
            "type": "minecraft:model",
            "model": "minecraft:item/golden_hoe"
        }
    }
}

minecraft:keybind_down Condition Example

keybind options

Parameter
Description
Default activation key

key.jump

Jump. When swimming, keeps the player afloat. When double-tapped, toggles Fly Mode (Creative only). When Fly Mode is on

Space

key.sneak

Holding Shift and pressing use

Left Shift

key.sprint

Start sprinting. Increase speed when Fly Mode is on.

Left Control

key.left

Strafe left.

A

key.right

Strafe right.

D

key.back

Move backward.

S

key.forward

Move forward. The secondary sprint is permanently tied to this.

W

key.attack

Destroy blocks (hold down); Attack entity (click once).

key.pickItem

Pressing that button while looking at a block or an entity makes the game attempt to put a corresponding item for the block or entity in the player's hand

key.use

Place blocks, summon entities with spawn eggs, toggle levers/doors (click once), charge a bow (release to fire), crossbow, use crossbow, block using a shield, use special blocks like chests, doors, and levers, enter vehicles, eat food, drink potions, till farmland, shear or dye a sheep, command tamed wolves and cats to sit, trade with villagers, place fire using flint and steel or a fire charge, name a mob with a name tag, attach a lead to an animal or attach an animal on a lead to a fence, cast or reel in a fishing rod, throw a splash potion, egg, ender pearl, eye of ender, bottle o' enchanting, or snowball, equip armor from the hotbar if the associated armor slot is empty, eating cake, starting a furnace minecart, open book and quill and written book, use debug stick, add mob in a monster spawner.

key.drop

Drop/toss an item

Q

key.hotbar.1 – key.hotbar.9

Selects the appropriate hotbar item. When in the inventory GUI, swap the contents of the inventory slot under the mouse pointer and the corresponding hotbar slot.

1–9

key.inventory

Opens the inventory. Close any open GUI.

E

key.swapOffhand

Switches the items in the players main and off-hand. When in the inventory GUI, swap the contents of the inventory slot under the mouse pointer and the off-hand slot.

F

key.loadToolbarActivator

Press this key + any number, to access any of the 9 saved toolbars.

X

key.saveToolbarActivator

Press this key + any number, to save the current toolbar under that number.

C

key.playerlist

In Multiplayer, hold the Tab key to see a list of players.

When in the chat window, Tab cycles through possible commands or arguments and also complete player names

Tab

key.chat

Chat and server commands. If pressed while the Creative mode inventory is open, it switches to the Search tab.

T

key.command

Opens the chat window with the "/" character already typed. On some keyboards (Nordic layout at least) this button might be asterisk/apostrophe (*/ ' ).

/

key.socialInteractions

Gives players the ability to disable chatting with certain players, thus hiding any messages receiving from them. Whether a player is hidden resets when re-joining a server.

P

key.advancements

Open the advancements screen.

L

key.spectatorOutlines

Highlights players in Spectator mode.

Not bound

key.screenshot

Simply pressing this key takes a screenshot

F2

key.smoothCamera

Toggles mouse smoothing. Looking around becomes a slow, smooth and more cinematic motion.

Not bound

key.fullscreen

Toggles full-screen mode.

F11

key.togglePerspective

Toggles between first person, third person from the back and third person from the front.

F5

Visual Example

{
    "model": {
        "type": "minecraft:composite",
        "models": [
            {
                "type": "minecraft:model",
                "model": "keyboard:item/keyboard/board"
            },
            {
                "type": "minecraft:condition",
                "property": "minecraft:keybind_down",
                "keybind": "key.right",
                "on_true": {
                    "type": "minecraft:model",
                    "model": "keyboard:item/keyboard/pressed_key/d"
                },
                "on_false": {
                    "type": "minecraft:model",
                    "model": "keyboard:item/keyboard/default_key/d"
                }
            }
        ]
    }
}

minecraft:using_item Condition Example

{
    "model": {
        "type": "minecraft:condition",
        "on_false": {
            "type": "minecraft:model",
            "model": "minecraft:item/shield"
        },
        "on_true": {
            "type": "minecraft:special",
            "model": "minecraft:item/shield_blocking"
        },
        "property": "minecraft:using_item"
    }
}

minecraft:custom_model_data Condition Example

index Optional. Index for field in flags. Default: 0.

{
    "model": {
        "type": "minecraft:condition",
        "on_false": {
            "type": "minecraft:model",
            "index": 0,
            "model": "minecraft:item/shield"
        },
        "on_true": {
            "type": "minecraft:model",
            "index": 0,
            "model": "minecraft:item/shield"
        },
        "property": "minecraft:custom_model_data"
    }
}

minecraft:select Type Example

Parameter
Description

minecraft:block_state

Return value for some property from minecraft:block_state component.

minecraft:charge_type

Return charge type stored in minecraft:charged_projectiles component.

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.

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: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.

minecraft:main_hand

Return main hand of holding player.

minecraft:trim_material

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

minecraft:custom_model_data

Return value from strings list in minecraft:custom_model_data component.

minecraft:charge_type Select Example

This will cause you to have a different model depending on the type of charge you gave it.

Values:

  • none: If there are no projectiles or component is not present.

  • rocket: If there is at least one firework rocket.

  • arrow: Any other case.

{
    "model": {
        "type": "minecraft:select",
        "property": "minecraft:charge_type",
        "cases": [
            {
                "when": "arrow",
                "model": {
                    "model": "minecraft:item/charded_arror_model",
                    "type": "minecraft:model"
                }
            }
        ],
        "scale": 1,
        "fallback": {
            "type": "minecraft:model",
            "model": "minecraft:item/crossbow"
        }
    }
}

minecraft:component Values Example

{
    "model": {
        "type": "minecraft:select",
        "property": "minecraft:component",
        "component": "minecraft:custom_name",
        "cases": [
            {
                "when": "Netherite Sword",
                "model": {
                    "model": "minecraft:item/netherite_sword",
                    "type": "minecraft:model"
                }
            }
        ],
        "scale": 1,
        "fallback": {
            "type": "minecraft:model",
            "model": "minecraft:item/diamond_sword"
        }
    }
}

minecraft:context_dimension Values Example

This will mean that when you are in a different dimension the object will have a different model.

Values:

  • Namespaced dimension ID.

{
    "model": {
        "type": "minecraft:select",
        "property": "minecraft:context_dimension",
        "cases": [
            {
                "when": "minecraft:the_end",
                "model": {
                    "model": "minecraft:item/corrupted_diamond_sword",
                    "type": "minecraft:model"
                }
            }
        ],
        "scale": 1,
        "fallback": {
            "type": "minecraft:model",
            "model": "minecraft:item/diamond_sword"
        }
    }
}

minecraft:context_entity_type Values Example

This may cause that when that specific entity holds the object in its hand it appears differently.

Values:

  • Namespaced entity type ID.

{
    "model": {
        "type": "minecraft:select",
        "property": "minecraft:context_entity_type",
        "cases": [
            {
                "when": "minecraft:zombie",
                "model": {
                    "model": "minecraft:item/destroyed_diamond_sword",
                    "type": "minecraft:model"
                }
            },
            {
                "when": [
                    "minecraft:baby_drowned",
                    "minecraft:drowned"
                ],
                "model": {
                    "model": "minecraft:item/oceanic_destroyed_diamond_sword",
                    "type": "minecraft:model"
                }
            }
        ],
        "scale": 1,
        "fallback": {
            "type": "minecraft:model",
            "model": "minecraft:item/diamond_sword"
        }
    }
}

minecraft:display_context Values Example

This allows the model to change depending on what perspective is being viewed.

Values:

  • none

  • thirdperson_lefthand

  • thirdperson_righthand

  • firstperson_lefthand

  • firstperson_righthand

  • head

  • gui

  • ground

  • fixed

{
    "model": {
        "type": "minecraft:select",
        "property": "minecraft:display_context",
        "cases": [
            {
                "when": [
                    "gui",
                    "ground"
                ],
                "model": {
                    "model": "minecraft:item/epic_sword_item",
                    "type": "minecraft:model"
                }
            }
        ],
        "scale": 1,
        "fallback": {
            "type": "minecraft:model",
            "model": "minecraft:item/epic_sword"
        }
    }
}

minecraft:local_time Example

This allows the model to change depending on a schedule in real life

Parameter
Description

locale

Optional. Value describing locale. Default "" which means "root" locale (a set of defaults, including English names).

  • en_US: English language (used for things like week names), formating as in USA.

  • cs_AU@numbers=thai;calendar=japanese: Czech language, Australian formatting, Thai numerals and Japanese calendar.

time_zone

Optional. Value describing time zone. If not present, defaults to timezone set on client.

  • Examples: Europe/Stockholm, GMT+0:45

pattern

Describes format to be used for time formatting

  • yyyy-MM-dd: 4-digit year number, then 2-digit month number, then 2-digit day of month number, all zero-padded if needed, separated by -.

  • HH:mm:ss: current time (hours, minutes, seconds), 24-hour cycle, all zero-padded to 2 digits of needed, separated by :

{
    "model": {
        "type": "minecraft:select",
        "property": "minecraft:local_time",
        "locale": "",
        "pattern": "HH",
        "cases": [
            {
                "when": "12",
                "model": {
                    "model": "irlclock:item/clock/hour_12",
                    "type": "minecraft:model"
                }
            }
        ],
        "fallback": {
            "type": "minecraft:model",
            "model": "minecraft:item/clock"
        }
    }
}

another example with chest christmas texture

{
  "model": {
    "type": "minecraft:select",
    "cases": [
      {
        "model": {
          "type": "minecraft:special",
          "base": "minecraft:item/chest",
          "model": {
            "type": "minecraft:chest",
            "texture": "minecraft:christmas"
          }
        },
        "when": [
          "12-24",
          "12-25",
          "12-26"
        ]
      }
    ],
    "fallback": {
      "type": "minecraft:special",
      "base": "minecraft:item/chest",
      "model": {
        "type": "minecraft:chest",
        "texture": "minecraft:normal"
      }
    },
    "pattern": "MM-dd",
    "property": "minecraft:local_time"
  }
}

minecraft:main_hand Values Example

Values:

  • left or right

minecraft:trim_material Values Example

Values:

  • Namespaced ID trim material.

minecraft:custom_model_data Values Example

Values:

  • Index (Optional) for field in strings. Default: 0

  • Any String

minecraft:range_dispatch Type Example

Parameter
Description

miminecraft:bundle/fullness

Return weight of minecraft:bundle_contents component or 0 if not present.

minecraft:compass

Return an angle, scaled from 0.0 to 1.0 in x-z plane between holder position and target. If target is not valid (not present, in other dimension or too close to holder position) random value will be returned.

mineminecraft:cooldown

Return remaining cooldown for item, scaled between 0.0 to 1.0.

minecraft:count

Return stack size.

minecraft:crossbow/pull

Return crossbow-specific use time.

minecraft:damage

Return value for minecraft:damage component or 0 if not present.

minecraft:time

Return value of a in-game time, scaled betewen 0.0 to 1.0

minecraft:use_cycle

Return remaining use ticks modulo period

minecraft:use_duration

Return item use ticks.

minecraft:custom_model_data

Return value from floats list in minecraft:custom_model_data component or 0 if not present.

minecraft:compass Range Dispatch Example

where this compass will direct you to

Target Parameter
Description

spawn

points at world spawn.

lodestone

points at location stored in minecraft:lodestone_tracker component.

recovery

points at last player death location.

none

always return an invalid target.

Wobble Value

Optional. If true, value will oscillate for some time around target before settling. Default: true

{
    "model": {
        "type": "minecraft:range_dispatch",
        "property": "minecraft:compass",
        "wobble": true,
        "target": "spawn",
        "cases": [
            {
                "when": "0.2",
                "model": {
                    "model": "irlclock:item/clock/compass_02",
                    "type": "minecraft:model"
                }
            }
        ],
        "scale": 1,
        "fallback": {
            "type": "minecraft:model",
            "model": "minecraft:item/diamond"
        }
    }
}

minecraft:count Range Dispatch Example

Normalize Parameter
Description

true

return count divided by minecraft:max_stack_size component, clamped to 0.0 to 1.0

false

points at location stored in minreturn count clamped to 0 to minecraft:max_stack_size

{
    "model": {
        "type": "minecraft:range_dispatch",
        "property": "minecraft:count",
        "cases": [
            {
                "when": "0.2",
                "model": {
                    "model": "minecraft:item/damaged_1",
                    "type": "minecraft:model"
                }
            }
        ],
        "scale": 1,
        "fallback": {
            "type": "minecraft:model",
            "model": "minecraft:item/diamond"
        }
    }
}

minecraft:damage Range Dispatch Example

Parameter
Description

true

Tireturn value of damage divided by minecraft:max_damage component, clamped to 0.0 to 1.0

false

return raw value of damage, clamped to 0 to minecraft:max_damage

minecraft:time Range Dispatch Example

Parameter
Description

source

Time source to return. One of daytime, moon_phase or random

wobble

Optional. If true, value will oscillate for some time around target before settling. Default: true

{
    "model": {
        "type": "minecraft:range_dispatch",
        "property": "minecraft:time",
        "wobble": true,
        "source": "daytime",
        "entries": [
            {
                "threshold": 12000,
                "model": {
                    "model": "minecraft:item/awesome_time",
                    "type": "minecraft:model"
                }
            }
        ],
        "scale": 1,
        "fallback": {
            "type": "minecraft:model",
            "model": "minecraft:item/compass"
        }
    }
}

minecraft:use_duration Range Dispatch Example

Remaining Parameter
Description

true

returned value will be remaining use ticks

false

ticks so far

{
    "model": {
        "type": "minecraft:range_dispatch",
        "property": "minecraft:use_duration",
        "remaining": false,
        "entries": [
            {
                "threshold": 0.58,
                "model": {
                    "model": "minecraft:item/awesome_item",
                    "type": "minecraft:model"
                }
            }
        ],
        "scale": 1,
        "fallback": {
            "type": "minecraft:model",
            "model": "minecraft:item/diamond"
        }
    }
}

minecraft:custom_model_data Range Dispatch Example

Index (Optional) for field in colors. Default: 0

{
    "model": {
        "type": "minecraft:range_dispatch",
        "property": "minecraft:custom_model_data",
        "index": 0,
        "entries": [
            {
                "threshold": 1382.0,
                "model": {
                    "model": "minecraft:item/awesome_item",
                    "type": "minecraft:model"
                }
            }
        ],
        "scale": 1,
        "fallback": {
            "type": "minecraft:model",
            "model": "minecraft:item/diamond"
        }
    }
}

minecraft:empty Type Example

Does not render anything.

minecraft:bundle/selected_item Type Example

Render the selected stack in minecraft:bundle_contents component, if present, otherwise does nothing.

minecraft:special Type Example

Parameter
Description

minecraft:banner

Render a banner with patterns from minecraft:banner_patterns component.

minecraft:bed

Render a whole bed.

minecraft:chest

Render a single chest.

minecraft:conduit

Render conduit.

minecraft:decorated_pot

Render a decorated pot. Uses values from minecraft:pot_decorations component.

minecraft:head

Render a head. Uses profile from minecraft:profile component when applicable.

minecraft:shield

Render a shield. Uses patterns from minecraft:banner_patterns component and color from minecraft:base_color component.

minecraft:shulker_box

Render a shulker box.

minecraft:standing_sign

Renders a standing sign.

minecraft:hanging_sign

Renders a hanging sign.

minecraft:trident

Render a trident.

minecraft:banner Special Example

color Color of the banner base, one of 16 predefined colors.

{
    "model": {
        "type": "minecraft:special",
        "property": "minecraft:banner",
        "base": "minecraft:item/template_banner",
        "model": {
            "type": "minecraft:banner",
            "color": "green"
        }
    }
}

minecraft:bed Special Example

texture Namespaced ID for the texture, without textures/entity/bed/ prefix and .png suffix

{
  "model": {
    "type": "minecraft:special",
    "base": "minecraft:item/black_bed",
    "model": {
      "type": "minecraft:bed",
      "texture": "minecraft:black"
    }
  }
}

minecraft:chest Special Example

texture Namespaced ID for the texture, without textures/entity/chest/ prefix and .png suffix

openness Optional. Render the chest in the specified open state, between 0.0 (fully closed) to 1.0 (fully open). Default: 0.0

{
  "model": {
    "type": "minecraft:select",
    "cases": [
      {
        "model": {
          "type": "minecraft:special",
          "base": "minecraft:item/chest",
          "model": {
            "type": "minecraft:chest",
            "texture": "minecraft:christmas"
          }
        },
        "when": [
          "12-24",
          "12-25",
          "12-26"
        ]
      }
    ],
    "fallback": {
      "type": "minecraft:special",
      "base": "minecraft:item/chest",
      "model": {
        "type": "minecraft:chest",
        "openness": 0.0,
        "texture": "minecraft:normal"
      }
    },
    "pattern": "MM-dd",
    "property": "minecraft:local_time"
  }
}

minecraft:head Special Example

kind One of skeleton, wither_skeleton, player, zombie, creeper, piglin or dragon

texture Optional. Namespaced ID for the texture, without textures/entity/ prefix and .png suffix.

  • If absent, default texture will be used, depending on kind field. Additionally, if present, minecraft:profile component is ignored.

animation Optional. Controlling head animation if available for this kind of head (like Piglin ears or Ender Dragon jaw). Default: 0.0

  • The dragon animation is 10 units long. Mouth fully closed at -2.5 and fully open at 2.5

  • The piglin ears wiggle out of sync. The left ear period is 8.3333 and right ear period is 10.0

{
  "model": {
    "type": "minecraft:special",
    "base": "minecraft:item/template_skull",
    "model": {
      "type": "minecraft:head",
      "animation": 0.0,
      "kind": "player"
    }
  }
}

minecraft:shulker_box Special Example

texture Namespaced ID for the texture, without textures/entity/shulker/ prefix and .png suffix

openness Optional. Render the shulker box in the specified open state, between 0.0 (fully closed) to 1.0 (fully open). Default: 0.0

orientation Optional. Orientation for rendering. Default: up

{
  "model": {
    "type": "minecraft:special",
    "base": "minecraft:item/shulker_box",
    "model": {
      "type": "minecraft:shulker_box",
      "openness": 0.0,
      "orientation": "up",
      "texture": "minecraft:shulker"
    }
  }
}

minecraft:standing_sign Special Example

wood_type One of oak, spruce, birch, acacia, cherry, jungle, dark_oak, pale_oak, mangrove, bamboo, crimson or warped.

texture Optional. Namespaced ID for the texture, without textures/entity/ prefix and .png suffix. If present, wood_type field is ignored.

{
  "model": {
    "type": "minecraft:special",
    "model": {
      "type": "minecraft:standing_sign",
      "wood_type": "oak",
      "texture": "minecraft:signs/oak"
    }
  }
}

minecraft:hanging_sign Special Example

wood_type One of oak, spruce, birch, acacia, cherry, jungle, dark_oak, pale_oak, mangrove, bamboo, crimson or warped.

texture Optional. Namespaced ID for the texture, without textures/entity/ prefix and .png suffix. If present, wood_type field is ignored.

{
  "model": {
    "type": "minecraft:special",
    "model": {
      "type": "minecraft:hanging_sign",
      "wood_type": "oak",
      "texture": "minecraft:signs/oak"
    }
  }
}

Tints types

Parameter
Description

minecraft:constant

A packed integer RGB value (e.g. -1) or an array of decimal RGB values, each between 0.0 and 1.0 (e.g. [1, 1, 1]

minecraft:dye

[int] An RGB value.

minecraft:firework

[int] An RGB value.

minecraft:grass

Return grass color at specific climate parameters, based on assets/minecraft/textures/colormap/grass.png

minecraft:map_color

[int] An RGB value.

minecraft:potion

[int] An RGB value.

minecraft:team

[int] An RGB value.

minecraft:custom_model_data

[int] An RGB value.

minecraft:potion Example

Return color from minecraft:potion_contents component

  • if component is present:

    • custom_color value, if there is one present in component

    • default color, if effect list is empty

    • average of effect colors

  • else, default color

{
  "model": {
    "type": "minecraft:model",
    "model": "minecraft:item/potion",
    "tints": [
      {
        "type": "minecraft:potion",
        "default": -13083194
      }
    ]
  }
}

minecraft:grass Example

temperature Positive float between 0.0 and 1.0

downfall Positive float between 0.0 and 1.0

{
    "model": {
        "type": "minecraft:model",
        "model": "minecraft:block/grass_block",
        "tints": [
            {
                "type": "minecraft:grass",
                "downfall": 1,
                "temperature": 0.5
            }
        ]
    }
}

minecraft:team Example

Returns the team color of context entity, if any. Else, when there is no context entity, entity is not in a team or team has no color, return default.

{
    "model": {
        "type": "minecraft:model",
        "model": "minecraft:item/potion",
        "tints": [
            {
                "type": "minecraft:team",
                "default": -13083194
            }
        ]
    }
}

minecraft:custom_model_data Example

Return value from colors list in minecraft:custom_model_data component. Index (Optional) for field in colors. Default: 0

{
    "model": {
        "type": "minecraft:model",
        "model": "minecraft:item/potion",
        "tints": [
            {
                "type": "minecraft:custom_model_data",
                "index": 0,
                "default": -13083194
            }
        ]
    }
}

Different model with different durability

This will cause the item to have 120 damage to have a different model.

{
    "model": {
        "type": "minecraft:range_dispatch",
        "property": "minecraft:damage",
        "cases": [
            {
                "when": "120",
                "model": {
                    "model": "minecraft:item/diamond_sword_damage_1",
                    "type": "minecraft:model"
                }
            },
             {
                "when": "121",
                "model": {
                    "model": "minecraft:item/diamond_sword_damage_1",
                    "type": "minecraft:model"
                }
            }
        ],
        "scale": 1,
        "fallback": {
            "type": "minecraft:model",
            "model": "minecraft:item/diamond_sword"
        }
    }
}
Previouscustommodeldata extras (old)Nextshaders

Last updated 1 month ago

To convert RGB values to int use

this