[GH-ISSUE #5523] Native mods: using an item over time (start, tick, stop, finish) #1713

Closed
opened 2026-11-02 15:49:07 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @reservedbytes on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5523

Originally assigned to: @reservedbytes on GitHub.

Part of #4953

A mod item can't be used over time like a bow, a shield or food
Vanilla asks Item.getUseDuration, then calls onUseTick each tick, releaseUsing when let go and finishUsingItem at the end, and NeoForge fires LivingEntityUseItemEvent Start/Tick/Stop/Finish; Player.canEat decides if food can be eaten
Mod consume effects are #5448, this is the use itself

What's missing

  • a mod item answering its use duration and animation
  • hooks for each use tick, release and finish, with the stack and the user
  • a mod changing whether a player can eat something right now
Originally created by @reservedbytes on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5523 Originally assigned to: @reservedbytes on GitHub. Part of #4953 A mod item can't be used over time like a bow, a shield or food Vanilla asks `Item.getUseDuration`, then calls `onUseTick` each tick, `releaseUsing` when let go and `finishUsingItem` at the end, and NeoForge fires `LivingEntityUseItemEvent` Start/Tick/Stop/Finish; `Player.canEat` decides if food can be eaten Mod consume effects are #5448, this is the use itself What's missing - a mod item answering its use duration and animation - hooks for each use tick, release and finish, with the stack and the user - a mod changing whether a player can eat something right now
Author
Owner

@reservedbytes commented on GitHub (Oct 31, 2026):

/claim

<!-- gh-comment-id:6550762128 --> @reservedbytes commented on GitHub (Oct 31, 2026): /claim
Author
Owner

@reservedbytes commented on GitHub (Nov 1, 2026):

done in #5649 and #5905

<!-- gh-comment-id:6561352094 --> @reservedbytes commented on GitHub (Nov 1, 2026): done in #5649 and #5905
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#1713
No description provided.