Fix Mixin Crash (#215)
This commit is contained in:
@@ -9,7 +9,7 @@ import org.spongepowered.asm.mixin.injection.ModifyVariable;
|
|||||||
|
|
||||||
@Mixin(TexturedRenderLayers.class)
|
@Mixin(TexturedRenderLayers.class)
|
||||||
public class TexturedRenderLayersMixin {
|
public class TexturedRenderLayersMixin {
|
||||||
@ModifyVariable(method = "getChestTexture(Lnet/minecraft/block/entity/BlockEntity;Lnet/minecraft/block/enums/ChestType;Z)Lnet/minecraft/client/util/SpriteIdentifier;", at = @At("LOAD"), name = "christmas")
|
@ModifyVariable(method = "getChestTexture(Lnet/minecraft/block/entity/BlockEntity;Lnet/minecraft/block/enums/ChestType;Z)Lnet/minecraft/client/util/SpriteIdentifier;", at = @At("LOAD"), ordinal = 0)
|
||||||
private static boolean chrsitmas(boolean christmas) {
|
private static boolean chrsitmas(boolean christmas) {
|
||||||
Rendering rendering = Modules.get().get(Rendering.class);
|
Rendering rendering = Modules.get().get(Rendering.class);
|
||||||
if (rendering != null && rendering.chistmas())
|
if (rendering != null && rendering.chistmas())
|
||||||
|
|||||||
@@ -1,8 +1,3 @@
|
|||||||
/*
|
|
||||||
* This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client).
|
|
||||||
* Copyright (c) Meteor Development.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package anticope.rejects.modules;
|
package anticope.rejects.modules;
|
||||||
|
|
||||||
import anticope.rejects.MeteorRejectsAddon;
|
import anticope.rejects.MeteorRejectsAddon;
|
||||||
|
|||||||
@@ -1,8 +1,3 @@
|
|||||||
/*
|
|
||||||
* This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client).
|
|
||||||
* Copyright (c) Meteor Development.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package anticope.rejects.modules;
|
package anticope.rejects.modules;
|
||||||
|
|
||||||
import anticope.rejects.MeteorRejectsAddon;
|
import anticope.rejects.MeteorRejectsAddon;
|
||||||
@@ -63,7 +58,7 @@ public class AutoLogin extends Module {
|
|||||||
|
|
||||||
public AutoLogin() {
|
public AutoLogin() {
|
||||||
super(MeteorRejectsAddon.CATEGORY, "auto-login", "Runs command when joining specified server.");
|
super(MeteorRejectsAddon.CATEGORY, "auto-login", "Runs command when joining specified server.");
|
||||||
MeteorClient.EVENT_BUS.subscribe(new Listener());
|
runInMainMenu = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -79,19 +74,17 @@ public class AutoLogin extends Module {
|
|||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
|
||||||
private class Listener {
|
@EventHandler
|
||||||
@EventHandler
|
private void onGameJoined(GameJoinedEvent event) {
|
||||||
private void onGameJoined(GameJoinedEvent event) {
|
if (!isActive()) return;
|
||||||
if (!isActive()) return;
|
String command = commands.get().getOrDefault("*", commands.get().get(Utils.getWorldName()));
|
||||||
String command = commands.get().getOrDefault("*", commands.get().get(Utils.getWorldName()));
|
if (command != null) {
|
||||||
if (command != null) {
|
timer.schedule(new TimerTask() {
|
||||||
timer.schedule(new TimerTask() {
|
@Override
|
||||||
@Override
|
public void run() {
|
||||||
public void run() {
|
if (mc.player != null) ChatUtils.sendPlayerMsg(command);
|
||||||
if (mc.player != null) ChatUtils.sendPlayerMsg(command);
|
}
|
||||||
}
|
}, delay.get());
|
||||||
}, delay.get());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,3 @@
|
|||||||
/*
|
|
||||||
* This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client).
|
|
||||||
* Copyright (c) Meteor Development.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package anticope.rejects.settings;
|
package anticope.rejects.settings;
|
||||||
|
|
||||||
import meteordevelopment.meteorclient.settings.IVisible;
|
import meteordevelopment.meteorclient.settings.IVisible;
|
||||||
|
|||||||
@@ -1,8 +1,3 @@
|
|||||||
/*
|
|
||||||
* This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client).
|
|
||||||
* Copyright (c) Meteor Development.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package anticope.rejects.settings;
|
package anticope.rejects.settings;
|
||||||
|
|
||||||
import meteordevelopment.meteorclient.gui.GuiTheme;
|
import meteordevelopment.meteorclient.gui.GuiTheme;
|
||||||
|
|||||||
Reference in New Issue
Block a user