@Environment(value=CLIENT) public class MinecraftClientGame extends Object implements com.mojang.bridge.game.RunningGame
Modifier and Type | Class and Description |
---|---|
(package private) static class |
MinecraftClientGame.PerformanceMetricsImpl |
Modifier and Type | Field and Description |
---|---|
private MinecraftClient |
client |
private com.mojang.bridge.launcher.Launcher |
launcher |
private com.mojang.bridge.launcher.SessionEventListener |
listener |
Constructor and Description |
---|
MinecraftClientGame(MinecraftClient client) |
Modifier and Type | Method and Description |
---|---|
com.mojang.bridge.game.GameSession |
getCurrentSession() |
com.mojang.bridge.game.PerformanceMetrics |
getPerformanceMetrics() |
com.mojang.bridge.game.Language |
getSelectedLanguage() |
com.mojang.bridge.game.GameVersion |
getVersion() |
void |
onLeaveGameSession() |
void |
onStartGameSession() |
void |
setSessionEventListener(com.mojang.bridge.launcher.SessionEventListener listener) |
private final MinecraftClient client
@Nullable private final com.mojang.bridge.launcher.Launcher launcher
private com.mojang.bridge.launcher.SessionEventListener listener
public MinecraftClientGame(MinecraftClient client)
public com.mojang.bridge.game.GameVersion getVersion()
getVersion
in interface com.mojang.bridge.game.RunningGame
public com.mojang.bridge.game.Language getSelectedLanguage()
getSelectedLanguage
in interface com.mojang.bridge.game.RunningGame
@Nullable public com.mojang.bridge.game.GameSession getCurrentSession()
getCurrentSession
in interface com.mojang.bridge.game.RunningGame
public com.mojang.bridge.game.PerformanceMetrics getPerformanceMetrics()
getPerformanceMetrics
in interface com.mojang.bridge.game.RunningGame
public void setSessionEventListener(com.mojang.bridge.launcher.SessionEventListener listener)
setSessionEventListener
in interface com.mojang.bridge.game.RunningGame
public void onStartGameSession()
public void onLeaveGameSession()