Class RegisterPresetEditorsEvent

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.RegisterPresetEditorsEvent
All Implemented Interfaces:
net.neoforged.fml.event.IModBusEvent

public class RegisterPresetEditorsEvent extends net.neoforged.bus.api.Event implements net.neoforged.fml.event.IModBusEvent

Event for registering PresetEditor screen factories for world presets.

This event is not cancellable, and does not

invalid reference
have a result
.

This event is fired on the mod-specific event bus, only on the logical client.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Map<net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.presets.WorldPreset>,net.minecraft.client.gui.screens.worldselection.PresetEditor>
     
    private static final org.apache.logging.log4j.Logger
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    RegisterPresetEditorsEvent(Map<net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.presets.WorldPreset>,net.minecraft.client.gui.screens.worldselection.PresetEditor> editors)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    register(net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.presets.WorldPreset> key, net.minecraft.client.gui.screens.worldselection.PresetEditor editor)
    Registers a PresetEditor for a given world preset key.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LOGGER

      private static final org.apache.logging.log4j.Logger LOGGER
    • editors

      private final Map<net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.presets.WorldPreset>,net.minecraft.client.gui.screens.worldselection.PresetEditor> editors
  • Constructor Details

    • RegisterPresetEditorsEvent

      @Internal public RegisterPresetEditorsEvent(Map<net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.presets.WorldPreset>,net.minecraft.client.gui.screens.worldselection.PresetEditor> editors)
  • Method Details

    • register

      public void register(net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.presets.WorldPreset> key, net.minecraft.client.gui.screens.worldselection.PresetEditor editor)
      Registers a PresetEditor for a given world preset key.