mirror of
https://github.com/AntiCope/meteor-rejects.git
synced 2025-09-07 05:28:05 +00:00
hotfix (#250)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package anticope.rejects.gui.hud;
|
||||
|
||||
import anticope.rejects.MeteorRejectsAddon;
|
||||
import it.unimi.dsi.fastutil.objects.Object2BooleanMap;
|
||||
import meteordevelopment.meteorclient.renderer.Renderer2D;
|
||||
import meteordevelopment.meteorclient.settings.*;
|
||||
import meteordevelopment.meteorclient.systems.hud.HudElement;
|
||||
@@ -18,6 +17,8 @@ import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import static meteordevelopment.meteorclient.MeteorClient.mc;
|
||||
|
||||
public class RadarHud extends HudElement {
|
||||
@@ -33,7 +34,7 @@ public class RadarHud extends HudElement {
|
||||
);
|
||||
|
||||
|
||||
private final Setting<Object2BooleanMap<EntityType<?>>> entities = sgGeneral.add(new EntityTypeListSetting.Builder()
|
||||
private final Setting<Set<EntityType<?>>> entities = sgGeneral.add(new EntityTypeListSetting.Builder()
|
||||
.name("entities")
|
||||
.description("Select specific entities.")
|
||||
.defaultValue(EntityType.PLAYER)
|
||||
@@ -95,7 +96,7 @@ public class RadarHud extends HudElement {
|
||||
Renderer2D.COLOR.render(null);
|
||||
if (mc.world != null) {
|
||||
for (Entity entity : mc.world.getEntities()) {
|
||||
if (!entities.get().getBoolean(entity.getType())) return;
|
||||
if (!entities.get().contains(entity.getType())) return;
|
||||
double xPos = ((entity.getX() - mc.player.getX()) * scale.get() * zoom.get() + width/2);
|
||||
double yPos = ((entity.getZ() - mc.player.getZ()) * scale.get() * zoom.get() + height/2);
|
||||
if (xPos < 0 || yPos < 0 || xPos > width - scale.get() || yPos > height - scale.get()) continue;
|
||||
|
@@ -8,7 +8,7 @@ import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
import java.net.http.HttpRequest;
|
||||
|
||||
@Mixin(Http.Request.class)
|
||||
@Mixin(value = Http.Request.class, remap = false)
|
||||
public class HttpRequestMixin {
|
||||
@Redirect(method = "<init>", at = @At(value = "INVOKE", target = "Ljava/net/http/HttpRequest$Builder;header(Ljava/lang/String;Ljava/lang/String;)Ljava/net/http/HttpRequest$Builder;"))
|
||||
private HttpRequest.Builder onAddUAHeader(HttpRequest.Builder builder, String userAgent, String value) {
|
||||
|
@@ -2,7 +2,6 @@ package anticope.rejects.modules;
|
||||
|
||||
import anticope.rejects.MeteorRejectsAddon;
|
||||
import anticope.rejects.utils.RejectsUtils;
|
||||
import it.unimi.dsi.fastutil.objects.Object2BooleanMap;
|
||||
import meteordevelopment.meteorclient.events.render.Render3DEvent;
|
||||
import meteordevelopment.meteorclient.events.world.TickEvent;
|
||||
import meteordevelopment.meteorclient.settings.*;
|
||||
@@ -21,13 +20,15 @@ import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import org.joml.Vector3d;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public class AimAssist extends Module {
|
||||
private final SettingGroup sgGeneral = settings.getDefaultGroup();
|
||||
private final SettingGroup sgSpeed = settings.createGroup("Aim Speed");
|
||||
|
||||
// General
|
||||
|
||||
private final Setting<Object2BooleanMap<EntityType<?>>> entities = sgGeneral.add(new EntityTypeListSetting.Builder()
|
||||
private final Setting<Set<EntityType<?>>> entities = sgGeneral.add(new EntityTypeListSetting.Builder()
|
||||
.name("entities")
|
||||
.description("Entities to aim at.")
|
||||
.defaultValue(EntityType.PLAYER)
|
||||
@@ -103,7 +104,7 @@ public class AimAssist extends Module {
|
||||
if (!entity.isAlive()) return false;
|
||||
if (!PlayerUtils.isWithin(entity, range.get())) return false;
|
||||
if (!ignoreWalls.get() && !PlayerUtils.canSeeEntity(entity)) return false;
|
||||
if (entity == mc.player || !entities.get().getBoolean(entity.getType())) return false;
|
||||
if (entity == mc.player || !entities.get().contains(entity.getType())) return false;
|
||||
if (entity instanceof PlayerEntity) return Friends.get().shouldAttack((PlayerEntity) entity);
|
||||
return RejectsUtils.inFov(entity, fov.get());
|
||||
}, priority.get());
|
||||
|
@@ -3,11 +3,9 @@ package anticope.rejects.modules;
|
||||
import anticope.rejects.MeteorRejectsAddon;
|
||||
import anticope.rejects.gui.screens.InteractionScreen;
|
||||
import anticope.rejects.settings.StringMapSetting;
|
||||
import it.unimi.dsi.fastutil.objects.Object2BooleanMap;
|
||||
import meteordevelopment.meteorclient.gui.utils.StarscriptTextBoxRenderer;
|
||||
import meteordevelopment.meteorclient.settings.*;
|
||||
import meteordevelopment.meteorclient.systems.modules.Module;
|
||||
import meteordevelopment.meteorclient.utils.Utils;
|
||||
import meteordevelopment.meteorclient.utils.misc.Keybind;
|
||||
import meteordevelopment.meteorclient.utils.misc.MeteorStarscript;
|
||||
import meteordevelopment.meteorclient.utils.render.color.SettingColor;
|
||||
@@ -20,17 +18,17 @@ import net.minecraft.entity.LivingEntity;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
public class InteractionMenu extends Module {
|
||||
|
||||
private final SettingGroup sgGeneral = settings.getDefaultGroup();
|
||||
private final SettingGroup sgStyle = settings.createGroup("Style");
|
||||
|
||||
private final Setting<Object2BooleanMap<EntityType<?>>> entities = sgGeneral.add(new EntityTypeListSetting.Builder()
|
||||
private final Setting<Set<EntityType<?>>> entities = sgGeneral.add(new EntityTypeListSetting.Builder()
|
||||
.name("entities")
|
||||
.description("Entities")
|
||||
.defaultValue(Utils.asO2BMap(
|
||||
EntityType.PLAYER))
|
||||
.defaultValue(EntityType.PLAYER)
|
||||
.build()
|
||||
);
|
||||
public final Setting<Keybind> keybind = sgGeneral.add(new KeybindSetting.Builder()
|
||||
@@ -103,7 +101,7 @@ public class InteractionMenu extends Module {
|
||||
}
|
||||
|
||||
if (e == null) return;
|
||||
if (entities.get().getBoolean(e.getType())) {
|
||||
if (entities.get().contains(e.getType())) {
|
||||
mc.setScreen(new InteractionScreen(e, this));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user