Skip to content

Commit

Permalink
added improvements
Browse files Browse the repository at this point in the history
-improved Gurkfly
-improved and renamed Gurkwalk
-added packet logger
-added wg bypass
  • Loading branch information
stefexec committed Feb 18, 2023
1 parent 6ee2693 commit 76419d3
Show file tree
Hide file tree
Showing 12 changed files with 380 additions and 43 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
- `DubCounter` - Count the amount of double chests in render distance.
- `NoChestRender` - Disables rendering of chests completely to improve performance.
- `Gurkfly` - Fly like in creative mode. Only works on servers without anti-cheat.
- `Robowalk` - Bypasses the anti-human plugin on the Liveoverflow server.
- `Gurkwalk` - Bypasses the anti-human plugin on the LO server.
- `LO Bypasses` - Bypasses the multiple nag/demo-screens on the LO Server.
- `Packet Logger` - A very basic packet logger.
- `WorldGuard Bypass` - Move inside WorldGuard protected areas.
## Commands
- `vClip up|down` - Allows you to clip through blocks vertically.
7 changes: 5 additions & 2 deletions src/main/java/de/gurkenwerfer/toolkit/GurkensGadgetry.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package de.gurkenwerfer.toolkit;

import com.mojang.logging.LogUtils;
import de.gurkenwerfer.toolkit.Commands.VClip;
import de.gurkenwerfer.toolkit.commands.VClip;
import de.gurkenwerfer.toolkit.modules.*;
import de.gurkenwerfer.toolkit.modules.BedrockESP.BedrockESP;
import meteordevelopment.meteorclient.addons.MeteorAddon;
Expand All @@ -23,8 +23,11 @@ public void onInitialize() {
Modules.get().add(new DubCounter());
Modules.get().add(new AutoItemMove());
Modules.get().add(new BedrockESP());
Modules.get().add(new Robowalk());
Modules.get().add(new Gurkwalk());
Modules.get().add(new Gurkfly());
Modules.get().add(new PacketLogger());
Modules.get().add(new FakeCreativeBypass());
Modules.get().add(new WorldGuardBypass());

// Commands
Commands.get().add(new VClip());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.gurkenwerfer.toolkit.Commands;
package de.gurkenwerfer.toolkit.commands;

import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import meteordevelopment.meteorclient.systems.commands.Command;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
package de.gurkenwerfer.toolkit.mixins;

import de.gurkenwerfer.toolkit.modules.Gurkwalk;
import net.minecraft.network.ClientConnection;
import org.spongepowered.asm.mixin.Mixin;
import meteordevelopment.meteorclient.mixin.PlayerMoveC2SPacketAccessor;
import meteordevelopment.meteorclient.mixininterface.IPlayerMoveC2SPacket;
import meteordevelopment.meteorclient.systems.modules.Modules;
import net.minecraft.client.MinecraftClient;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.vehicle.BoatEntity;
import net.minecraft.network.Packet;
import net.minecraft.network.PacketCallbacks;
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
import net.minecraft.network.packet.c2s.play.VehicleMoveC2SPacket;
import org.jetbrains.annotations.Nullable;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(ClientConnection.class)
public abstract class ClientConnectionMixin {

@Shadow protected abstract void sendImmediately(Packet<?> packet, @Nullable PacketCallbacks callbacks);

@Inject(method = "send(Lnet/minecraft/network/Packet;Lnet/minecraft/network/PacketCallbacks;)V", at = @At("HEAD"), cancellable = true)
private void onSend(Packet<?> packet, PacketCallbacks callbacks, CallbackInfo info) {
Gurkwalk gw = Modules.get().get(Gurkwalk.class);
MinecraftClient mc = MinecraftClient.getInstance();

if (mc != null && mc.player != null) {
if (gw.isActive()) {
if (packet instanceof PlayerMoveC2SPacket.PositionAndOnGround move) {
PlayerMoveC2SPacket.PositionAndOnGround modified = new PlayerMoveC2SPacket.PositionAndOnGround(
gw.round(move.getX(0)),
gw.roundY() ? gw.round(move.getY(0)) : move.getY(0),
gw.round(move.getZ(0)),

move.isOnGround()
);

info.cancel();
this.sendImmediately(modified, callbacks);

} else if (packet instanceof PlayerMoveC2SPacket.Full move) {
PlayerMoveC2SPacket.Full modified = new PlayerMoveC2SPacket.Full(
gw.round(move.getX(0)),
gw.roundY() ? gw.round(move.getY(0)) : move.getY(0),
gw.round(move.getZ(0)),

move.getYaw(mc.player.getYaw()),
move.getPitch(mc.player.getPitch()),
move.isOnGround()
);

info.cancel();
this.sendImmediately(modified, callbacks);

} else if (packet instanceof VehicleMoveC2SPacket move) {
BoatEntity entity = new BoatEntity(EntityType.BOAT, mc.world);

entity.setPos(
gw.round(move.getX()),
gw.roundY() ? gw.round(move.getY()) : move.getY(),
gw.round(move.getZ())
);

entity.setYaw(move.getYaw());
entity.setPitch(move.getPitch());

VehicleMoveC2SPacket modified = new VehicleMoveC2SPacket(entity);

info.cancel();
this.sendImmediately(modified, callbacks);
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package de.gurkenwerfer.toolkit.mixins;

import de.gurkenwerfer.toolkit.modules.FakeCreativeBypass;
import meteordevelopment.meteorclient.systems.modules.Modules;
import net.minecraft.client.network.ClientPlayNetworkHandler;
import net.minecraft.network.packet.s2c.play.GameStateChangeS2CPacket;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(ClientPlayNetworkHandler.class)
public class ClientPlayNetworkHandlerMixin {
@Inject(method = "onGameStateChange", at = @At("HEAD"), cancellable = true)
private void onSend(GameStateChangeS2CPacket packet, CallbackInfo info) {

FakeCreativeBypass bypass = Modules.get().get(FakeCreativeBypass.class);

if (bypass.isActive() && packet.getReason() == GameStateChangeS2CPacket.DEMO_MESSAGE_SHOWN && packet.getValue() == 0.0F && bypass.bypassDemo()
|| packet.getReason() == GameStateChangeS2CPacket.GAME_WON && bypass.bypassCredits()
|| packet.getReason() == GameStateChangeS2CPacket.GAME_MODE_CHANGED && bypass.bypassCreative()) {
info.cancel();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package de.gurkenwerfer.toolkit.modules;

import de.gurkenwerfer.toolkit.GurkensGadgetry;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;

public class FakeCreativeBypass extends Module{
public FakeCreativeBypass() {
super(GurkensGadgetry.CATEGORY, "LO-Bypasses", "Bypasses LiveOverflow's Fake Creative Mode/Nag Screens.");
}

private final SettingGroup sgGeneral = settings.getDefaultGroup();


private final Setting<Boolean> credits = sgGeneral.add(new BoolSetting.Builder()
.name("Cancel Credits")
.description("Cancel the end screen packet.")
.defaultValue(true)
.build()
);

private final Setting<Boolean> demo = sgGeneral.add(new BoolSetting.Builder()
.name("Cancel Demo Mode")
.description("Cancel the demo screen packet.")
.defaultValue(true)
.build()
);

private final Setting<Boolean> creative = sgGeneral.add(new BoolSetting.Builder()
.name("Cancel Fake Creative Mode")
.description("Cancel the fake creative mode packet.")
.defaultValue(true)
.build()
);

public boolean bypassCredits() {
return this.credits.get();
}

public boolean bypassDemo() {
return this.demo.get();
}

public boolean bypassCreative() {
return this.creative.get();
}
}
35 changes: 25 additions & 10 deletions src/main/java/de/gurkenwerfer/toolkit/modules/Gurkfly.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import de.gurkenwerfer.toolkit.GurkensGadgetry;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.DoubleSetting;
import meteordevelopment.meteorclient.settings.IntSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
Expand All @@ -14,7 +15,7 @@ public class Gurkfly extends Module {
private final Setting<Double> FLYING_SPEED = sgGeneral.add(new DoubleSetting.Builder()
.name("flying-speed")
.description("Take a wild guess.")
.defaultValue(1.6)
.defaultValue(2.420)
.min(0)
.sliderMax(10)
.build()
Expand All @@ -23,9 +24,9 @@ public class Gurkfly extends Module {
private final Setting<Double> HOVER_SPEED = sgGeneral.add(new DoubleSetting.Builder()
.name("hover-speed")
.description("How far you ascend per tick when hovering.")
.defaultValue(0.003)
.defaultValue(0.009)
.min(0)
.sliderMax(0.01)
.sliderMax(0.02)
.build()
);
private final Setting<Double> BFALL_SPEED = sgGeneral.add(new DoubleSetting.Builder()
Expand Down Expand Up @@ -54,6 +55,15 @@ public class Gurkfly extends Module {
.build()
);

private final Setting<Integer> ticks = sgGeneral.add(new IntSetting.Builder()
.name("Bypass Fall Ticks")
.description("How many ticks to wait before falling again to bypass the vanilla anti-cheat.")
.defaultValue(20)
.min(1)
.sliderMax(50)
.build()
);

public Gurkfly() {
super(GurkensGadgetry.CATEGORY, "gurkfly", "Fly like in creative mode. Only works on unprotected servers.");
}
Expand All @@ -66,6 +76,8 @@ public void onActivate() {
@EventHandler
private void onTick(TickEvent.Pre event) {

int tick = 0;

assert mc.player != null;
// hover and move
if ((!mc.player.isOnGround() && !mc.options.jumpKey.isPressed()) && !mc.options.sneakKey.isPressed()) {
Expand All @@ -79,25 +91,28 @@ private void onTick(TickEvent.Pre event) {
mc.player.setVelocity(mc.player.getRotationVector().rotateY(45).multiply(FLYING_SPEED.get()));
} else if (mc.options.rightKey.isPressed()) {
mc.player.setVelocity(mc.player.getRotationVector().rotateY(-45).multiply(FLYING_SPEED.get()));
} else {
mc.player.setVelocity(0, mc.player.getVelocity().y, 0);
}

// add upwards momentum
mc.player.setVelocity(mc.player.getVelocity().x, HOVER_SPEED.get(), mc.player.getVelocity().z);

//fall down every 35 ticks to bypass vanilla fly detection
if (mc.player.age % 38 == 0) {
if (mc.player.age % ticks.get() == 0) {
mc.player.setPosition(mc.player.getX(), mc.player.getY() - BFALL_SPEED.get(), mc.player.getZ());

} else {
mc.player.setVelocity(mc.player.getVelocity().x, HOVER_SPEED.get(), mc.player.getVelocity().z);
}

}
} else if (mc.options.jumpKey.isPressed()) {

//gain upward momentum
if (mc.player != null) {

mc.player.setVelocity(mc.player.getVelocity().add(0, ASC_SPEED.get(), 0));
//fall down every 35 ticks to bypass vanilla fly detection
if (mc.player.age % 38 == 0) {
if (mc.player.age % ticks.get() == 0) {
mc.player.setPosition(mc.player.getX(), mc.player.getY() - BFALL_SPEED.get(), mc.player.getZ());
} else {
mc.player.setVelocity(mc.player.getVelocity().add(0, ASC_SPEED.get(), 0));
}
}
} else if (mc.options.sneakKey.isPressed()) {
Expand Down
46 changes: 46 additions & 0 deletions src/main/java/de/gurkenwerfer/toolkit/modules/Gurkwalk.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package de.gurkenwerfer.toolkit.modules;

import de.gurkenwerfer.toolkit.GurkensGadgetry;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.IntSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;

public class Gurkwalk extends Module {
private final SettingGroup sgGeneral = settings.getDefaultGroup();

private final Setting<Integer> digits = sgGeneral.add(new IntSetting.Builder()
.name("digits")
.description("How many digits to remove.")
.defaultValue(2)
.sliderMin(0)
.sliderMax(5)
.noSlider()
.build()
);

private final Setting<Boolean> modifyY = sgGeneral.add(new BoolSetting.Builder()
.name("round-y")
.description("Rounds your y coordinate.")
.defaultValue(false)
.build()
);

public Gurkwalk() {
super(GurkensGadgetry.CATEGORY, "Gurkwalk", "Rounds your coords to bypass LiveOverflow's anti-human movement check.");
}


public boolean roundY() {
return modifyY.get();
}

// Utils

public double round(double value) {
int digit = (int) Math.pow(10, digits.get());
double round = ((double) (Math.round(value * digit)) / digit);
return Math.nextAfter(round, round + Math.signum(round));
}
}
Loading

0 comments on commit 76419d3

Please sign in to comment.