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.-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionmakeColorScheme
(String name) Makes a newScreenStyle.ColorScheme
with the given name.makeDesign
(String name) Makes a newScreenStyle.Design
with the given name.Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Constructor Details
-
RegisterScreenStylesEvent
public RegisterScreenStylesEvent()
-
-
Method Details
-
makeDesign
Makes a newScreenStyle.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
Makes a newScreenStyle.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.
-