Interface GuiNavigationScreen<Element extends GuiElement<?,Element>,Payload>

Type Parameters:
Element - the GuiElement type for the root element
Payload - the payload type for the screen
All Known Subinterfaces:
GuiNavigatorScreenWithoutPayload<Element>

@NullMarked public interface GuiNavigationScreen<Element extends GuiElement<?,Element>,Payload>
GuiNavigationScreen is a screen that can be navigated to via GuiNavigator.navigate(java.lang.Class<T>). Screens define a GuiNavigationScreen type that they receive when a user navigates to them.
  • Method Details

    • getPayloadType

      Class<Payload> getPayloadType()
      Returns:
      the payload type for the screen
    • rootElement

      Element rootElement()
      Returns:
      the root element for the screen
    • onNavigate

      void onNavigate(Element element, Payload payload)
      Called when a user navigates to the screen.
      Parameters:
      element - the root element of the screen
      payload - the payload sent with the navigation