Interface ScreenPlatform
public interface ScreenPlatform
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()<T> Tcurrent()voiddefault voidintintguiWidth()default floatReturn 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 inversescreenToMcScale()default floatdefault voidrunOnUiThread(Runnable action) Runs an action on the thread which owns the game's UI.default floatReturn 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 inversemcToScreenScale()default voidshowMessage(String message) default floatintintintint
-
Method Details
-
runOnUiThread
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 inversescreenToMcScale() -
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 inversemcToScreenScale() -
showMessage
-
display
-
display
-
close
default void close() -
current
@Nullable <T> T current()
-