Class FullscreenMapEvent.MouseDraggedEvent

Enclosing class:
FullscreenMapEvent

public static class FullscreenMapEvent.MouseDraggedEvent extends FullscreenMapEvent
MouseDraggedEvent, handles mouse dragging pre and post, pre is cancelable post is not.
  • 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 stage
      location - - The BlockPos of the click.
      level - - The dimension.
      mousePosition - - The precalculated scaled mouse position.
      button - - The mouse button.
  • Method Details

    • getStage

      public FullscreenMapEvent.Stage getStage()
    • getMouseX

      public double getMouseX()
    • getMouseY

      public double getMouseY()
    • getMousePosition

      public Point2D.Double getMousePosition()
    • getButton

      public int getButton()
    • isCancellable

      public boolean isCancellable()
      Description copied from class: JourneyMapEvent
      Whether the event is cancellable.
      Overrides:
      isCancellable in class JourneyMapEvent
      Returns:
      true if cancellable.