the final coreclient commit

This commit is contained in:
core 2023-07-22 12:33:28 -04:00
parent 753c96e97d
commit e2b851c0d2
Signed by: core
GPG Key ID: FDBF740DADDCEECF
5 changed files with 233 additions and 4 deletions

View File

@ -7,10 +7,10 @@ import dev.coredoes.coreclient.gui.ClickGUI;
import dev.coredoes.coreclient.gui.module.*;
import dev.coredoes.coreclient.module.bypass.*;
import dev.coredoes.coreclient.module.bypass.ButtonClicker;
import dev.coredoes.coreclient.module.movement.CreativeFlight;
import dev.coredoes.coreclient.module.movement.Jetpack;
import dev.coredoes.coreclient.module.movement.*;
import dev.coredoes.coreclient.module.misc.PacketLogger;
import dev.coredoes.coreclient.module.movement.NoFall;
import dev.coredoes.coreclient.module.movement.Instabreak;
import dev.coredoes.coreclient.module.movement.Sink;
import meteordevelopment.orbit.EventBus;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback;
@ -20,6 +20,8 @@ import net.fabricmc.fabric.api.client.rendering.v1.HudRenderCallback;
import net.fabricmc.fabric.api.networking.v1.PacketByteBufs;
import net.minecraft.client.MinecraftClient;
import net.minecraft.network.PacketByteBuf;
import net.minecraft.text.Text;
import net.minecraft.text.TextColor;
import org.lwjgl.glfw.GLFW;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -63,8 +65,11 @@ public class CoreClient implements ClientModInitializer {
Category.MOVEMENT.modules.add(new CreativeFlight());
Category.MOVEMENT.modules.add(new Jetpack());
Category.MOVEMENT.modules.add(new NoFall());
Category.MOVEMENT.modules.add(new Phase());
Category.EXPLOITS.modules.add(new ButtonClicker());
Category.EXPLOITS.modules.add(new Instabreak());
Category.EXPLOITS.modules.add(new Sink());
Category.MISCELLANEOUS.modules.add(new PacketLogger());
@ -96,6 +101,17 @@ public class CoreClient implements ClientModInitializer {
if (i == NoFall.keybind.getKey()) {
NoFall.getInstance().isEnabled().toggle();
}
if (i == Phase.keybind.getKey()) {
if (MinecraftClient.getInstance().player != null) {
Phase.getInstance().isEnabled().toggle();
if (Phase.getInstance().isEnabled().isOn()) {
MinecraftClient.getInstance().player.sendMessage(Text.of("[CoreClient] Phase Enabled"));
} else {
MinecraftClient.getInstance().player.sendMessage(Text.of("[CoreClient] Phase Disabled"));
}
}
}
}
}
}

View File

@ -0,0 +1,74 @@
package dev.coredoes.coreclient.module.movement;
import com.lukflug.panelstudio.base.IToggleable;
import dev.coredoes.coreclient.CoreClient;
import dev.coredoes.coreclient.event.PacketEvent;
import dev.coredoes.coreclient.event.TickEvent;
import dev.coredoes.coreclient.gui.module.Module;
import dev.coredoes.coreclient.gui.setting.BooleanSetting;
import dev.coredoes.coreclient.gui.setting.DoubleSetting;
import dev.coredoes.coreclient.gui.setting.IntegerSetting;
import dev.coredoes.coreclient.gui.setting.KeybindSetting;
import dev.coredoes.coreclient.mixin.ClientPlayerEntityAccessor;
import dev.coredoes.coreclient.mixin.PlayerMoveC2SPacketAccessor;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.block.AbstractBlock;
import net.minecraft.client.MinecraftClient;
import net.minecraft.entity.Entity;
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
import org.lwjgl.glfw.GLFW;
import java.util.Objects;
public class Instabreak extends Module {
private static Instabreak instance;
private static boolean enabled;
public static final KeybindSetting keybind=new KeybindSetting("Keybind","keybind","The key to toggle the module.",()->true, GLFW.GLFW_KEY_F25);
public Instabreak() {
super("Instabreak", "Instantly break blocks", () -> true, true, false);
settings.add(keybind);
enabled = false;
instance = this;
CoreClient.eventBus.subscribe(this);
}
@EventHandler
private void onPostTick(TickEvent.Post e) {
if (MinecraftClient.getInstance().player == null) {
return;
}
if (isEnabled().isOn()) {
MinecraftClient.getInstance().player.getAbilities().creativeMode = true;
} else {
MinecraftClient.getInstance().player.getAbilities().creativeMode = false;
}
}
public static Instabreak getInstance() {
return instance;
}
@Override
public IToggleable isEnabled() {
return new IToggleable() {
@Override
public boolean isOn() {
return enabled;
}
@Override
public void toggle() {
if (toggleable) {
enabled=!enabled;
}
}
};
}
}

View File

