Item model definitions can read use_duration, use_cycle, cooldown, time, count and custom_model_data, but nothing tells a pack how long an item has been in hand.
The client already computes this. ItemInHandRenderer animates mainHandHeight / mainHandTargetHeight on every slot change, scaled by swap_animation_scale. The clock exists; it is just not exposed. Item models can carry a transformation, but with no clock it cannot animate either.
Why it matters: a pack cannot play a one-shot draw animation when an item is selected, then settle into a loop. Texture animation runs on a global clock, so it never restarts on selection. minecraft:selected is a boolean with no age. Packs must ship a mod or datapack, so this is out of reach for pure resource packs.
Proposal: a numeric property, e.g. minecraft:equip_time, returning ticks since the stack entered either hand (main or off) and resetting on selection/swap, usable with range_dispatch like use_duration:
{"type":"minecraft:range_dispatch","property":"minecraft:equip_time","scale":0.5,"entries":[{"threshold":1,"model":{"type":"minecraft:model","model":"item/x_0"}},{"threshold":2,"model":{"type":"minecraft:model","model":"item/x_1"}}],"fallback":{"type":"minecraft:model","model":"item/x_idle"}}
This is a read-only exposure of state the client already computes. Purely additive: no existing pack or item behaviour changes.
0 Comments
Please sign in to leave a comment.
Post a new comment: