RoboWalk from the closed pr (#226)
This commit is contained in:
@@ -73,6 +73,7 @@ public class MeteorRejectsAddon extends MeteorAddon {
|
||||
modules.add(new PacketFly());
|
||||
modules.add(new Painter());
|
||||
modules.add(new Rendering());
|
||||
modules.add(new RoboWalk());
|
||||
modules.add(new ShieldBypass());
|
||||
modules.add(new SilentDisconnect());
|
||||
modules.add(new SkeletonESP());
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.util.Iterator;
|
||||
|
||||
import anticope.rejects.MeteorRejectsAddon;
|
||||
import meteordevelopment.meteorclient.systems.hud.HudElementInfo;
|
||||
import meteordevelopment.meteorclient.utils.render.color.Color;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
@@ -108,17 +109,17 @@ public class RadarHud extends HudElement {
|
||||
String icon = "*";
|
||||
if (letters.get())
|
||||
icon = entity.getType().getUntranslatedName().substring(0,1).toUpperCase();
|
||||
renderer.text(icon, xPos + x, yPos + y, esp.getColor(entity), false);
|
||||
Color c = esp.getColor(entity);
|
||||
if (c == null) c = Color.WHITE;
|
||||
renderer.text(icon, xPos + x, yPos + y, c, false);
|
||||
}
|
||||
}
|
||||
if (showWaypoints.get()) {
|
||||
Iterator<Waypoint> waypoints = Waypoints.get().iterator();
|
||||
while (waypoints.hasNext()) {
|
||||
Waypoint waypoint = waypoints.next();
|
||||
for (Waypoint waypoint : Waypoints.get()) {
|
||||
BlockPos blockPos = waypoint.getPos();
|
||||
Vec3d coords = new Vec3d(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5);
|
||||
double xPos = ((coords.getX() - mc.player.getX()) * scale.get() * zoom.get() + width/2);
|
||||
double yPos = ((coords.getZ() - mc.player.getZ()) * scale.get() * zoom.get() + height/2);
|
||||
double xPos = ((coords.getX() - mc.player.getX()) * scale.get() * zoom.get() + width / 2);
|
||||
double yPos = ((coords.getZ() - mc.player.getZ()) * scale.get() * zoom.get() + height / 2);
|
||||
if (xPos < 0 || yPos < 0 || xPos > width - scale.get() || yPos > height - scale.get()) continue;
|
||||
String icon = "*";
|
||||
if (letters.get() && waypoint.name.get().length() > 0)
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package anticope.rejects.mixin;
|
||||
|
||||
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Mutable;
|
||||
import org.spongepowered.asm.mixin.gen.Accessor;
|
||||
|
||||
@Mixin(PlayerMoveC2SPacket.class)
|
||||
public interface PlayerMoveC2SPacketAccessor {
|
||||
@Mutable
|
||||
@Accessor("x")
|
||||
void setX(double x);
|
||||
|
||||
@Mutable
|
||||
@Accessor("z")
|
||||
void setZ(double z);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package anticope.rejects.mixin;
|
||||
|
||||
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Mutable;
|
||||
import org.spongepowered.asm.mixin.gen.Accessor;
|
||||
|
||||
@Mixin(PlayerMoveC2SPacket.class)
|
||||
public interface VehicleMoveC2SPacketAccessor {
|
||||
@Mutable
|
||||
@Accessor("x")
|
||||
void setX(double x);
|
||||
|
||||
@Mutable
|
||||
@Accessor("z")
|
||||
void setZ(double z);
|
||||
}
|
||||
49
src/main/java/anticope/rejects/modules/RoboWalk.java
Normal file
49
src/main/java/anticope/rejects/modules/RoboWalk.java
Normal file
@@ -0,0 +1,49 @@
|
||||
package anticope.rejects.modules;
|
||||
|
||||
import anticope.rejects.MeteorRejectsAddon;
|
||||
import anticope.rejects.mixin.PlayerMoveC2SPacketAccessor;
|
||||
import anticope.rejects.mixin.VehicleMoveC2SPacketAccessor;
|
||||
import meteordevelopment.meteorclient.events.packets.PacketEvent;
|
||||
import meteordevelopment.meteorclient.systems.modules.Module;
|
||||
import meteordevelopment.orbit.EventHandler;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.VehicleMoveC2SPacket;
|
||||
|
||||
public class RoboWalk extends Module {
|
||||
public RoboWalk() {
|
||||
super(MeteorRejectsAddon.CATEGORY, "robo-walk", "Bypasses LiveOverflow movement check.");
|
||||
}
|
||||
|
||||
private double smooth(double d) {
|
||||
return Math.round(d * 100.0d) / 100.0d;
|
||||
}
|
||||
|
||||
private boolean skip(double x, double z) {
|
||||
long dx = ((long) (x * 1000)) % 10;
|
||||
long dz = ((long) (z * 1000)) % 10;
|
||||
return dx != 0 || dz != 0;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
private void onPacketSend(PacketEvent.Send event) {
|
||||
if (event.packet instanceof PlayerMoveC2SPacket packet) {
|
||||
if (!packet.changesPosition()) return;
|
||||
|
||||
double x = smooth(packet.getX(0));
|
||||
double z = smooth(packet.getZ(0));
|
||||
|
||||
if (skip(x, z)) return;
|
||||
|
||||
((PlayerMoveC2SPacketAccessor) packet).setX(x);
|
||||
((PlayerMoveC2SPacketAccessor) packet).setZ(z);
|
||||
} else if (event.packet instanceof VehicleMoveC2SPacket packet) {
|
||||
double x = smooth(packet.getX());
|
||||
double z = smooth(packet.getZ());
|
||||
|
||||
if (skip(x, z)) return;
|
||||
|
||||
((VehicleMoveC2SPacketAccessor) packet).setX(x);
|
||||
((VehicleMoveC2SPacketAccessor) packet).setZ(z);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,22 +3,24 @@
|
||||
"package": "anticope.rejects.mixin",
|
||||
"compatibilityLevel": "JAVA_16",
|
||||
"client": [
|
||||
"TexturedRenderLayersMixin",
|
||||
"ClientPlayNetworkHandlerMixin",
|
||||
"ClientPlayerInteractionManagerMixin",
|
||||
"ClientPlayNetworkHandlerMixin",
|
||||
"CommandSuggestorMixin",
|
||||
"CustomPayloadS2CPacketMixin",
|
||||
"Deadmau5FeatureRendererMixin",
|
||||
"EntityAccessor",
|
||||
"GameRendererMixin",
|
||||
"LivingEntityRendererMixin",
|
||||
"StructureVoidBlockMixin",
|
||||
"ToastManagerMixin",
|
||||
"LivingEntityMixin",
|
||||
"baritone.MineProcessMixin",
|
||||
"LivingEntityRendererMixin",
|
||||
"MultiplayerScreenAccessor",
|
||||
"MultiplayerScreenMixin",
|
||||
"ServerListAccessor"
|
||||
"PlayerMoveC2SPacketAccessor",
|
||||
"ServerListAccessor",
|
||||
"StructureVoidBlockMixin",
|
||||
"TexturedRenderLayersMixin",
|
||||
"ToastManagerMixin",
|
||||
"VehicleMoveC2SPacketAccessor",
|
||||
"baritone.MineProcessMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
||||
Reference in New Issue
Block a user