Package org.vivecraft.api.client
Interface HeldInteractModule
- All Superinterfaces:
InteractModule
Compared to a regular
A HeldInteractModule can be used to drag stuff around. Vivecraft itself uses it to trigger the camera grabbing and bow drawing.
InteractModule
, a HeldInteractModule blocks other modules from using the
Interact keybind until it is released/not used anymore.
A HeldInteractModule can be used to drag stuff around. Vivecraft itself uses it to trigger the camera grabbing and bow drawing.
- Since:
- 1.3.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
onHoldTick
(LocalPlayer player, InteractionHand hand) Called on tick while this module is active and the Interact keybind is still pressed.void
onRelease
(LocalPlayer player, InteractionHand hand) Counterpart toInteractModule.onPress(LocalPlayer, InteractionHand)
This is called when the module was active, and the Interact keybind released oronHoldTick(LocalPlayer, InteractionHand)
returnedfalse
.Methods inherited from interface org.vivecraft.api.client.InteractModule
getId, getPriority, isActive, onPress, reset, swingsArm
-
Method Details
-
onHoldTick
default boolean onHoldTick(LocalPlayer player, InteractionHand hand) Called on tick while this module is active and the Interact keybind is still pressed. Useful to process the module state, or cancel early.- Parameters:
player
- the local playerhand
- the hand that is holding the Interact keybind- Returns:
true
if this module is still active orfalse
if the Interact keybind should be released early- Since:
- 1.3.0
-
onRelease
void onRelease(@Nullable LocalPlayer player, InteractionHand hand) Counterpart toInteractModule.onPress(LocalPlayer, InteractionHand)
This is called when the module was active, and the Interact keybind released oronHoldTick(LocalPlayer, InteractionHand)
returnedfalse
.- Parameters:
player
- the local player,null
if not in a worldhand
- the hand that released the Interact keybind- Since:
- 1.3.0
-