Interface ScreenPlatform


public interface ScreenPlatform
  • Method Details

    • runOnUiThread

      default void runOnUiThread(Runnable action)
      Runs an action on the thread which owns the game's UI.
    • viewportWidth

      int viewportWidth()
    • viewportHeight

      int viewportHeight()
    • windowWidth

      int windowWidth()
    • windowHeight

      int windowHeight()
    • guiWidth

      int guiWidth()
    • guiHeight

      int guiHeight()
    • pixelRatio

      default float pixelRatio()
    • surfaceRatio

      default float surfaceRatio()
    • mcToScreenScale

      default float mcToScreenScale()
      Return a scaling factor from the Minecraft scaled coordinate system to standard window coordinates
      These window/screen coordinates are used by mouse and input as well as resizing
      See the inverse screenToMcScale()
    • screenToMcScale

      default float screenToMcScale()
      Return a scaling factor from the standard window coordinates to Minecraft scaled coordinate space
      These coordinates can be used in Minecraft rendering methods so they render at the correct place
      See the inverse mcToScreenScale()
    • showMessage

      default void showMessage(String message)
    • display

      void display(@Nullable @Nullable Object screen, int ticks)
    • display

      default void display(Object screen)
    • close

      default void close()
    • current

      @Nullable <T> T current()