Fix bug with multiplayer
This commit is contained in:
parent
405a212c8b
commit
36c75ca4e1
34465
javascript/classes.js
34465
javascript/classes.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -55,10 +55,15 @@ public class IntegratedServer {
|
||||||
EaglerAdapter.beginLoadingIntegratedServer();
|
EaglerAdapter.beginLoadingIntegratedServer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isReady() {
|
public static boolean isReady() {
|
||||||
return statusState == IntegratedState.WORLD_NONE;
|
return statusState == IntegratedState.WORLD_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isWorldNotLoaded() {
|
||||||
|
return statusState == IntegratedState.WORLD_NONE || statusState == IntegratedState.WORLD_WORKER_NOT_RUNNING ||
|
||||||
|
statusState == IntegratedState.WORLD_WORKER_BOOTING;
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean isWorldRunning() {
|
public static boolean isWorldRunning() {
|
||||||
return statusState == IntegratedState.WORLD_LOADED || statusState == IntegratedState.WORLD_PAUSED ||
|
return statusState == IntegratedState.WORLD_LOADED || statusState == IntegratedState.WORLD_PAUSED ||
|
||||||
|
|
|
@ -590,7 +590,7 @@ public class Minecraft implements Runnable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void stopServerAndDisplayGuiScreen(GuiScreen par1GuiScreen) {
|
public void stopServerAndDisplayGuiScreen(GuiScreen par1GuiScreen) {
|
||||||
if(!IntegratedServer.isReady()) {
|
if(!IntegratedServer.isWorldNotLoaded()) {
|
||||||
IntegratedServer.unloadWorld();
|
IntegratedServer.unloadWorld();
|
||||||
displayGuiScreen(new GuiScreenSingleplayerLoading(par1GuiScreen, "saving world", () -> IntegratedServer.isReady()));
|
displayGuiScreen(new GuiScreenSingleplayerLoading(par1GuiScreen, "saving world", () -> IntegratedServer.isReady()));
|
||||||
}else {
|
}else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user