HitBubbles module

HitBubbles: Minecraft 26.3 cheat module, full source for every implementation (1 client: MelaHack (ThunderHack fork)).

1 implementationRENDER

Clients with this module

Full module source: 1 implementation

Every implementation below is the complete module file, verbatim. Expand a client to read its code.

MelaHack (ThunderHack fork)RENDERsrc/main/java/thunder/hack/features/modules/render/HitBubbles.javaJava · 56 lines · 2.4 KB

Highlights your hits.

SettingsLifeTime
HitBubbles.javaJava · Minecraft 26.2 · 56 lines · 2.4 KB · complete file, verbatimOriginal ↗
1
package thunder.hack.features.modules.render;
2
3
import com.google.common.collect.Lists;
4
import com.mojang.blaze3d.vertex.PoseStack;
5
import com.mojang.math.Axis;
6
import thunder.hack.utility.render.compat.RenderSystem;
7
import meteordevelopment.orbit.EventHandler;
8
import net.minecraft.world.phys.Vec3;
9
import thunder.hack.core.Managers;
10
import thunder.hack.core.manager.client.ModuleManager;
11
import thunder.hack.events.impl.EventAttack;
12
import thunder.hack.injection.accesors.IClientPlayerEntity;
13
import thunder.hack.injection.accesors.IEntity;
14
import thunder.hack.features.modules.Module;
15
import thunder.hack.setting.Setting;
16
import thunder.hack.utility.Timer;
17
18
import java.util.ArrayList;
19
20
import static thunder.hack.utility.render.Render2DEngine.drawBubble;
21
22
public class HitBubbles extends Module {
23
    public HitBubbles() {
24
        super("HitBubbles", Category.RENDER);
25
    }
26
27
    public final Setting<Integer> lifeTime = new Setting<>("LifeTime", 30, 1, 150);
28
29
    private final ArrayList<HitBubble> bubbles = new ArrayList<>();
30
31
    @EventHandler
32
    public void onHit(EventAttack e) {
33
        Vec3 point = Managers.PLAYER.getRtxPoint(((IEntity) mc.player).getLastYaw(), ((IEntity) mc.player).getLastPitch(), ModuleManager.aura.attackRange.getValue());
34
        if (point != null && !e.isPre())
35
            bubbles.add(new HitBubble((float) point.x, (float) point.y, (float) point.z, -((IEntity) mc.player).getLastYaw(), ((IEntity) mc.player).getLastPitch(), new Timer()));
36
    }
37
38
    public void onRender3D(PoseStack matrixStack) {
39
        RenderSystem.disableDepthTest();
40
        ArrayList<HitBubble> bubblesCopy = Lists.newArrayList(bubbles);
41
        bubblesCopy.forEach(b -> {
42
            matrixStack.pushPose();
43
            matrixStack.translate(b.x - mc.getEntityRenderDispatcher().camera.position().x, b.y - mc.getEntityRenderDispatcher().camera.position().y, b.z - mc.getEntityRenderDispatcher().camera.position().z);
44
            matrixStack.mulPose(Axis.YP.rotationDegrees(b.yaw));
45
            matrixStack.mulPose(Axis.XP.rotationDegrees(b.pitch));
46
            drawBubble(matrixStack, -b.life.getPassedTimeMs() / 4f, b.life.getPassedTimeMs() / 1500f);
47
            matrixStack.popPose();
48
        });
49
        RenderSystem.enableDepthTest();
50
        bubbles.removeIf(b -> b.life.passedMs(lifeTime.getValue() * 50));
51
    }
52
53
    public record HitBubble(float x, float y, float z, float yaw, float pitch, Timer life) {
54
    }
55
}
56