Invisible filter for ka (#219)
This commit is contained in:
@@ -90,7 +90,7 @@ public class HeadScreen extends WindowScreen {
|
||||
try {
|
||||
GiveUtils.giveItem(head);
|
||||
} catch (CommandSyntaxException e) {
|
||||
ChatUtils.error("Heads", e.getMessage());
|
||||
ChatUtils.errorPrefix("Heads", e.getMessage());
|
||||
}
|
||||
};
|
||||
WButton equip = t.add(theme.button("Equip")).widget();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package anticope.rejects.mixin.meteor.modules;
|
||||
|
||||
import anticope.rejects.utils.RejectsUtils;
|
||||
import meteordevelopment.meteorclient.settings.BoolSetting;
|
||||
import meteordevelopment.meteorclient.settings.DoubleSetting;
|
||||
import meteordevelopment.meteorclient.settings.Setting;
|
||||
import meteordevelopment.meteorclient.settings.SettingGroup;
|
||||
@@ -20,7 +21,12 @@ public class KillAuraMixin {
|
||||
@Final
|
||||
private SettingGroup sgGeneral;
|
||||
|
||||
@Shadow
|
||||
@Final
|
||||
private SettingGroup sgTargeting;
|
||||
|
||||
private Setting<Double> fov;
|
||||
private Setting<Boolean> ignoreInvisible;
|
||||
|
||||
@Inject(method = "<init>", at = @At("TAIL"))
|
||||
private void onInit(CallbackInfo info) {
|
||||
@@ -32,10 +38,19 @@ public class KillAuraMixin {
|
||||
.max(360)
|
||||
.build()
|
||||
);
|
||||
|
||||
ignoreInvisible = sgTargeting.add(new BoolSetting.Builder()
|
||||
.name("ignore-invisible")
|
||||
.description("Whether or not to attack invisible entities.")
|
||||
.defaultValue(false)
|
||||
.build()
|
||||
);
|
||||
}
|
||||
|
||||
@Inject(method = "entityCheck", at = @At(value = "RETURN", ordinal = 14), cancellable = true)
|
||||
private void onReturn(Entity entity, CallbackInfoReturnable<Boolean> info) {
|
||||
info.setReturnValue(info.getReturnValueZ() && RejectsUtils.inFov(entity, fov.get()));
|
||||
if (ignoreInvisible.get() && entity.isInvisible()) info.setReturnValue(false);
|
||||
if (!RejectsUtils.inFov(entity, fov.get())) info.setReturnValue(false);
|
||||
info.setReturnValue(info.getReturnValueZ());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ public class RejectsUtils {
|
||||
}
|
||||
|
||||
public static boolean inFov(Entity entity, double fov) {
|
||||
if (fov >= 360) return true;
|
||||
float[] angle = PlayerUtils.calculateAngle(entity.getBoundingBox().getCenter());
|
||||
double xDist = MathHelper.angleBetween(angle[0], mc.player.getYaw());
|
||||
double yDist = MathHelper.angleBetween(angle[1], mc.player.getPitch());
|
||||
|
||||
@@ -8,6 +8,6 @@ public class SeedCrackerEP implements SeedCrackerAPI {
|
||||
@Override
|
||||
public void pushWorldSeed(long seed) {
|
||||
Seeds.get().setSeed(String.format("%d", seed));
|
||||
ChatUtils.info("Seed", "Added seed from SeedCrackerX");
|
||||
ChatUtils.infoPrefix("Seed", "Added seed from SeedCrackerX");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ public class WorldGenUtils {
|
||||
blocks,64,10,32);
|
||||
if (posList.isEmpty()) return null;
|
||||
if (posList.size() < 5) {
|
||||
ChatUtils.warning("Locate", "Only %d block(s) found. This search might be a false positive.", posList.size());
|
||||
ChatUtils.warningPrefix("Locate", "Only %d block(s) found. This search might be a false positive.", posList.size());
|
||||
}
|
||||
return posList.get(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user