Skip to content
This repository was archived by the owner on Oct 27, 2023. It is now read-only.

Commit 632331a

Browse files
committed
added and fixed modules
1 parent 277f18e commit 632331a

File tree

7 files changed

+127
-12
lines changed

7 files changed

+127
-12
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ yarn_mappings=1.19.4+build.1
66
loader_version=0.14.17
77

88
# Mod properties
9-
mod_version=1.1.2
9+
mod_version=1.1.3
1010
maven_group=coffee.client
1111
archives_base_name=coffee
1212

src/main/java/coffee/client/CoffeeMain.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import coffee.client.feature.gui.notifications.NotificationRenderer;
1212
import coffee.client.feature.module.Module;
1313
import coffee.client.feature.module.ModuleRegistry;
14+
import coffee.client.feature.module.impl.misc.ClientSettings;
1415
import coffee.client.helper.CompatHelper;
1516
import coffee.client.helper.event.EventSystem;
1617
import coffee.client.helper.event.impl.WindowInitEvent;
@@ -23,10 +24,15 @@
2324
import net.fabricmc.api.ModInitializer;
2425
import net.minecraft.client.MinecraftClient;
2526
import net.minecraft.client.gui.Element;
27+
import net.minecraft.client.gui.hud.ChatHud;
28+
import net.minecraft.client.gui.screen.ChatScreen;
29+
import net.minecraft.client.gui.screen.Screen;
30+
import net.minecraft.client.option.KeyBinding;
2631
import org.apache.commons.io.IOUtils;
2732
import org.apache.logging.log4j.Level;
2833
import org.apache.logging.log4j.LogManager;
2934
import org.apache.logging.log4j.Logger;
35+
import org.lwjgl.glfw.GLFW;
3036

3137
import java.io.File;
3238
import java.nio.charset.StandardCharsets;

