Class MappingEvent


public class MappingEvent extends ClientEvent
This event fires when mapping starts or stops. WorldId can be set when mapping starts. This event is not cancellable.
  • Constructor Details

    • MappingEvent

      public MappingEvent(MappingEvent.Stage stage, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension, String worldId)
  • Method Details

    • getStage

      public MappingEvent.Stage getStage()
      Gets the current mapping stage.
      Returns:
      - The stage
    • getWorldId

      @Nullable public @Nullable String getWorldId()
      Gets the worldId for the current world. Will return null if no worldId has been set.
      Returns:
      worldId.
    • setWorldId

      public void setWorldId(@Nullable @Nullable String worldId)
      Sets the world id when mapping starts. This can only be set on the mapping started stage.
      Parameters:
      worldId - - the new worldId