Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove account mixins (meteor added them), Fix account not working in prod env. #232

Merged
merged 1 commit into from
Mar 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 0 additions & 54 deletions src/main/java/anticope/rejects/mixin/MinecraftClientAccessor.java

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.ModifyArg;

@Mixin(value = Account.class, remap = false)
@Mixin(value = Account.class)
public class AccountMixin {
@ModifyArg(method = "toTag", at = @At(value = "INVOKE", target = "Lnet/minecraft/nbt/NbtCompound;putString(Ljava/lang/String;Ljava/lang/String;)V", ordinal = 0), index = 1)
private String putString(String key) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;

@Mixin(value = Accounts.class, remap = false)
@Mixin(value = Accounts.class)
public class AccountsMixin {
@Inject(method = "lambda$fromTag$0", at = @At(value = "INVOKE", target = "Lnet/minecraft/nbt/NbtCompound;getString(Ljava/lang/String;)Ljava/lang/String;"), locals = LocalCapture.CAPTURE_FAILHARD, cancellable = true)
private static void onFromTag(NbtElement tag1, CallbackInfoReturnable<Account<?>> cir, NbtCompound t) {
Expand Down
45 changes: 0 additions & 45 deletions src/main/java/anticope/rejects/utils/accounts/AccountUtils.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package anticope.rejects.utils.accounts;

import com.mojang.authlib.exceptions.AuthenticationException;
import com.mojang.authlib.minecraft.MinecraftSessionService;
import meteordevelopment.meteorclient.MeteorClient;
import meteordevelopment.meteorclient.mixin.MinecraftClientAccessor;
import meteordevelopment.meteorclient.systems.accounts.Account;
Expand Down Expand Up @@ -37,9 +38,12 @@ public boolean fetchInfo() {
@Override
public boolean login() {
try {
Session session = CustomYggdrasilLogin.login(name, password, server);
CustomYggdrasilLogin.LocalYggdrasilAuthenticationService service = new CustomYggdrasilLogin.LocalYggdrasilAuthenticationService(((MinecraftClientAccessor) mc).getProxy(), server);
CustomYggdrasilLogin.applyYggdrasilAccount(service, session);
MinecraftSessionService sessService = new CustomYggdrasilLogin.LocalYggdrasilMinecraftSessionService(service, service.server);
applyLoginEnvironment(service, sessService);

Session session = CustomYggdrasilLogin.login(name, password, server);
setSession(session);
cache.username = session.getUsername();
cache.loadHead();
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import com.mojang.authlib.exceptions.AuthenticationException;
import com.mojang.authlib.minecraft.InsecureTextureException;
import com.mojang.authlib.minecraft.MinecraftProfileTexture;
import com.mojang.authlib.minecraft.MinecraftSessionService;
import com.mojang.authlib.properties.Property;
import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService;
import com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService;
Expand Down Expand Up @@ -56,11 +55,6 @@ public static Session login(String name, String password, String server) throws
}
}

public static void applyYggdrasilAccount(LocalYggdrasilAuthenticationService authService, Session session) {
MinecraftSessionService service = new LocalYggdrasilMinecraftSessionService(authService, authService.server);
AccountUtils.applyLoginEnvironment(authService, service, session);
}

public static class LocalYggdrasilApi implements Environment {
private final String url;

Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/meteor-rejects.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@
"GameRendererMixin",
"LivingEntityMixin",
"LivingEntityRendererMixin",
"MinecraftClientAccessor",
"MultiplayerScreenAccessor",
"MultiplayerScreenMixin",
"PlayerMoveC2SPacketAccessor",
"PlayerSkinProviderAccessor",
"ServerListAccessor",
"StructureVoidBlockMixin",
"TexturedRenderLayersMixin",
Expand Down