mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-10 10:01:31 +01:00
Fix
This commit is contained in:
parent
738fcf83e2
commit
be6627e741
@ -1,16 +1,12 @@
|
|||||||
package net.silentclient.client.gui;
|
package net.silentclient.client.gui;
|
||||||
|
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.client.gui.GuiMultiplayer;
|
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
import net.minecraft.client.gui.GuiScreenServerList;
|
import net.silentclient.client.gui.multiplayer.SilentMultiplayerGui;
|
||||||
import net.minecraft.client.multiplayer.ServerData;
|
|
||||||
import net.minecraft.client.resources.I18n;
|
|
||||||
import net.silentclient.client.mixin.ducks.GuiMultiplayerExt;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public class GuiMultiplayerInGame extends GuiMultiplayer {
|
public class GuiMultiplayerInGame extends SilentMultiplayerGui {
|
||||||
|
|
||||||
public GuiMultiplayerInGame(GuiScreen parentScreen) {
|
public GuiMultiplayerInGame(GuiScreen parentScreen) {
|
||||||
super(parentScreen);
|
super(parentScreen);
|
||||||
@ -22,12 +18,6 @@ public class GuiMultiplayerInGame extends GuiMultiplayer {
|
|||||||
disconnect();
|
disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(button.id == 4) {
|
|
||||||
((GuiMultiplayerExt) this).silent$setDirectConnect(true);
|
|
||||||
((GuiMultiplayerExt) this).silent$setSelectedServer(new ServerData(I18n.format("selectServer.defaultName"), "", false));
|
|
||||||
this.mc.displayGuiScreen(new GuiScreenServerList(this, new ServerData(I18n.format("selectServer.defaultName"), "", false)));
|
|
||||||
}
|
|
||||||
|
|
||||||
super.actionPerformed(button);
|
super.actionPerformed(button);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,7 +32,7 @@ public class GuiMultiplayerInGame extends GuiMultiplayer {
|
|||||||
this.mc.theWorld.sendQuittingDisconnectingPacket();
|
this.mc.theWorld.sendQuittingDisconnectingPacket();
|
||||||
this.mc.loadWorld(null);
|
this.mc.loadWorld(null);
|
||||||
this.mc.displayGuiScreen(null);
|
this.mc.displayGuiScreen(null);
|
||||||
((GuiMultiplayerExt) this).silent$setParentScreen(null);
|
this.setParentScreen(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -320,4 +320,8 @@ public class SilentMultiplayerGui extends SilentScreen {
|
|||||||
public ServerList getServerList() {
|
public ServerList getServerList() {
|
||||||
return savedServerList;
|
return savedServerList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setParentScreen(GuiScreen parentScreen) {
|
||||||
|
this.parentScreen = parentScreen;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user