Skip to content

Commit

Permalink
remove exiting to multiplayer if integrated server is not running
Browse files Browse the repository at this point in the history
  • Loading branch information
pixfumy committed Feb 16, 2023
1 parent fd94bc3 commit 75d7a7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
Expand Up @@ -30,18 +30,9 @@ public void addAutoResetButton(CallbackInfo ci){
public void buttonClicked(ButtonWidget button, CallbackInfo ci){
if(button.id==1238){
Atum.isRunning=false;
boolean bl = MinecraftClient.getInstance().isIntegratedServerRunning();
boolean bl2 = MinecraftClient.getInstance().isConnectedToRealms();
MinecraftClient.getInstance().world.disconnect();
MinecraftClient.getInstance().connect((ClientWorld)null);
if (bl) {
MinecraftClient.getInstance().openScreen(new TitleScreen());
} else if (bl2) {
RealmsBridge realmsBridge = new RealmsBridge();
realmsBridge.switchToRealms(new TitleScreen());
} else {
MinecraftClient.getInstance().openScreen(new MultiplayerScreen(new TitleScreen()));
}
MinecraftClient.getInstance().openScreen(new TitleScreen());
}
}
}
Expand Up @@ -66,20 +66,11 @@ public void atum_tick(CallbackInfo ci){
Atum.hotkeyPressed=false;
Atum.isRunning = true;
Atum.loopPrevent2=true;
boolean bl = this.isIntegratedServerRunning();
boolean bl2 = this.isConnectedToRealms();
if (this.world != null) {
this.world.disconnect();
}
this.connect(null);
if (bl) {
this.openScreen(new TitleScreen());
} else if (bl2) {
RealmsBridge realmsBridge = new RealmsBridge();
realmsBridge.switchToRealms(new TitleScreen());
} else {
this.openScreen(new MultiplayerScreen(new TitleScreen()));
}
this.openScreen(new TitleScreen());
if (Atum.HAS_ANCHIALE) {
AnchialeAPI.setAnchialeFastReset(false);
}
Expand Down

0 comments on commit 75d7a7a

Please sign in to comment.