Package journeymap.api.v2.client.event
Class FullscreenMapEvent.ClickEvent
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.ClickEvent
- Enclosing class:
FullscreenMapEvent
ClickedEvent, handles mouseclicks 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
ConstructorsConstructorDescriptionClickEvent(FullscreenMapEvent.Stage stage, net.minecraft.core.BlockPos location, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> level, Point2D.Double mousePosition, int button) Map clicked event, fired when a user clicks 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
-
ClickEvent
public ClickEvent(FullscreenMapEvent.Stage stage, net.minecraft.core.BlockPos location, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> level, Point2D.Double mousePosition, int button) Map clicked event, fired when a user clicks 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.
-