This commit is contained in:
kirillsaint 2023-06-28 21:46:42 +06:00
parent 6556bca062
commit 0c6916f8c9
5 changed files with 12 additions and 12 deletions

View File

@ -77,7 +77,7 @@ public class GuiConnecting extends GuiScreen
try { try {
Minecraft.getMinecraft().isIntegratedServerRunning(); Minecraft.getMinecraft().isIntegratedServerRunning();
Minecraft.getMinecraft().func_181540_al(); Minecraft.getMinecraft().getIntegratedServer();
Minecraft.getMinecraft().theWorld.sendQuittingDisconnectingPacket(); Minecraft.getMinecraft().theWorld.sendQuittingDisconnectingPacket();
Minecraft.getMinecraft().loadWorld((WorldClient)null); Minecraft.getMinecraft().loadWorld((WorldClient)null);
} catch(Exception err) { } catch(Exception err) {
@ -85,7 +85,7 @@ public class GuiConnecting extends GuiScreen
} }
inetaddress = InetAddress.getByName(ip); inetaddress = InetAddress.getByName(ip);
GuiConnecting.this.networkManager = NetworkManager.func_181124_a(inetaddress, port, GuiConnecting.this.mc.gameSettings.func_181148_f()); GuiConnecting.this.networkManager = NetworkManager.createNetworkManagerAndConnect(inetaddress, port, GuiConnecting.this.mc.gameSettings.useNativeTransport);
GuiConnecting.this.networkManager.setNetHandler(new NetHandlerLoginClient(GuiConnecting.this.networkManager, GuiConnecting.this.mc, GuiConnecting.this.previousGuiScreen)); GuiConnecting.this.networkManager.setNetHandler(new NetHandlerLoginClient(GuiConnecting.this.networkManager, GuiConnecting.this.mc, GuiConnecting.this.previousGuiScreen));
GuiConnecting.this.networkManager.sendPacket(new C00Handshake(47, ip, port, EnumConnectionState.LOGIN)); GuiConnecting.this.networkManager.sendPacket(new C00Handshake(47, ip, port, EnumConnectionState.LOGIN));
GuiConnecting.this.networkManager.sendPacket(new C00PacketLoginStart(GuiConnecting.this.mc.getSession().getProfile())); GuiConnecting.this.networkManager.sendPacket(new C00PacketLoginStart(GuiConnecting.this.mc.getSession().getProfile()));
@ -141,7 +141,7 @@ public class GuiConnecting extends GuiScreen
try { try {
Minecraft.getMinecraft().isIntegratedServerRunning(); Minecraft.getMinecraft().isIntegratedServerRunning();
Minecraft.getMinecraft().func_181540_al(); Minecraft.getMinecraft().getIntegratedServer();
Minecraft.getMinecraft().theWorld.sendQuittingDisconnectingPacket(); Minecraft.getMinecraft().theWorld.sendQuittingDisconnectingPacket();
Minecraft.getMinecraft().loadWorld((WorldClient)null); Minecraft.getMinecraft().loadWorld((WorldClient)null);
} catch(Exception err) { } catch(Exception err) {
@ -149,7 +149,7 @@ public class GuiConnecting extends GuiScreen
} }
inetaddress = InetAddress.getByName(ip); inetaddress = InetAddress.getByName(ip);
GuiConnecting.this.networkManager = NetworkManager.func_181124_a(inetaddress, port, GuiConnecting.this.mc.gameSettings.func_181148_f()); GuiConnecting.this.networkManager = NetworkManager.createNetworkManagerAndConnect(inetaddress, port, GuiConnecting.this.mc.gameSettings.useNativeTransport);
GuiConnecting.this.networkManager.setNetHandler(new NetHandlerLoginClient(GuiConnecting.this.networkManager, GuiConnecting.this.mc, GuiConnecting.this.previousGuiScreen)); GuiConnecting.this.networkManager.setNetHandler(new NetHandlerLoginClient(GuiConnecting.this.networkManager, GuiConnecting.this.mc, GuiConnecting.this.previousGuiScreen));
GuiConnecting.this.networkManager.sendPacket(new C00Handshake(47, ip, port, EnumConnectionState.LOGIN)); GuiConnecting.this.networkManager.sendPacket(new C00Handshake(47, ip, port, EnumConnectionState.LOGIN));
GuiConnecting.this.networkManager.sendPacket(new C00PacketLoginStart(GuiConnecting.this.mc.getSession().getProfile())); GuiConnecting.this.networkManager.sendPacket(new C00PacketLoginStart(GuiConnecting.this.mc.getSession().getProfile()));

