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

Commit c0d6de6

Browse files
committed
AntiShield
1 parent 62a11f2 commit c0d6de6

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ private static void initInner() {
252252
registerModule(StorageVoider.class);
253253
registerModule(BedBreaker.class);
254254
registerModule(AutoTPA.class);
255+
registerModule(AntiShield.class);
255256

256257
rebuildSharedModuleList();
257258

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
package coffee.client.feature.module.impl.combat;
2+
3+
import coffee.client.feature.module.Module;
4+
import coffee.client.feature.module.ModuleType;
5+
import coffee.client.helper.event.impl.RenderEvent;
6+
import net.minecraft.client.util.math.MatrixStack;
7+
import net.minecraft.entity.Entity;
8+
import net.minecraft.entity.EntityType;
9+
import net.minecraft.entity.player.PlayerEntity;
10+
import net.minecraft.util.math.Vec3d;
11+
12+
public class AntiShield extends Module {
13+
public AntiShield() {
14+
super("AntiShield", "Bypass shield by teleporting behind the player", ModuleType.COMBAT);
15+
}
16+
17+
@Override
18+
public void tick() {
19+
20+
}
21+
22+
@Override
23+
public void onFastTick(){
24+
if (client.options.attackKey.isPressed()){
25+
if (client.targetedEntity != null){
26+
Entity target = client.targetedEntity;
27+
Vec3d ogpos = client.player.getPos();
28+
backtp();
29+
client.interactionManager.attackEntity(client.player, target);
30+
client.player.setPosition(ogpos);
31+
}
32+
}
33+
}
34+
35+
@Override
36+
public void enable() {
37+
38+
}
39+
40+
@Override
41+
public void disable() {
42+
43+
}
44+
45+
@Override
46+
public String getContext() {
47+
return null;
48+
}
49+
50+
@Override
51+
public void onWorldRender(MatrixStack matrices) {
52+
53+
}
54+
55+
@Override
56+
public void onHudRender() {
57+
58+
}
59+
60+
private void backtp(){
61+
Entity target = client.targetedEntity;
62+
if (target == null) {
63+
toggle();
64+
return;
65+
}
66+
67+
Vec3d ppos = target.getPos();
68+
assert client.player != null;
69+
Vec3d tp = Vec3d.fromPolar(0, client.player.getYaw()).normalize().multiply(1);
70+
client.player.setPosition(new Vec3d(ppos.x + tp.x, ppos.y, ppos.z + tp.z));
71+
float yaw = client.player.getYaw();
72+
client.player.setYaw(-yaw);
73+
}
74+
}

0 commit comments

Comments
 (0)