Class RegisterScreenStylesEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.api.client.screen.event.RegisterScreenStylesEvent

public class RegisterScreenStylesEvent extends net.minecraftforge.eventbus.api.Event
Event fired when screen styles are registered. Client mods can add their own for their screen by listening to this method, and making new styles via ScreenStyle.makeDesign(String) and ScreenStyle.makeColorScheme(String), or via the methods provided by this event. These methods become non-functional after this event is called. Once added, the registered styles will be valid options within all instances of ColorPalette. Note, built-in styles are not intended to be removed, and as such cannot be done with this event.
  • Constructor Details

    • RegisterScreenStylesEvent

      public RegisterScreenStylesEvent()
  • Method Details

    • makeDesign

      public Optional<ScreenStyle.Design> makeDesign(String name)
      Makes a new ScreenStyle.Design with the given name. Will return an empty optional if initialization has finished, or the name was already assigned.
      Parameters:
      name - The name of the new design.
      Returns:
      The new design, if created.
    • makeColorScheme

      public Optional<ScreenStyle.ColorScheme> makeColorScheme(String name)
      Makes a new ScreenStyle.ColorScheme with the given name. Will return an empty optional if initialization has finished, or the name was already assigned.
      Parameters:
      name - The name of the new color scheme.
      Returns:
      The new color scheme, if created.