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 booleanonHoldTick(net.minecraft.client.player.LocalPlayer player, net.minecraft.world.InteractionHand hand) Called on tick while this module is active and the Interact keybind is still pressed.voidonRelease(net.minecraft.client.player.LocalPlayer player, net.minecraft.world.InteractionHand hand) Counterpart toInteractModule.onPress(net.minecraft.client.player.LocalPlayer, net.minecraft.world.InteractionHand)
This is called when the module was active, and the Interact keybind released oronHoldTick(net.minecraft.client.player.LocalPlayer, net.minecraft.world.InteractionHand)returnedfalse.Methods inherited from interface org.vivecraft.api.client.InteractModule
getId, getPriority, isActive, onPress, reset, swingsArm
-
Method Details
-
onHoldTick
default boolean onHoldTick(net.minecraft.client.player.LocalPlayer player, net.minecraft.world.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:
trueif this module is still active orfalseif the Interact keybind should be released early- Since:
- 1.3.0
-
onRelease
void onRelease(@Nullable net.minecraft.client.player.LocalPlayer player, net.minecraft.world.InteractionHand hand) Counterpart toInteractModule.onPress(net.minecraft.client.player.LocalPlayer, net.minecraft.world.InteractionHand)
This is called when the module was active, and the Interact keybind released oronHoldTick(net.minecraft.client.player.LocalPlayer, net.minecraft.world.InteractionHand)returnedfalse.- Parameters:
player- the local player,nullif not in a worldhand- the hand that released the Interact keybind- Since:
- 1.3.0
-