Its in meteor now

This commit is contained in:
Cloudburst
2021-03-22 08:42:47 +01:00
parent 47c1c2a80b
commit b8b1b71cce
2 changed files with 0 additions and 51 deletions

View File

@@ -17,7 +17,6 @@ public class MeteorRejectsAddon extends MeteorAddon {
public void onInitialize() { public void onInitialize() {
LOG.info("Initializing Meteor Rejects Addon"); LOG.info("Initializing Meteor Rejects Addon");
Modules.get().add(new AntiBot());
Modules.get().add(new AutoMountBypassDupe()); Modules.get().add(new AutoMountBypassDupe());
Modules.get().add(new AutoPot()); Modules.get().add(new AutoPot());
Modules.get().add(new RenderInvisible()); Modules.get().add(new RenderInvisible());

View File

@@ -1,50 +0,0 @@
package cloudburst.rejects.modules;
import meteordevelopment.orbit.EventHandler;
import minegame159.meteorclient.events.world.TickEvent;
import minegame159.meteorclient.modules.Categories;
import minegame159.meteorclient.modules.Module;
import minegame159.meteorclient.settings.BoolSetting;
import minegame159.meteorclient.settings.Setting;
import minegame159.meteorclient.settings.SettingGroup;
import minegame159.meteorclient.utils.entity.EntityUtils;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity;
public class AntiBot extends Module {
private final SettingGroup sgGeneral = settings.getDefaultGroup();
private final Setting<Boolean> removeInvisible = sgGeneral.add(new BoolSetting.Builder()
.name("remove-invisible")
.description("Removes bot only if they are invisible.")
.defaultValue(true)
.build()
);
public AntiBot()
{
super(Categories.Render, "anti-bot", "Detects and removes bots.");
}
@EventHandler
public void onTick(TickEvent.Post tickEvent)
{
for (Entity entity : mc.world.getEntities())
{
if (removeInvisible.get() && !entity.isInvisible()) continue;
if (isBot(entity)) entity.remove();
}
}
private boolean isBot(Entity entity)
{
if (entity == null) return false;
if (!(entity instanceof PlayerEntity)) return false;
// Gamemode check
return EntityUtils.getGameMode(((PlayerEntity)entity)) == null; // Assume bot if invalid gamemode
}
}