src/main/java/coffee/client/feature/gui/clickgui/ClickGUI.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
public class ClickGUI extends AAScreen {
3535
private static ClickGUI instance;
36-
boolean initialized = false;
36+
static boolean initialized = false;
3737
boolean closing = false;
3838
double progress = 0;
3939

@@ -47,6 +47,10 @@ public class ClickGUI extends AAScreen {
4747

4848
ClickableTextElement help;
4949

50+
public static boolean enabled(){
51+
return initialized;
52+
}
53+
5054
public static void reInit() {
5155
if (instance != null) {
5256
instance.initWidgets();

src/main/java/coffee/client/feature/module/ModuleRegistry.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ private static void initInner() {
260260
registerModule(AutoRun.class);
261261
registerModule(GhostHand.class);
262262
registerModule(NoChatNormalisation.class);
263+
registerModule(InstaMine.class);
263264

264265
rebuildSharedModuleList();
265266

src/main/java/coffee/client/feature/module/impl/exploit/ChatFilterBypass.java

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,42 @@
11
package coffee.client.feature.module.impl.exploit;
22

3+
import coffee.client.CoffeeMain;
4+
import coffee.client.feature.config.EnumSetting;
35
import coffee.client.feature.module.Module;
46
import coffee.client.feature.module.ModuleType;
7+
import coffee.client.feature.module.impl.movement.Flight;
8+
import coffee.client.helper.event.impl.PacketEvent;
59
import coffee.client.helper.event.impl.SendMessageEvent;
10+
import coffee.client.mixin.network.IPlayerMoveC2SPacketMixin;
611
import me.x150.jmessenger.MessageSubscription;
712
import net.minecraft.client.util.math.MatrixStack;
13+
import net.minecraft.network.packet.Packet;
14+
import net.minecraft.network.packet.c2s.play.ChatMessageC2SPacket;
15+
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
816

917
public class ChatFilterBypass extends Module {
18+
boolean blockPackets = true;
19+
1020
public ChatFilterBypass() {
1121
super("ChatFilterBypass", "Bypass chat filter", ModuleType.EXPLOIT);
1222
}
1323

14-
@MessageSubscription
15-
void onmessage(SendMessageEvent event){
16-
String message = event.message;
17-
message = message.replace("a", "a\u200C");
18-
message = message.replace("e", "e\u200C");
19-
message = message.replace("i", "i\u200C");
20-
message = message.replace("o", "o\u200C");
21-
message = message.replace("u", "u\u200C");
22-
event.message = message;
24+
@MessageSubscription()
25+
void onPacket(PacketEvent.Sent pe) {
26+
// if (!this.isEnabled()) return;
27+
if (!blockPackets) return;
28+
if (pe.getPacket() instanceof ChatMessageC2SPacket packet) {
29+
String message = packet.chatMessage();
30+
if (message.startsWith("/")) {
31+
return;
32+
}
33+
pe.setCancelled(true);
34+
StringBuilder rvmsg = new StringBuilder(message).reverse();
35+
String msgformatted = "\u202E " + rvmsg;
36+
blockPackets = false;
37+
client.player.networkHandler.sendChatMessage(msgformatted);
38+
blockPackets = true;
39+
}
2340
}
2441

2542
@Override
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
package coffee.client.feature.module.impl.exploit;
2+
3+
import coffee.client.CoffeeMain;
4+
import coffee.client.feature.module.Module;
5+
import coffee.client.feature.module.ModuleType;
6+
import coffee.client.feature.module.impl.world.InstantBreak;
7+
import coffee.client.helper.event.impl.PacketEvent;
8+
import coffee.client.helper.render.Renderer;
9+
import coffee.client.helper.util.Rotations;
10+
import coffee.client.helper.util.Utils;
11+
import coffee.client.mixin.IClientPlayerInteractionManagerMixin;
12+
import me.x150.jmessenger.MessageSubscription;
13+
import net.minecraft.client.util.math.MatrixStack;
14+
import net.minecraft.item.Items;
15+
import net.minecraft.network.packet.c2s.play.HandSwingC2SPacket;
16+
import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket;
17+
import net.minecraft.network.packet.c2s.play.PlayerInteractBlockC2SPacket;
18+
import net.minecraft.util.Hand;
19+
import net.minecraft.util.math.BlockPos;
20+
import net.minecraft.util.math.Direction;
21+
import net.minecraft.util.math.Vec3d;
22+
23+
import java.util.ArrayList;
24+
import java.util.List;
25+
import java.util.Objects;
26+
27+
public class InstaMine extends Module {
28+
private final BlockPos.Mutable blockPos = new BlockPos.Mutable(0, -1, 0);
29+
private Direction direction;
30+
BlockPos last;
31+
32+
33+
public InstaMine() {
34+
super("InstaMine", "Break gens instantly", ModuleType.EXPLOIT);
35+
}
36+
37+
@MessageSubscription
38+
void onPSe(coffee.client.helper.event.impl.PacketEvent.Sent pe) {
39+
if (pe.getPacket() instanceof PlayerActionC2SPacket packet) {
40+
if (packet.getAction() == PlayerActionC2SPacket.Action.START_DESTROY_BLOCK) {
41+
direction = packet.getDirection();
42+
blockPos.set(packet.getPos());
43+
}
44+
}
45+
}
46+
47+
@Override
48+
public void tick() {
49+
if (Objects.requireNonNull(client.interactionManager).isBreakingBlock()) {
50+
last = ((IClientPlayerInteractionManagerMixin) client.interactionManager).getCurrentBreakingPos();
51+
}
52+
if (last.getY() == -128) return;
53+
CoffeeMain.client.getNetworkHandler().sendPacket(new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.STOP_DESTROY_BLOCK, last, direction));
54+
55+
CoffeeMain.client.getNetworkHandler().sendPacket(new HandSwingC2SPacket(Hand.MAIN_HAND));
56+
}
57+
58+
@Override
59+
public void enable() {
60+
last = BlockPos.ofFloored(0, -128, 0);
61+
}
62+
63+
@Override
64+
public void disable() {
65+
66+
}
67+
68+
@Override
69+
public String getContext() {
70+
return null;
71+
}
72+
73+
@Override
74+
public void onWorldRender(MatrixStack matrices) {
75+
if (last.getY() == -128) return;
76+
Renderer.R3D.renderOutline(matrices, Utils.getCurrentRGB(), new Vec3d(last.getX(), last.getY(), last.getZ()), new Vec3d(1, 1, 1));
77+
}
78+
79+
@Override
80+
public void onHudRender() {
81+
82+
}
83+
}

src/main/java/coffee/client/feature/module/impl/world/AutoLavacast.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
package coffee.client.feature.module.impl.world;
77

88
import coffee.client.CoffeeMain;
9+
import coffee.client.feature.config.DoubleSetting;
910
import coffee.client.feature.config.EnumSetting;
1011
import coffee.client.feature.module.Module;
1112
import coffee.client.feature.module.ModuleType;
@@ -32,6 +33,9 @@ public class AutoLavacast extends Module {
3233
final EnumSetting<Mode> mode = this.config.create(new EnumSetting.Builder<>(Mode.Bypass).name("Mode")
3334
.description("How to place and move. Bypass is slow but looks legit, fast is VERY speedy")
3435
.get());
36+
37+
final DoubleSetting speed = this.config.create(new DoubleSetting.Builder(50).name("Speed").description("How fast to do fast mode").min(10).max(100).precision(10).get());
38+
3539
final Timer timer = new Timer();
3640
Input original;
3741
Vec3i incr;
@@ -57,7 +61,7 @@ BlockPos getNextPosition() {
5761

5862
@Override
5963
public void onFastTick() {
60-
if (mode.getValue() == Mode.Fast && !timer.hasExpired(100)) {
64+
if (mode.getValue() == Mode.Fast && !timer.hasExpired(speed.getValue().intValue())) {
6165
return;
6266
}
6367
timer.reset();

0 commit comments

Comments
 (0)