mate
This commit is contained in:
parent
91bc773a8c
commit
1d2191c0c0
|
@ -64,6 +64,7 @@ public class ClientMod implements ClientModInitializer {
|
||||||
moduleManager.registerModule(new BotMovementBypass());
|
moduleManager.registerModule(new BotMovementBypass());
|
||||||
moduleManager.registerModule(new WorldBorderBypass());
|
moduleManager.registerModule(new WorldBorderBypass());
|
||||||
moduleManager.registerModule(new BunkerBuster());
|
moduleManager.registerModule(new BunkerBuster());
|
||||||
|
moduleManager.registerModule(new Mate());
|
||||||
|
|
||||||
LOGGER.info("[Stage 4/5: EventInit] Registered modules; registering module event system");
|
LOGGER.info("[Stage 4/5: EventInit] Registered modules; registering module event system");
|
||||||
moduleManager.registerEvents();
|
moduleManager.registerEvents();
|
||||||
|
|
|
@ -3,17 +3,24 @@ package dev.coredoes.clientmod.commands;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
import dev.coredoes.clientmod.ClientMod;
|
import dev.coredoes.clientmod.ClientMod;
|
||||||
|
import dev.coredoes.clientmod.util.ConnectionInterface;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.mob.DrownedEntity;
|
import net.minecraft.entity.mob.DrownedEntity;
|
||||||
import net.minecraft.nbt.NbtCompound;
|
import net.minecraft.nbt.NbtCompound;
|
||||||
|
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
|
||||||
import net.minecraft.predicate.entity.EntityPredicate;
|
import net.minecraft.predicate.entity.EntityPredicate;
|
||||||
import net.minecraft.predicate.entity.EntityPredicates;
|
import net.minecraft.predicate.entity.EntityPredicates;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.TypeFilter;
|
import net.minecraft.util.TypeFilter;
|
||||||
|
import net.minecraft.util.hit.BlockHitResult;
|
||||||
import net.minecraft.util.hit.EntityHitResult;
|
import net.minecraft.util.hit.EntityHitResult;
|
||||||
import net.minecraft.util.hit.HitResult;
|
import net.minecraft.util.hit.HitResult;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.Box;
|
import net.minecraft.util.math.Box;
|
||||||
|
import net.minecraft.util.math.Direction;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
@ -58,6 +65,10 @@ public class CommandParser {
|
||||||
client.player.sendMessage(Text.of("Found drowned at " + entity.getPos().toString()));
|
client.player.sendMessage(Text.of("Found drowned at " + entity.getPos().toString()));
|
||||||
}
|
}
|
||||||
client.player.sendMessage(Text.of("--- END DROWNED LIST ---"));
|
client.player.sendMessage(Text.of("--- END DROWNED LIST ---"));
|
||||||
|
} else if (Objects.equals(command, "mate")) {
|
||||||
|
ClientMod.moduleManager.getModuleById("Mate").enable();
|
||||||
|
} else if (Objects.equals(command, "stopMate")) {
|
||||||
|
ClientMod.moduleManager.getModuleById("Mate").disable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,74 @@
|
||||||
|
package dev.coredoes.clientmod.modules;
|
||||||
|
|
||||||
|
import dev.coredoes.clientmod.util.ConnectionInterface;
|
||||||
|
import net.minecraft.client.MinecraftClient;
|
||||||
|
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
|
||||||
|
import net.minecraft.util.Hand;
|
||||||
|
import net.minecraft.util.hit.BlockHitResult;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.Direction;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
|
public class Mate implements Module {
|
||||||
|
private boolean enabled = false;
|
||||||
|
@Override
|
||||||
|
public void disable() {
|
||||||
|
enabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void enable() {
|
||||||
|
enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getId() {
|
||||||
|
return "Mate";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getVersion() {
|
||||||
|
return "1.0.0";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void endTick(MinecraftClient client) {
|
||||||
|
Module.super.endTick(client);
|
||||||
|
|
||||||
|
if (!this.enabled) return;
|
||||||
|
|
||||||
|
doAirTpTo(client, 1332, 80, 1297);
|
||||||
|
|
||||||
|
try { Thread.sleep(2); } catch (InterruptedException ignored) {}
|
||||||
|
|
||||||
|
doAirTpTo(client, client.player.getX(), client.player.getY(), client.player.getZ() + 40);
|
||||||
|
// 1335 80 1339
|
||||||
|
BlockPos blockPos = new BlockPos(1335, 80, 1339);
|
||||||
|
Direction direction = Direction.NORTH;
|
||||||
|
BlockHitResult blockHitResult = new BlockHitResult(new Vec3d(blockPos.getX(), blockPos.getY(), blockPos.getZ()), direction, blockPos, false);
|
||||||
|
client.interactionManager.interactBlock(client.player, Hand.MAIN_HAND, blockHitResult);
|
||||||
|
// sent back to: 1282 130 1288
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void doAirTpTo(MinecraftClient client, double x, double y, double z) {
|
||||||
|
// STEP 1: Massively increase our movement cap
|
||||||
|
PlayerMoveC2SPacket packet = new PlayerMoveC2SPacket.PositionAndOnGround(
|
||||||
|
client.player.getX(),
|
||||||
|
client.player.getY(),
|
||||||
|
client.player.getZ(),
|
||||||
|
client.player.isOnGround()
|
||||||
|
);
|
||||||
|
for (int i = 0; i < 8; i++) {
|
||||||
|
((ConnectionInterface) client.getNetworkHandler().getConnection()).sendVolatile(packet, null);
|
||||||
|
}
|
||||||
|
// STEP 2: Send the teleport packet
|
||||||
|
PlayerMoveC2SPacket realPacket = new PlayerMoveC2SPacket.PositionAndOnGround(
|
||||||
|
x,
|
||||||
|
y,
|
||||||
|
z,
|
||||||
|
client.player.isOnGround()
|
||||||
|
);
|
||||||
|
((ConnectionInterface) client.getNetworkHandler().getConnection()).sendVolatile(realPacket, null);
|
||||||
|
client.player.setPosition(x, y, z);
|
||||||
|
}
|
||||||
|
}
|
|
@ -58,7 +58,6 @@ public class PacketFreezer implements Module {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
this.packets.add(event.packet);
|
this.packets.add(event.packet);
|
||||||
}
|
}
|
||||||
ClientMod.LOGGER.info(event.packet.toString());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendAllQueuedPackets(MinecraftClient client) {
|
private void sendAllQueuedPackets(MinecraftClient client) {
|
||||||
|
|
Loading…
Reference in New Issue