Fix Tokyo Client Crash (#283)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package anticope.rejects.utils;
|
||||
|
||||
import anticope.rejects.MeteorRejectsAddon;
|
||||
import anticope.rejects.utils.seeds.Seeds;
|
||||
import meteordevelopment.meteorclient.MeteorClient;
|
||||
import meteordevelopment.meteorclient.events.entity.player.PlayerMoveEvent;
|
||||
@@ -17,7 +18,6 @@ import java.util.Random;
|
||||
import static meteordevelopment.meteorclient.MeteorClient.mc;
|
||||
|
||||
public class RejectsUtils {
|
||||
|
||||
@PostInit
|
||||
public static void init() {
|
||||
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
|
||||
@@ -29,7 +29,12 @@ public class RejectsUtils {
|
||||
|
||||
public static String getModuleName(String name) {
|
||||
int dupe = 0;
|
||||
for (Module module : Modules.get().getAll()) {
|
||||
Modules modules = Modules.get();
|
||||
if (modules == null) {
|
||||
MeteorRejectsAddon.LOG.warn("Module instantiation before Modules initialized.");
|
||||
return name;
|
||||
}
|
||||
for (Module module : modules.getAll()) {
|
||||
if (module.name.equals(name)) {
|
||||
dupe++;
|
||||
break;
|
||||
@@ -58,7 +63,7 @@ public class RejectsUtils {
|
||||
return angleDistance <= fov;
|
||||
}
|
||||
|
||||
public static float fullFlightMove(PlayerMoveEvent event, double speed, boolean verticalSpeedMatch){
|
||||
public static float fullFlightMove(PlayerMoveEvent event, double speed, boolean verticalSpeedMatch) {
|
||||
if (PlayerUtils.isMoving()) {
|
||||
double dir = getDir();
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package anticope.rejects.utils.accounts;
|
||||
|
||||
import anticope.rejects.MeteorRejectsAddon;
|
||||
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;
|
||||
import meteordevelopment.meteorclient.systems.accounts.AccountType;
|
||||
@@ -49,8 +49,8 @@ public class CustomYggdrasilAccount extends Account<CustomYggdrasilAccount> {
|
||||
return true;
|
||||
} catch (AuthenticationException e) {
|
||||
if (e.getMessage().contains("Invalid username or password") || e.getMessage().contains("account migrated"))
|
||||
MeteorClient.LOG.error("Wrong password.");
|
||||
else MeteorClient.LOG.error("Failed to contact the authentication server.");
|
||||
MeteorRejectsAddon.LOG.error("Wrong password.");
|
||||
else MeteorRejectsAddon.LOG.error("Failed to contact the authentication server.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user