-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-improved Gurkfly -improved and renamed Gurkwalk -added packet logger -added wg bypass
- Loading branch information
Showing
12 changed files
with
380 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../gurkenwerfer/toolkit/Commands/VClip.java → .../gurkenwerfer/toolkit/commands/VClip.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
src/main/java/de/gurkenwerfer/toolkit/mixins/ClientConnectionMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/java/de/gurkenwerfer/toolkit/mixins/ClientPlayNetworkHandlerMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
src/main/java/de/gurkenwerfer/toolkit/modules/FakeCreativeBypass.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
src/main/java/de/gurkenwerfer/toolkit/modules/Gurkwalk.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)); | ||
} | ||
} |
Oops, something went wrong.