Class FullscreenMapEvent.ClickEvent

Enclosing class:
FullscreenMapEvent

public static class FullscreenMapEvent.ClickEvent extends FullscreenMapEvent
ClickedEvent, handles mouseclicks pre and post, pre is cancelable post is not.
  • 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 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.