mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-10 07:41:31 +01:00
Fixed Mappings
This commit is contained in:
parent
b3b549e693
commit
d1bcfe3fd4
@ -8,6 +8,7 @@ import net.minecraft.client.multiplayer.ServerData;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.silentclient.client.Client;
|
||||
import net.silentclient.client.mixin.accessors.GuiMultiplayerAccessor;
|
||||
import net.silentclient.client.utils.ClientUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Field;
|
||||
@ -29,7 +30,7 @@ public class GuiMultiplayerInGame extends GuiMultiplayer {
|
||||
try {
|
||||
Class<?> clazz = this.getClass();
|
||||
Object cc = clazz.newInstance();
|
||||
Field f1 = cc.getClass().getSuperclass().getDeclaredField("selectedServer");
|
||||
Field f1 = cc.getClass().getSuperclass().getDeclaredField(ClientUtils.isDevelopment() ? "selectedServer" : "z");
|
||||
f1.setAccessible(true);
|
||||
f1.set(cc, new ServerData(I18n.format("selectServer.defaultName"), "", false));
|
||||
this.mc.displayGuiScreen(new GuiScreenServerList(this, (ServerData) f1.get(cc)));
|
||||
@ -55,7 +56,7 @@ public class GuiMultiplayerInGame extends GuiMultiplayer {
|
||||
try {
|
||||
Class<?> clazz = this.getClass();
|
||||
Object cc = clazz.newInstance();
|
||||
Field f1 = cc.getClass().getSuperclass().getDeclaredField("parentScreen");
|
||||
Field f1 = cc.getClass().getSuperclass().getDeclaredField(ClientUtils.isDevelopment() ? "parentScreen" : "g");
|
||||
f1.setAccessible(true);
|
||||
f1.set(cc, null);
|
||||
} catch (Exception err) {
|
||||
|
Loading…
Reference in New Issue
Block a user