@ -0,0 +1,65 @@
package dev.coredoes.coreclient.module.movement;
import com.lukflug.panelstudio.base.IToggleable;
import dev.coredoes.coreclient.CoreClient;
import dev.coredoes.coreclient.event.TickEvent;
import dev.coredoes.coreclient.gui.module.Module;
import dev.coredoes.coreclient.gui.setting.*;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.client.MinecraftClient;
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
import org.lwjgl.glfw.GLFW;
import java.util.Objects;
public class Sink extends Module {
private static Sink instance;
private static boolean enabled;
public static final KeybindSetting keybind=new KeybindSetting("Keybind","keybind","The key to toggle the module.",()->true, GLFW.GLFW_KEY_F25);
public Sink() {
super("Sink", "Sink into the ground", () -> true, true, false);
settings.add(keybind);
enabled = false;
instance = this;
CoreClient.eventBus.subscribe(this);
}
public static Sink getInstance() {
return instance;
}
@EventHandler
private void onPostTick(TickEvent.Post e) {
return;
if (enabled) {
for (double i = 0; i < 33.0D; i += 01) {
assert MinecraftClient.getInstance().player != null;
MinecraftClient.getInstance().player.setPos(MinecraftClient.getInstance().player.getX(), MinecraftClient.getInstance().player.getY() - i, MinecraftClient.getInstance().player.getZ());
Objects.requireNonNull(MinecraftClient.getInstance().getNetworkHandler()).sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(MinecraftClient.getInstance().player.getX(), MinecraftClient.getInstance().player.getY() - 0.000001, MinecraftClient.getInstance().player.getZ(), NoFall.getInstance().isEnabled().isOn() || MinecraftClient.getInstance().player.isOnGround()));
CoreClient.LOGGER.info("at {}", i);
}
}
}
@Override
public IToggleable isEnabled() {
return new IToggleable() {
@Override
public boolean isOn() {
return enabled;
}
@Override
public void toggle() {
if (toggleable) {
enabled=!enabled;
}
}
};
}
}

View File

@ -28,6 +28,7 @@ public class CreativeFlight extends Module {
public static final BooleanSetting antikick = new BooleanSetting("Anti-Kick", "antikick", "Prevent vanilla antifly", () -> true, true);
public static final IntegerSetting delay = new IntegerSetting("Delay", "delay", "The amount of delay in ticks between flying down a bit and returning to original position", () -> true, 1, 200, 20);
public static final IntegerSetting offTime = new IntegerSetting("Off Time", "offtime", "The amount of delay, in milliseconds, to fly down a bit to reset floating ticks.", () -> true, 1, 20, 1);
public static final DoubleSetting speed = new DoubleSetting("Speed", "speed", "Your speed when flying", () -> true, 0.0D, 1.0D, 0.1D);
private int delayLeft = delay.getValue();
private int offLeft = offTime.getValue();
@ -42,6 +43,7 @@ public class CreativeFlight extends Module {
settings.add(antikick);
settings.add(delay);
settings.add(offTime);
settings.add(speed);
enabled=false;
instance = this;
@ -69,7 +71,14 @@ public class CreativeFlight extends Module {
return;
}
MinecraftClient.getInstance().player.getAbilities().allowFlying = enabled;
double flySpeed = speed.getValue();
if (isEnabled().isOn()) {
MinecraftClient.getInstance().player.getAbilities().allowFlying = enabled;
MinecraftClient.getInstance().player.getAbilities().setFlySpeed((float) flySpeed);
} else {
MinecraftClient.getInstance().player.getAbilities().allowFlying = false;
}
if (delayLeft > 0) delayLeft--;

View File

@ -0,0 +1,65 @@
package dev.coredoes.coreclient.module.movement;
import com.lukflug.panelstudio.base.IToggleable;
import dev.coredoes.coreclient.CoreClient;
import dev.coredoes.coreclient.event.PacketEvent;
import dev.coredoes.coreclient.gui.module.Module;
import dev.coredoes.coreclient.gui.setting.KeybindSetting;
import dev.coredoes.coreclient.mixin.PlayerMoveC2SPacketAccessor;
import dev.coredoes.coreclient.module.misc.PacketLogger;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
import net.minecraft.network.packet.s2c.play.*;
import org.lwjgl.glfw.GLFW;
public class Phase extends Module {
private static Phase instance;
private boolean enabled = false;
public static final KeybindSetting keybind=new KeybindSetting("Keybind","keybind","The key to toggle the module.",()->true, GLFW.GLFW_KEY_V);
public Phase() {
super("Phase", "Walk through walls!", () -> true, true, false);
CoreClient.eventBus.subscribe(this);
settings.add(keybind);
instance = this;
}
@EventHandler
public void onPacketSend(PacketEvent.Send e) {
if (isEnabled().isOn()) {
if (e.packet instanceof PlayerMoveC2SPacket) {
e.setCancelled(true);
}
}
}
public static Phase getInstance() {
return instance;
}
@Override
public IToggleable isEnabled() {
return new IToggleable() {
@Override
public boolean isOn() {
return enabled;
}
@Override
public void toggle() {
if (toggleable) {
enabled=!enabled;
if (enabled) {
}
}
}
};
}
}