Fix bug with multiplayer

This commit is contained in:
ayunami2000 2022-08-05 11:38:05 -04:00
parent 405a212c8b
commit 36c75ca4e1
4 changed files with 17242 additions and 17234 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -60,6 +60,11 @@ public class IntegratedServer {
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() {
return statusState == IntegratedState.WORLD_LOADED || statusState == IntegratedState.WORLD_PAUSED ||
statusState == IntegratedState.WORLD_LOADING || statusState == IntegratedState.WORLD_SAVING;

View File

@ -590,7 +590,7 @@ public class Minecraft implements Runnable {
}
public void stopServerAndDisplayGuiScreen(GuiScreen par1GuiScreen) {
if(!IntegratedServer.isReady()) {
if(!IntegratedServer.isWorldNotLoaded()) {
IntegratedServer.unloadWorld();
displayGuiScreen(new GuiScreenSingleplayerLoading(par1GuiScreen, "saving world", () -> IntegratedServer.isReady()));
}else {