In the AccountListScreen. java file, in the login and loginOffline methods
private void login() {
if (list.selectedElement() < 0 || state != null) return;
Account acc = list.entries.get(list.selectedElement()).account();
updateButtons();
state = "";
acc.login((s, o) -> state = I18n.format(s, o)).whenComplete((d, t) -> {
state = null;
if (t != null) {
mc.addScheduledTask(() -> mc.displayGuiScreen(new IASAlertScreen(() -> mc.displayGuiScreen(this),
EnumChatFormatting.RED + I18n.format("ias.error"),
String.valueOf(t))));
return;
}
mc.addScheduledTask(() -> {
mc.session = new Session(d.name(), UUIDTypeAdapter.fromUUID(d.uuid()), d.accessToken(), d.userType());
});
});
}
private void loginOffline() {
if (list.selectedElement() < 0 || state != null) return;
Account acc = list.entries.get(list.selectedElement()).account();
mc.session = new Session(acc.name(), UUIDTypeAdapter.fromUUID(UUID
.nameUUIDFromBytes("OfflinePlayer".concat(acc.name()).getBytes(StandardCharsets.UTF_8))),
"0", "legacy");
}
Two of the sessions reported errors
The error message is: 'session' has private access in 'net', minecraft.client,Minecraft
May I ask how to solve this
Thanks
In the AccountListScreen. java file, in the login and loginOffline methods private void login() { if (list.selectedElement() < 0 || state != null) return; Account acc = list.entries.get(list.selectedElement()).account(); updateButtons(); state = ""; acc.login((s, o) -> state = I18n.format(s, o)).whenComplete((d, t) -> { state = null; if (t != null) { mc.addScheduledTask(() -> mc.displayGuiScreen(new IASAlertScreen(() -> mc.displayGuiScreen(this), EnumChatFormatting.RED + I18n.format("ias.error"), String.valueOf(t)))); return; } mc.addScheduledTask(() -> { mc.session = new Session(d.name(), UUIDTypeAdapter.fromUUID(d.uuid()), d.accessToken(), d.userType()); }); }); }
Two of the sessions reported errors The error message is: 'session' has private access in 'net', minecraft.client,Minecraft May I ask how to solve this Thanks