Merge pull request #3 from StormyBytes/reogranize-modules
Reorganized Modules
This commit is contained in:
@@ -59,14 +59,12 @@ public class AntiBot extends Module {
|
||||
.build()
|
||||
);
|
||||
|
||||
public AntiBot()
|
||||
{
|
||||
public AntiBot() {
|
||||
super(MeteorRejectsAddon.CATEGORY, "anti-bot", "Detects and removes bots.");
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onTick(TickEvent.Post tickEvent)
|
||||
{
|
||||
public void onTick(TickEvent.Post tickEvent) {
|
||||
for (Entity entity : mc.world.getEntities())
|
||||
{
|
||||
if (removeInvisible.get() && !entity.isInvisible()) continue;
|
||||
@@ -75,8 +73,7 @@ public class AntiBot extends Module {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isBot(Entity entity)
|
||||
{
|
||||
private boolean isBot(Entity entity) {
|
||||
if (entity == null) return false;
|
||||
if (!(entity instanceof PlayerEntity)) return false;
|
||||
|
||||
@@ -93,7 +90,6 @@ public class AntiBot extends Module {
|
||||
if (nullException.get()) return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,8 +50,6 @@ public class AntiSpawnpoint extends Module {
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
if((BlockIsBed && IsOverWorld)||(BlockIsAnchor && IsNetherWorld)) {
|
||||
event.cancel();
|
||||
}
|
||||
|
||||
@@ -22,9 +22,14 @@ import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
|
||||
public class AntiVanish extends Module {
|
||||
|
||||
private final Queue<UUID> toLookup = new ConcurrentLinkedQueue<UUID>();
|
||||
private long lastTick = 0;
|
||||
|
||||
public AntiVanish() {
|
||||
super(MeteorRejectsAddon.CATEGORY, "anti-vanish", "Notifies user when a admin uses /vanish");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivate() {
|
||||
toLookup.clear();
|
||||
@@ -78,10 +83,6 @@ public class AntiVanish extends Module {
|
||||
}
|
||||
}
|
||||
|
||||
public AntiVanish() {
|
||||
super(MeteorRejectsAddon.CATEGORY, "anti-vanish", "Notifies user when a admin uses /vanish");
|
||||
}
|
||||
|
||||
public static class NameLookup implements Runnable {
|
||||
private final String uuidstr;
|
||||
private final UUID uuid;
|
||||
|
||||
@@ -41,10 +41,6 @@ public class Auto32K extends Module {
|
||||
Dispenser
|
||||
}
|
||||
|
||||
public Auto32K(){
|
||||
super(MeteorRejectsAddon.CATEGORY, "auto-32k", "Automatically attacks other players with a 32k weapon.");
|
||||
}
|
||||
|
||||
private final SettingGroup sgGeneral = settings.getDefaultGroup();
|
||||
|
||||
private final Setting<Mode> mode = sgGeneral.add(new EnumSetting.Builder<Mode>()
|
||||
@@ -89,6 +85,10 @@ public class Auto32K extends Module {
|
||||
private int phase = 0;
|
||||
private BlockPos bestBlock;
|
||||
|
||||
public Auto32K(){
|
||||
super(MeteorRejectsAddon.CATEGORY, "auto-32k", "Automatically attacks other players with a 32k weapon.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivate() {
|
||||
phase = 0;
|
||||
|
||||
@@ -26,17 +26,6 @@ public class AutoBedTrap extends Module {
|
||||
|
||||
private final SettingGroup sgGeneral = settings.getDefaultGroup();
|
||||
|
||||
BlockPos bed1;
|
||||
Direction bed2direction;
|
||||
BlockPos bed2;
|
||||
int cap = 0;
|
||||
boolean bed;
|
||||
|
||||
public AutoBedTrap() {
|
||||
super(MeteorRejectsAddon.CATEGORY, "auto-bed-trap", "Automatically places obsidian around bed");
|
||||
}
|
||||
|
||||
|
||||
private final Setting<Integer> bpt = sgGeneral.add(new IntSetting.Builder()
|
||||
.name("blocks-per-tick")
|
||||
.description("How many blocks to place per tick")
|
||||
@@ -53,6 +42,15 @@ public class AutoBedTrap extends Module {
|
||||
.build()
|
||||
);
|
||||
|
||||
BlockPos bed1;
|
||||
Direction bed2direction;
|
||||
BlockPos bed2;
|
||||
int cap = 0;
|
||||
boolean bed;
|
||||
|
||||
public AutoBedTrap() {
|
||||
super(MeteorRejectsAddon.CATEGORY, "auto-bed-trap", "Automatically places obsidian around bed");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivate() {
|
||||
|
||||
@@ -26,12 +26,6 @@ import net.minecraft.util.registry.Registry;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
public class AutoExtinguish extends Module {
|
||||
private static final StatusEffect FIRE_RESISTANCE = Registry.STATUS_EFFECT.get(new Identifier("fire_resistance"));
|
||||
|
||||
public AutoExtinguish() {
|
||||
super(MeteorRejectsAddon.CATEGORY, "auto-extinguish", "Automatically extinguishes fire around you");
|
||||
}
|
||||
|
||||
private final SettingGroup sgGeneral = settings.createGroup("Extinguish Fire around you");
|
||||
private final SettingGroup sgBucket = settings.createGroup("Extinguish yourself");
|
||||
|
||||
@@ -85,11 +79,15 @@ public class AutoExtinguish extends Module {
|
||||
.build()
|
||||
);
|
||||
|
||||
|
||||
private boolean hasPlacedWater = false;
|
||||
private BlockPos blockPos = null;
|
||||
private boolean doesWaterBucketWork = true;
|
||||
|
||||
private static final StatusEffect FIRE_RESISTANCE = Registry.STATUS_EFFECT.get(new Identifier("fire_resistance"));
|
||||
|
||||
public AutoExtinguish() {
|
||||
super(MeteorRejectsAddon.CATEGORY, "auto-extinguish", "Automatically extinguishes fire around you");
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
private void onTick(TickEvent.Pre event) {
|
||||
|
||||
@@ -18,9 +18,21 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
public class AutoHighway extends Module {
|
||||
private enum Direction {
|
||||
SOUTH,
|
||||
SOUTH_WEST,
|
||||
WEST,
|
||||
WEST_NORTH,
|
||||
NORTH,
|
||||
NORTH_EAST,
|
||||
EAST,
|
||||
EAST_SOUTH
|
||||
}
|
||||
|
||||
private final SettingGroup sgGeneral = settings.getDefaultGroup();
|
||||
|
||||
private final Setting<Boolean> disableOnJump = sgGeneral.add(new BoolSetting.Builder()
|
||||
@@ -48,25 +60,11 @@ public class AutoHighway extends Module {
|
||||
.build()
|
||||
);
|
||||
|
||||
private enum Direction {
|
||||
SOUTH,
|
||||
SOUTH_WEST,
|
||||
WEST,
|
||||
WEST_NORTH,
|
||||
NORTH,
|
||||
NORTH_EAST,
|
||||
EAST,
|
||||
EAST_SOUTH
|
||||
}
|
||||
private Direction direction;
|
||||
private final BlockPos.Mutable blockPos = new BlockPos.Mutable();
|
||||
private boolean return_;
|
||||
private int highwaySize;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public AutoHighway() {
|
||||
super(MeteorRejectsAddon.CATEGORY, "auto-highway", "Automatically build highway.");
|
||||
}
|
||||
|
||||
@@ -25,21 +25,12 @@ import minegame159.meteorclient.utils.render.color.Color;
|
||||
|
||||
public class Confuse extends Module {
|
||||
|
||||
int delayWaited = 0;
|
||||
double circleProgress = 0;
|
||||
double addition = 0.0;
|
||||
Entity target = null;
|
||||
|
||||
public enum Mode {
|
||||
RandomTP,
|
||||
Switch,
|
||||
Circle
|
||||
}
|
||||
|
||||
public Confuse() {
|
||||
super(MeteorRejectsAddon.CATEGORY, "confuse", "Makes your enemies shit themselves");
|
||||
}
|
||||
|
||||
private final SettingGroup sgGeneral = settings.getDefaultGroup();
|
||||
|
||||
private final Setting<Mode> mode = sgGeneral.add(new EnumSetting.Builder<Mode>()
|
||||
@@ -75,6 +66,15 @@ public class Confuse extends Module {
|
||||
.build()
|
||||
);
|
||||
|
||||
int delayWaited = 0;
|
||||
double circleProgress = 0;
|
||||
double addition = 0.0;
|
||||
Entity target = null;
|
||||
|
||||
public Confuse() {
|
||||
super(MeteorRejectsAddon.CATEGORY, "confuse", "Makes your enemies shit themselves");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivate() {
|
||||
delayWaited = 0;
|
||||
|
||||
@@ -22,10 +22,6 @@ public class Glide extends Module {
|
||||
|
||||
private final SettingGroup sgGeneral = settings.getDefaultGroup();
|
||||
|
||||
public Glide() {
|
||||
super(MeteorRejectsAddon.CATEGORY, "glide", "Makes you glide down slowly when falling.");
|
||||
}
|
||||
|
||||
private final Setting<Double> fallSpeed = sgGeneral.add(new DoubleSetting.Builder()
|
||||
.name("fall-speed")
|
||||
.description("Fall Speed")
|
||||
@@ -53,57 +49,61 @@ public class Glide extends Module {
|
||||
.build()
|
||||
);
|
||||
|
||||
public Glide() {
|
||||
super(MeteorRejectsAddon.CATEGORY, "glide", "Makes you glide down slowly when falling.");
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
private void onTick(TickEvent.Pre event) {
|
||||
Vec3d v = mc.player.getVelocity();
|
||||
Vec3d v = mc.player.getVelocity();
|
||||
|
||||
if(mc.player.isOnGround() || mc.player.isTouchingWater() || mc.player.isInLava()
|
||||
|| mc.player.isClimbing() || v.y >= 0)
|
||||
return;
|
||||
if(mc.player.isOnGround() || mc.player.isTouchingWater() || mc.player.isInLava()
|
||||
|| mc.player.isClimbing() || v.y >= 0)
|
||||
return;
|
||||
|
||||
if(minHeight.get() > 0)
|
||||
{
|
||||
Box box = mc.player.getBoundingBox();
|
||||
box = box.union(box.offset(0, -minHeight.get(), 0));
|
||||
if(!mc.world.isSpaceEmpty(box))
|
||||
return;
|
||||
if(minHeight.get() > 0)
|
||||
{
|
||||
Box box = mc.player.getBoundingBox();
|
||||
box = box.union(box.offset(0, -minHeight.get(), 0));
|
||||
if(!mc.world.isSpaceEmpty(box))
|
||||
return;
|
||||
|
||||
BlockPos min =
|
||||
new BlockPos(new Vec3d(box.minX, box.minY, box.minZ));
|
||||
BlockPos max =
|
||||
new BlockPos(new Vec3d(box.maxX, box.maxY, box.maxZ));
|
||||
BlockPos min =
|
||||
new BlockPos(new Vec3d(box.minX, box.minY, box.minZ));
|
||||
BlockPos max =
|
||||
new BlockPos(new Vec3d(box.maxX, box.maxY, box.maxZ));
|
||||
Stream<BlockPos> stream = StreamSupport
|
||||
.stream(getAllInBox(min, max).spliterator(), true);
|
||||
.stream(getAllInBox(min, max).spliterator(), true);
|
||||
|
||||
// manual collision check, since liquids don't have bounding boxes
|
||||
if(stream.map(this::getState).map(BlockState::getMaterial)
|
||||
.anyMatch(Material::isLiquid))
|
||||
return;
|
||||
}
|
||||
// manual collision check, since liquids don't have bounding boxes
|
||||
if(stream.map(this::getState).map(BlockState::getMaterial)
|
||||
.anyMatch(Material::isLiquid))
|
||||
return;
|
||||
}
|
||||
|
||||
mc.player.setVelocity(v.x, Math.max(v.y, -fallSpeed.get()), v.z);
|
||||
mc.player.flyingSpeed *= moveSpeed.get();
|
||||
mc.player.setVelocity(v.x, Math.max(v.y, -fallSpeed.get()), v.z);
|
||||
mc.player.flyingSpeed *= moveSpeed.get();
|
||||
}
|
||||
|
||||
public static ArrayList<BlockPos> getAllInBox(BlockPos from, BlockPos to)
|
||||
{
|
||||
ArrayList<BlockPos> blocks = new ArrayList<>();
|
||||
{
|
||||
ArrayList<BlockPos> blocks = new ArrayList<>();
|
||||
|
||||
BlockPos min = new BlockPos(Math.min(from.getX(), to.getX()),
|
||||
Math.min(from.getY(), to.getY()), Math.min(from.getZ(), to.getZ()));
|
||||
BlockPos max = new BlockPos(Math.max(from.getX(), to.getX()),
|
||||
Math.max(from.getY(), to.getY()), Math.max(from.getZ(), to.getZ()));
|
||||
BlockPos min = new BlockPos(Math.min(from.getX(), to.getX()),
|
||||
Math.min(from.getY(), to.getY()), Math.min(from.getZ(), to.getZ()));
|
||||
BlockPos max = new BlockPos(Math.max(from.getX(), to.getX()),
|
||||
Math.max(from.getY(), to.getY()), Math.max(from.getZ(), to.getZ()));
|
||||
|
||||
for(int x = min.getX(); x <= max.getX(); x++)
|
||||
for(int y = min.getY(); y <= max.getY(); y++)
|
||||
for(int z = min.getZ(); z <= max.getZ(); z++)
|
||||
blocks.add(new BlockPos(x, y, z));
|
||||
for(int x = min.getX(); x <= max.getX(); x++)
|
||||
for(int y = min.getY(); y <= max.getY(); y++)
|
||||
for(int z = min.getZ(); z <= max.getZ(); z++)
|
||||
blocks.add(new BlockPos(x, y, z));
|
||||
|
||||
return blocks;
|
||||
}
|
||||
return blocks;
|
||||
}
|
||||
|
||||
public BlockState getState(BlockPos pos)
|
||||
{
|
||||
return mc.world.getBlockState(pos);
|
||||
}
|
||||
{
|
||||
return mc.world.getBlockState(pos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,9 +23,8 @@ import java.util.HashMap;
|
||||
import java.util.Optional;
|
||||
|
||||
public class InteractionMenu extends Module {
|
||||
|
||||
private final SettingGroup sgGeneral = settings.getDefaultGroup();
|
||||
public final HashMap<String,String> messages = new HashMap<>();
|
||||
private String currMsgK = "", currMsgV = "";
|
||||
|
||||
private final Setting<Object2BooleanMap<EntityType<?>>> entities = sgGeneral.add(new EntityTypeListSetting.Builder()
|
||||
.name("entities")
|
||||
@@ -41,6 +40,8 @@ public class InteractionMenu extends Module {
|
||||
.build()
|
||||
);
|
||||
|
||||
public final HashMap<String,String> messages = new HashMap<>();
|
||||
private String currMsgK = "", currMsgV = "";
|
||||
|
||||
public InteractionMenu() {
|
||||
super(MeteorRejectsAddon.CATEGORY,"interaction-menu","An interaction screen when looking at an entity.");
|
||||
|
||||
@@ -35,11 +35,6 @@ public class Lavacast extends Module {
|
||||
WaterUp
|
||||
}
|
||||
|
||||
private int dist;
|
||||
private BlockPos placeFluidPos;
|
||||
private int tick;
|
||||
private Stage stage = Stage.None;
|
||||
|
||||
private final SettingGroup sgGeneral = settings.getDefaultGroup();
|
||||
private final SettingGroup sgShape = settings.createGroup("Shape", false);
|
||||
private final Setting<Integer> tickInterval = sgGeneral.add(new IntSetting.Builder()
|
||||
@@ -92,6 +87,11 @@ public class Lavacast extends Module {
|
||||
.build()
|
||||
);
|
||||
|
||||
private int dist;
|
||||
private BlockPos placeFluidPos;
|
||||
private int tick;
|
||||
private Stage stage = Stage.None;
|
||||
|
||||
public Lavacast() {
|
||||
super(MeteorRejectsAddon.CATEGORY, "lavacast", "Automatically Lavacasts");
|
||||
}
|
||||
|
||||
@@ -20,14 +20,6 @@ import java.util.*;
|
||||
|
||||
public class NewChunks extends Module {
|
||||
|
||||
private Set<ChunkPos> newChunks = Collections.synchronizedSet(new HashSet<>());
|
||||
private Set<ChunkPos> oldChunks = Collections.synchronizedSet(new HashSet<>());
|
||||
private static final Direction[] searchDirs = new Direction[] { Direction.EAST, Direction.NORTH, Direction.WEST, Direction.SOUTH, Direction.UP };
|
||||
|
||||
public NewChunks() {
|
||||
super(MeteorRejectsAddon.CATEGORY,"new-chunks", "Detects completely new chunks using certain traits of them");
|
||||
}
|
||||
|
||||
private final SettingGroup sgGeneral = settings.getDefaultGroup();
|
||||
|
||||
private final Setting<Boolean> remove = sgGeneral.add(new BoolSetting.Builder()
|
||||
@@ -51,6 +43,14 @@ public class NewChunks extends Module {
|
||||
.build()
|
||||
);
|
||||
|
||||
private Set<ChunkPos> newChunks = Collections.synchronizedSet(new HashSet<>());
|
||||
private Set<ChunkPos> oldChunks = Collections.synchronizedSet(new HashSet<>());
|
||||
private static final Direction[] searchDirs = new Direction[] { Direction.EAST, Direction.NORTH, Direction.WEST, Direction.SOUTH, Direction.UP };
|
||||
|
||||
public NewChunks() {
|
||||
super(MeteorRejectsAddon.CATEGORY,"new-chunks", "Detects completely new chunks using certain traits of them");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivate() {
|
||||
if (remove.get()) {
|
||||
|
||||
@@ -20,13 +20,12 @@ import java.util.Optional;
|
||||
|
||||
public class ObsidianFarm extends Module {
|
||||
|
||||
private boolean allowBreakAgain;
|
||||
|
||||
public ObsidianFarm() {
|
||||
super(MeteorRejectsAddon.CATEGORY, "obsidian-farm", "Auto obsidian farm(portals).");
|
||||
}
|
||||
|
||||
|
||||
private boolean allowBreakAgain;
|
||||
|
||||
@Override
|
||||
public void onActivate() {
|
||||
allowBreakAgain = true;
|
||||
|
||||
@@ -45,12 +45,6 @@ public class Rendering extends Module {
|
||||
private final SettingGroup sgInvisible = settings.createGroup("Invisible");
|
||||
private final SettingGroup sgFun = settings.createGroup("Fun");
|
||||
|
||||
private ShaderEffect shader = null;
|
||||
|
||||
public Rendering() {
|
||||
super(MeteorRejectsAddon.CATEGORY, "Rendering", "Various Render Tweaks");
|
||||
}
|
||||
|
||||
private final Setting<Boolean> entities = sgInvisible.add(new BoolSetting.Builder()
|
||||
.name("entities")
|
||||
.description("Render invisible entities.")
|
||||
@@ -92,6 +86,12 @@ public class Rendering extends Module {
|
||||
.build()
|
||||
);
|
||||
|
||||
private ShaderEffect shader = null;
|
||||
|
||||
public Rendering() {
|
||||
super(MeteorRejectsAddon.CATEGORY, "Rendering", "Various Render Tweaks");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivate() {
|
||||
mc.worldRenderer.reload();
|
||||
|
||||
Reference in New Issue
Block a user