Re-added AimAssist (#246)
This commit is contained in:
@@ -3,7 +3,7 @@ package anticope.rejects.mixin.meteor;
|
||||
import anticope.rejects.utils.accounts.AddCustomYggdrasilAccountScreen;
|
||||
import meteordevelopment.meteorclient.gui.GuiTheme;
|
||||
import meteordevelopment.meteorclient.gui.WindowScreen;
|
||||
import meteordevelopment.meteorclient.gui.screens.AccountsScreen;
|
||||
import meteordevelopment.meteorclient.gui.screens.accounts.AccountsScreen;
|
||||
import meteordevelopment.meteorclient.gui.widgets.WWidget;
|
||||
import meteordevelopment.meteorclient.gui.widgets.containers.WContainer;
|
||||
import meteordevelopment.meteorclient.gui.widgets.containers.WHorizontalList;
|
||||
@@ -25,7 +25,7 @@ public abstract class AccountsScreenMixin extends WindowScreen {
|
||||
@Shadow
|
||||
protected abstract void addButton(WContainer c, String text, Runnable action);
|
||||
|
||||
@Inject(method = "initWidgets", at = @At(value = "INVOKE", target = "Lmeteordevelopment/meteorclient/gui/screens/AccountsScreen;addButton(Lmeteordevelopment/meteorclient/gui/widgets/containers/WContainer;Ljava/lang/String;Ljava/lang/Runnable;)V", ordinal = 0), locals = LocalCapture.CAPTURE_FAILHARD)
|
||||
@Inject(method = "initWidgets", at = @At(value = "INVOKE", target = "Lmeteordevelopment/meteorclient/gui/screens/accounts/AccountsScreen;addButton(Lmeteordevelopment/meteorclient/gui/widgets/containers/WContainer;Ljava/lang/String;Ljava/lang/Runnable;)V", ordinal = 0), locals = LocalCapture.CAPTURE_FAILHARD)
|
||||
private void afterAddCrackedButton(CallbackInfo info, WHorizontalList l) {
|
||||
addButton(l, "Yggdrasil", () -> mc.setScreen(new AddCustomYggdrasilAccountScreen(theme, (AccountsScreen) (Object) this)));
|
||||
}
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
package anticope.rejects.mixin.meteor.modules;
|
||||
|
||||
import anticope.rejects.utils.RejectsUtils;
|
||||
import meteordevelopment.meteorclient.settings.DoubleSetting;
|
||||
import meteordevelopment.meteorclient.settings.Setting;
|
||||
import meteordevelopment.meteorclient.settings.SettingGroup;
|
||||
import meteordevelopment.meteorclient.systems.modules.combat.AimAssist;
|
||||
import net.minecraft.entity.Entity;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
@Mixin(value = AimAssist.class, remap = false)
|
||||
public class AimAssistMixin {
|
||||
@Shadow @Final private SettingGroup sgGeneral;
|
||||
|
||||
private Setting<Double> fov;
|
||||
|
||||
@Inject(method = "<init>", at = @At("TAIL"))
|
||||
private void onInit(CallbackInfo info) {
|
||||
fov = sgGeneral.add(new DoubleSetting.Builder()
|
||||
.name("fov")
|
||||
.description("Will only aim entities in the fov.")
|
||||
.defaultValue(360)
|
||||
.min(0)
|
||||
.max(360)
|
||||
.build()
|
||||
);
|
||||
}
|
||||
|
||||
@Inject(method = "lambda$onTick$1", at = @At(value = "RETURN", ordinal = 5), cancellable = true)
|
||||
private void onCheckEntity(Entity entity, CallbackInfoReturnable<Boolean> info) {
|
||||
info.setReturnValue(RejectsUtils.inFov(entity, fov.get()));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user