Overviewâ
Selects a child model by comparing a numeric property against threshold entries. The last entry whose threshold ⤠the property value is chosen. If no threshold matches, fallback is used; without a fallback, renders as empty.
items:
demo:shield:
material: shield
model:
type: minecraft:range_dispatch
property: minecraft:damage
scale: 1.0
entries:
- threshold: 0.0
model:
type: minecraft:model
path: minecraft:item/custom/shield_full
- threshold: 0.5
model:
type: minecraft:model
path: minecraft:item/custom/shield_cracked
fallback:
type: minecraft:model
path: minecraft:item/custom/shield_full
| Field | Type | Required | Default | Description |
|---|
type | string | Yes | â | minecraft:range_dispatch |
property | string | Yes | â | Numeric property type (see below) |
scale | float | No | 1.0 | Multiplier applied to the property value before comparing |
entries | list | Yes | â | List of {threshold, model} pairs |
fallback | model | No | empty | Model used when property < all thresholds |
transformation | object | No | â | Display transform overlay (26.1+) |
Each entry:
| Field | Type | Description |
|---|
threshold | float | Minimum property value for this model |
model | model | Model used when property âĨ this threshold (and < next threshold) |
Propertiesâ
| Property | Returns (0.0â1.0 unless noted) |
|---|
minecraft:crossbow/pull | Crossbow-specific pull progress |
minecraft:bundle/fullness | Weight of minecraft:bundle_contents (0 if absent) |
minecraft:cooldown | Remaining cooldown ratio (0 if not in inventory) |
minecraft:use_cycle | Remaining use ticks modulo period |
minecraft:compassâ
Returns angle 0.0â1.0 in the x-z plane toward the target. Returns random value if target is invalid.
property: minecraft:compass
target: spawn
wobble: true
| Field | Type | Default | Description |
|---|
target | string | â | Target type |
wobble | bool | true | Simulate compass wobble |
minecraft:countâ
Returns stack size. If normalize is true, returns count divided by max stack size, clamped 0.0â1.0. Otherwise returns raw count.
property: minecraft:count
normalize: true
| Field | Type | Default | Description |
|---|
normalize | bool | true | Scale to 0.0â1.0 |
minecraft:damageâ
Returns value from minecraft:damage component, or 0 if not present. If normalize is true, returns damage divided by max damage, clamped 0.0â1.0. Otherwise returns raw damage value.
property: minecraft:damage
normalize: true
| Field | Type | Default | Description |
|---|
normalize | bool | true | Scale to 0.0â1.0 |
minecraft:timeâ
Returns an in-game time value scaled 0.0â1.0. Source can be daytime (sun angle), moon_phase, or random (new value every frame).
property: minecraft:time
source: daytime
wobble: true
| Field | Type | Default | Description |
|---|
source | string | â | Time source |
wobble | bool | true | Smooth oscillation |
minecraft:use_durationâ
Returns item use ticks elapsed (or remaining).
property: minecraft:use_duration
remaining: false
| Field | Type | Default | Description |
|---|
remaining | bool | false | Return remaining ticks instead of elapsed |
minecraft:custom_model_dataâ
Reads from the floats list in minecraft:custom_model_data component.
property: minecraft:custom_model_data
index: 0
| Field | Type | Default | Description |
|---|
index | int | 0 | Position in the floats array |