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.minecraft.client.resources.I18n;
|
||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.mixin.accessors.GuiMultiplayerAccessor;
|
import net.silentclient.client.mixin.accessors.GuiMultiplayerAccessor;
|
||||||
|
import net.silentclient.client.utils.ClientUtils;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
|
@ -29,7 +30,7 @@ public class GuiMultiplayerInGame extends GuiMultiplayer {
|
||||||
try {
|
try {
|
||||||
Class<?> clazz = this.getClass();
|
Class<?> clazz = this.getClass();
|
||||||
Object cc = clazz.newInstance();
|
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.setAccessible(true);
|
||||||
f1.set(cc, new ServerData(I18n.format("selectServer.defaultName"), "", false));
|
f1.set(cc, new ServerData(I18n.format("selectServer.defaultName"), "", false));
|
||||||
this.mc.displayGuiScreen(new GuiScreenServerList(this, (ServerData) f1.get(cc)));
|
this.mc.displayGuiScreen(new GuiScreenServerList(this, (ServerData) f1.get(cc)));
|
||||||
|
@ -55,7 +56,7 @@ public class GuiMultiplayerInGame extends GuiMultiplayer {
|
||||||
try {
|
try {
|
||||||
Class<?> clazz = this.getClass();
|
Class<?> clazz = this.getClass();
|
||||||
Object cc = clazz.newInstance();
|
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.setAccessible(true);
|
||||||
f1.set(cc, null);
|
f1.set(cc, null);
|
||||||
} catch (Exception err) {
|
} catch (Exception err) {
|
||||||
|
|
Loading…
Reference in New Issue