Alpha: this compiler is under active development and updates will break your projects. Not recommended for real use yet.
Skip to content

twine / WhileHeld

Function: WhileHeld() โ€‹

WhileHeld(item): MethodDecorator

Defined in: twine/src/item/handlers.ts:28

Runs the method every tick as and at each player holding item in the main hand, from twine's one holding check. Pass a function for an item made at build time; it's matched by all its components.

Parameters โ€‹

item โ€‹

ItemClassRef | (() => ItemLike)

Returns โ€‹

MethodDecorator

Released under the MIT License ยท Credits
These docs were written with AI; the layout and every page have been reviewed by a human.