Class InputEvent.MouseScrollingEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.InputEvent
net.neoforged.neoforge.client.event.InputEvent.MouseScrollingEvent
- All Implemented Interfaces:
- net.neoforged.bus.api.ICancellableEvent
- Enclosing class:
- InputEvent
public static class InputEvent.MouseScrollingEvent
extends InputEvent
implements net.neoforged.bus.api.ICancellableEvent
Fired when a mouse scroll wheel is used outside of a screen and a player is loaded, before being
 processed by vanilla.
 
This event is cancellable, and does not 
.
 If the event is cancelled, then the mouse scroll event will not be processed further.invalid reference
have a result
This event is fired on the main Forge event bus, only on the logical client.
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class net.neoforged.neoforge.client.event.InputEventInputEvent.InteractionKeyMappingTriggered, InputEvent.Key, InputEvent.MouseButton, InputEvent.MouseScrollingEvent
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final booleanprivate final booleanprivate final doubleprivate final doubleprivate final booleanprivate final doubleprivate final double
- 
Constructor SummaryConstructorsConstructorDescriptionMouseScrollingEvent(double scrollDeltaX, double scrollDeltaY, boolean leftDown, boolean middleDown, boolean rightDown, double mouseX, double mouseY) 
- 
Method SummaryModifier and TypeMethodDescriptiondoubleReturns the X position of the mouse cursor.doubleReturns the Y position of the mouse cursor.doubleReturns the amount of change / delta of the mouse scroll on the X axis.doubleReturns the amount of change / delta of the mouse scroll on the Y axis.booleanReturnstrueif the left mouse button is pressed.booleanReturnstrueif the middle mouse button is pressed.booleanReturnstrueif the right mouse button is pressed.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.bus.api.ICancellableEventisCanceled, setCanceled
- 
Field Details- 
scrollDeltaXprivate final double scrollDeltaX
- 
scrollDeltaYprivate final double scrollDeltaY
- 
mouseXprivate final double mouseX
- 
mouseYprivate final double mouseY
- 
leftDownprivate final boolean leftDown
- 
middleDownprivate final boolean middleDown
- 
rightDownprivate final boolean rightDown
 
- 
- 
Constructor Details- 
MouseScrollingEvent@Internal public MouseScrollingEvent(double scrollDeltaX, double scrollDeltaY, boolean leftDown, boolean middleDown, boolean rightDown, double mouseX, double mouseY) 
 
- 
- 
Method Details- 
getScrollDeltaXpublic double getScrollDeltaX()Returns the amount of change / delta of the mouse scroll on the X axis.- Returns:
- the amount of change / delta of the mouse scroll on the X axis
 
- 
getScrollDeltaYpublic double getScrollDeltaY()Returns the amount of change / delta of the mouse scroll on the Y axis.- Returns:
- the amount of change / delta of the mouse scroll on the Y axis
 
- 
isLeftDownpublic boolean isLeftDown()Returnstrueif the left mouse button is pressed.- Returns:
- trueif the left mouse button is pressed
 
- 
isRightDownpublic boolean isRightDown()Returnstrueif the right mouse button is pressed.- Returns:
- trueif the right mouse button is pressed
 
- 
isMiddleDownpublic boolean isMiddleDown()Returnstrueif the middle mouse button is pressed.- Returns:
- trueif the middle mouse button is pressed
 
- 
getMouseXpublic double getMouseX()Returns the X position of the mouse cursor.- Returns:
- the X position of the mouse cursor
 
- 
getMouseYpublic double getMouseY()Returns the Y position of the mouse cursor.- Returns:
- the Y position of the mouse cursor
 
 
-