Package journeymap.api.v2.client.event
Class FullscreenMapEvent.MouseDraggedEvent
java.lang.Object
journeymap.api.v2.common.event.impl.JourneyMapEvent
journeymap.api.v2.common.event.impl.ClientEvent
journeymap.api.v2.client.event.FullscreenMapEvent
journeymap.api.v2.client.event.FullscreenMapEvent.MouseDraggedEvent
- Enclosing class:
FullscreenMapEvent
MouseDraggedEvent, handles mouse dragging pre and post, pre is cancelable post is not.
-
Nested Class Summary
Nested classes/interfaces inherited from class journeymap.api.v2.client.event.FullscreenMapEvent
FullscreenMapEvent.ClickEvent, FullscreenMapEvent.MouseDraggedEvent, FullscreenMapEvent.MouseMoveEvent, FullscreenMapEvent.Stage -
Field Summary
Fields inherited from class journeymap.api.v2.common.event.impl.ClientEvent
dimensionFields inherited from class journeymap.api.v2.common.event.impl.JourneyMapEvent
timestamp -
Constructor Summary
ConstructorsConstructorDescriptionMouseDraggedEvent(FullscreenMapEvent.Stage stage, net.minecraft.core.BlockPos location, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> level, Point2D.Double mousePosition, int button) Map MouseDraggedEvent event, fired when a user drag the mouse on the map. -
Method Summary
Modifier and TypeMethodDescriptionintdoubledoublegetStage()booleanWhether the event is cancellable.Methods inherited from class journeymap.api.v2.client.event.FullscreenMapEvent
getLevel, getLocationMethods inherited from class journeymap.api.v2.common.event.impl.JourneyMapEvent
cancel, isCancelled
-
Constructor Details
-
MouseDraggedEvent
public MouseDraggedEvent(FullscreenMapEvent.Stage stage, net.minecraft.core.BlockPos location, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> level, Point2D.Double mousePosition, int button) Map MouseDraggedEvent event, fired when a user drag the mouse on the map. Can be canceled.- Parameters:
stage- - The stagelocation- - The BlockPos of the click.level- - The dimension.mousePosition- - The precalculated scaled mouse position.button- - The mouse button.
-
-
Method Details
-
getStage
-
getMouseX
public double getMouseX() -
getMouseY
public double getMouseY() -
getMousePosition
-
getButton
public int getButton() -
isCancellable
public boolean isCancellable()Description copied from class:JourneyMapEventWhether the event is cancellable.- Overrides:
isCancellablein classJourneyMapEvent- Returns:
- true if cancellable.
-