View File

@ -79,7 +79,7 @@ public class GuiIngameMenu extends GuiScreen
case 1: case 1:
boolean flag = this.mc.isIntegratedServerRunning(); boolean flag = this.mc.isIntegratedServerRunning();
boolean flag1 = this.mc.func_181540_al(); boolean flag1 = this.mc.isSingleplayer();
button.enabled = false; button.enabled = false;
this.mc.theWorld.sendQuittingDisconnectingPacket(); this.mc.theWorld.sendQuittingDisconnectingPacket();
this.mc.loadWorld((WorldClient)null); this.mc.loadWorld((WorldClient)null);

View File

@ -87,8 +87,8 @@ public class GuiMainMenu extends GuiScreen implements GuiYesNoCallback
if (!GLContext.getCapabilities().OpenGL20 && !OpenGlHelper.areShadersSupported()) if (!GLContext.getCapabilities().OpenGL20 && !OpenGlHelper.areShadersSupported())
{ {
this.openGLWarning1 = I18n.format("title.oldgl1", new Object[0]); this.openGLWarning1 = I18n.format("title.oldgl1");
this.openGLWarning2 = I18n.format("title.oldgl2", new Object[0]); this.openGLWarning2 = I18n.format("title.oldgl2");
this.openGLWarningLink = "https://help.mojang.com/customer/portal/articles/325948?ref=game"; this.openGLWarningLink = "https://help.mojang.com/customer/portal/articles/325948?ref=game";
} }
} }
@ -102,8 +102,8 @@ public class GuiMainMenu extends GuiScreen implements GuiYesNoCallback
if (!GLContext.getCapabilities().OpenGL20 && !OpenGlHelper.areShadersSupported()) if (!GLContext.getCapabilities().OpenGL20 && !OpenGlHelper.areShadersSupported())
{ {
this.openGLWarning1 = I18n.format("title.oldgl1", new Object[0]); this.openGLWarning1 = I18n.format("title.oldgl1");
this.openGLWarning2 = I18n.format("title.oldgl2", new Object[0]); this.openGLWarning2 = I18n.format("title.oldgl2");
this.openGLWarningLink = "https://help.mojang.com/customer/portal/articles/325948?ref=game"; this.openGLWarningLink = "https://help.mojang.com/customer/portal/articles/325948?ref=game";
} }
} }
@ -241,7 +241,7 @@ public class GuiMainMenu extends GuiScreen implements GuiYesNoCallback
if (worldinfo != null) if (worldinfo != null)
{ {
GuiYesNo guiyesno = GuiSelectWorld.func_152129_a(this, worldinfo.getWorldName(), 12); GuiYesNo guiyesno = GuiSelectWorld.makeDeleteWorldYesNo(this, worldinfo.getWorldName(), 12);
this.mc.displayGuiScreen(guiyesno); this.mc.displayGuiScreen(guiyesno);
} }
} }

View File

@ -249,7 +249,7 @@ public class MiniMapMod extends ModDraggable {
if (j / 4 == 0) { if (j / 4 == 0) {
miniMapTexture.getTextureData()[i] = (i + i / 128 & 1) * 8 + 16 << 24; miniMapTexture.getTextureData()[i] = (i + i / 128 & 1) * 8 + 16 << 24;
} else { } else {
miniMapTexture.getTextureData()[i] = MapColor.mapColorArray[j / 4].func_151643_b(j & 3); miniMapTexture.getTextureData()[i] = MapColor.mapColorArray[j / 4].getMapColor(j & 3);
} }
} }

View File

@ -25,7 +25,7 @@ public class Utils {
public static void pingServer(String address, IntConsumer callback) throws UnknownHostException { public static void pingServer(String address, IntConsumer callback) throws UnknownHostException {
ServerAddress serverAddress = ServerAddress.fromString(address); ServerAddress serverAddress = ServerAddress.fromString(address);
NetworkManager networkManager = NetworkManager.func_181124_a( NetworkManager networkManager = NetworkManager.createNetworkManagerAndConnect(
InetAddress.getByName(serverAddress.getIP()), serverAddress.getPort(), false); InetAddress.getByName(serverAddress.getIP()), serverAddress.getPort(), false);
networkManager.setNetHandler(new INetHandlerStatusClient() { networkManager.setNetHandler(new INetHandlerStatusClient() {