Skip to main content

📡 Range Dispatch

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

Fields​

FieldTypeRequiredDefaultDescription
typestringYes—minecraft:range_dispatch
propertystringYes—Numeric property type (see below)
scalefloatNo1.0Multiplier applied to the property value before comparing
entrieslistYes—List of {threshold, model} pairs
fallbackmodelNoemptyModel used when property < all thresholds
transformationobjectNo—Display transform overlay (26.1+)

Each entry:

FieldTypeDescription
thresholdfloatMinimum property value for this model
modelmodelModel used when property â‰Ĩ this threshold (and < next threshold)

Properties​

No extra fields​

PropertyReturns (0.0–1.0 unless noted)
minecraft:crossbow/pullCrossbow-specific pull progress
minecraft:bundle/fullnessWeight of minecraft:bundle_contents (0 if absent)
minecraft:cooldownRemaining cooldown ratio (0 if not in inventory)
minecraft:use_cycleRemaining 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 # "spawn", "lodestone", "recovery", or "none"
wobble: true # Whether pointer oscillates before settling
FieldTypeDefaultDescription
targetstring—Target type
wobblebooltrueSimulate 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 # true — count/max_stack_size (0–1); false — raw count
FieldTypeDefaultDescription
normalizebooltrueScale 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 # true — damage/max_damage (0–1); false — raw damage value
FieldTypeDefaultDescription
normalizebooltrueScale 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 # "daytime" (sun angle), "moon_phase", or "random"
wobble: true # Smooth clock-like oscillation
FieldTypeDefaultDescription
sourcestring—Time source
wobblebooltrueSmooth oscillation

minecraft:use_duration​

Returns item use ticks elapsed (or remaining).

property: minecraft:use_duration
remaining: false # false — elapsed ticks; true — remaining ticks
FieldTypeDefaultDescription
remainingboolfalseReturn 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
FieldTypeDefaultDescription
indexint0Position in the floats array