Java Code Examples for net.minecraft.client.gui.GuiScreen#doesGuiPauseGame()

The following examples show how to use net.minecraft.client.gui.GuiScreen#doesGuiPauseGame() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ClientProxy.java    From NOVA-Core with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public boolean isPaused() {
	if (FMLClientHandler.instance().getClient().isSingleplayer() &&
		Optional.ofNullable(FMLClientHandler.instance().getClient().getIntegratedServer()).map(is -> !is.getPublic()).orElse(true)) {
		GuiScreen screen = FMLClientHandler.instance().getClient().currentScreen;
		if (screen != null) {
			if (screen.doesGuiPauseGame()) {
				return true;
			}
		}
	}
	return false;
}
 
Example 2
Source File: ClientProxy.java    From NOVA-Core with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public boolean isPaused() {
	if (FMLClientHandler.instance().getClient().isSingleplayer() && !FMLClientHandler.instance().getClient().getIntegratedServer().getPublic()) {
		GuiScreen screen = FMLClientHandler.instance().getClient().currentScreen;
		if (screen != null) {
			if (screen.doesGuiPauseGame()) {
				return true;
			}
		}
	}
	return false;
}
 
Example 3
Source File: ClientProxy.java    From NOVA-Core with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public boolean isPaused() {
	if (FMLClientHandler.instance().getClient().isSingleplayer() && !FMLClientHandler.instance().getClient().getIntegratedServer().getPublic()) {
		GuiScreen screen = FMLClientHandler.instance().getClient().currentScreen;
		if (screen != null) {
			if (screen.doesGuiPauseGame()) {
				return true;
			}
		}
	}
	return false;
}