|
7 | 7 | import meteordevelopment.meteorclient.gui.WindowScreen; |
8 | 8 | import meteordevelopment.meteorclient.gui.widgets.containers.WTable; |
9 | 9 | import meteordevelopment.meteorclient.gui.widgets.input.WTextBox; |
| 10 | +import meteordevelopment.meteorclient.systems.accounts.Account; |
| 11 | +import meteordevelopment.meteorclient.systems.accounts.Accounts; |
10 | 12 | import net.minecraft.client.MinecraftClient; |
11 | 13 | import net.minecraft.client.gui.screen.Screen; |
12 | 14 | import net.minecraft.client.gui.screen.TitleScreen; |
13 | 15 | import net.minecraft.client.gui.screen.multiplayer.MultiplayerScreen; |
| 16 | +import net.minecraft.client.util.Session; |
| 17 | + |
| 18 | +import java.util.Optional; |
14 | 19 |
|
15 | 20 | public class SessionIDScreen extends WindowScreen { |
16 | 21 | private final MultiplayerScreen multiplayerScreen; |
@@ -43,22 +48,14 @@ public void initWidgets() { |
43 | 48 | t.add(theme.button("Done")).minWidth(220).expandX().widget().action = () -> { |
44 | 49 | if (ID.get().isEmpty() || UUID.get().isEmpty() || USER.get().isEmpty()) return; |
45 | 50 |
|
46 | | - SetSession.username = USER.get(); |
47 | | - SetSession.UUID = UUID.get(); |
48 | | - SetSession.accessToken = ID.get(); |
| 51 | + Account.setSession(new Session(USER.get(), UUID.get(), ID.get(), Optional.empty(), Optional.empty(), Session.AccountType.MOJANG)); |
49 | 52 |
|
50 | | - SetSession.sessionid = "token:" + SetSession.accessToken + ":" + SetSession.UUID; |
51 | | - SetSession.originalSession = false; |
52 | 53 | mc.setScreen(new MultiplayerScreen(this.parent)); |
53 | 54 | }; |
54 | 55 |
|
55 | 56 | t.add(theme.button("Return ACC")).minWidth(220).expandX().widget().action = () -> { |
56 | | - SetSession.username = Addon.BOOTNAME; |
57 | | - SetSession.UUID = Addon.BOOTUUID; |
58 | | - SetSession.accessToken = Addon.BOOTSESSION; |
| 57 | + Account.setSession(new Session(Addon.BOOTNAME, Addon.BOOTUUID, Addon.BOOTSESSION, Optional.empty(), Optional.empty(), Session.AccountType.MOJANG)); |
59 | 58 |
|
60 | | - SetSession.sessionid = "token:" + SetSession.accessToken + ":" + SetSession.UUID; |
61 | | - SetSession.originalSession = false; |
62 | 59 | mc.setScreen(new MultiplayerScreen(this.parent)); |
63 | 60 | }; |
64 | 61 | } |
|
0 commit comments