hotfix (#250)
This commit is contained in:
@@ -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