Package net.minecraftforge.client.event
Class InputEvent.ClickInputEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.InputEvent
net.minecraftforge.client.event.InputEvent.ClickInputEvent
- Enclosing class:
- InputEvent
This event fires when one of the keybindings that by default involves clicking the mouse buttons
 is triggered.
 These key bindings are use item, pick block and attack keybindings. (right, middle and left mouse click)
 In the case that these key bindings are re-bound to a keyboard key the event will still be fired as normal.
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraftforge.client.event.InputEventInputEvent.ClickInputEvent, InputEvent.KeyInputEvent, InputEvent.MouseInputEvent, InputEvent.MouseScrollEvent, InputEvent.RawMouseEventNested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Eventnet.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final intprivate final Handprivate booleanprivate final KeyBinding
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetHand()The hand which is causing the event to get triggered.booleanisAttack()booleanbooleanvoidsetSwingHand(boolean value) Set to false to disable the hand swing animation.booleanMethods inherited from class net.minecraftforge.eventbus.api.EventgetListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
- 
Field Details- 
buttonprivate final int button
- 
keyBinding
- 
hand
- 
handSwingprivate boolean handSwing
 
- 
- 
Constructor Details- 
ClickInputEvent
 
- 
- 
Method Details- 
setSwingHandpublic void setSwingHand(boolean value) Set to false to disable the hand swing animation. Has no effect if this is a pick block input.
- 
shouldSwingHandpublic boolean shouldSwingHand()
- 
getHandThe hand which is causing the event to get triggered. The event will be called for both hands if this is a use item input regardless of if either gets canceled. Will always be MAIN_HAND if this is an attack or pick block input.
- 
isAttackpublic boolean isAttack()
- 
isUseItempublic boolean isUseItem()
- 
isPickBlockpublic boolean isPickBlock()
- 
getKeyBinding
 
-