ScreenEvents

public final class ScreenEvents

Holds events related to Screens.

Some events require a screen instance in order to obtain an event instance. The events that require a screen instance can be identified by the use of a method passing a screen instance. All events in ScreenKeyboardEvents and ScreenMouseEvents require a screen instance. This registration model is used since a screen being (re)initialized will reset the screen to it's default state, therefore reverting all changes a mod developer may have applied to a screen. Furthermore this design was chosen to reduce the amount of wasted iterations of events as a mod developer would only need to register screen events for rendering, ticking, keyboards and mice if needed on a per instance basis.

The primary entrypoint into a screen is when it is being opened, this is signified by an event before and after initialization of the screen.

See also

Types

AfterInit
Link copied to clipboard
public interface AfterInit
AfterRender
Link copied to clipboard
public interface AfterRender
AfterTick
Link copied to clipboard
public interface AfterTick
BeforeInit
Link copied to clipboard
public interface BeforeInit
BeforeRender
Link copied to clipboard
public interface BeforeRender
BeforeTick
Link copied to clipboard
public interface BeforeTick
Remove
Link copied to clipboard
public interface Remove

Functions

afterRender
Link copied to clipboard
static Event<ScreenEvents.AfterRenderafterRender(Screen screen)
An event that is called after a screen is rendered.
afterTick
Link copied to clipboard
static Event<ScreenEvents.AfterTickafterTick(Screen screen)
An event that is called after a screen is ticked.
beforeRender
Link copied to clipboard
static Event<ScreenEvents.BeforeRenderbeforeRender(Screen screen)
An event that is called before a screen is rendered.
beforeTick
Link copied to clipboard
static Event<ScreenEvents.BeforeTickbeforeTick(Screen screen)
An event that is called before a screen is ticked.
remove
Link copied to clipboard
static Event<ScreenEvents.Removeremove(Screen screen)
An event that is called after removed is called.This event signifies that the screen is now closed.

Properties

AFTER_INIT
Link copied to clipboard
public final static Event<ScreenEvents.AfterInitAFTER_INIT
An event that is called after a screen is initialized to it's default state.
BEFORE_INIT
Link copied to clipboard
public final static Event<ScreenEvents.BeforeInitBEFORE_INIT
An event that is called before a screen is initialized to it's default state.

Sources

jvm source
Link copied to clipboard