AspectRatio module

AspectRatio: Minecraft 26.3 cheat module, full source for every implementation (2 clients: MelaHack (ThunderHack fork), Combatant).

2 implementationsRENDERVISUALS

Full module source: 2 implementations

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/AspectRatio.javaJava · 13 lines · 330 B

Allows you to change the screen aspect ratio.

SettingsRatio
AspectRatio.javaJava · Minecraft 26.2 · 13 lines · 330 B · complete file, verbatimOriginal ↗
1
package thunder.hack.features.modules.render;
2
3
import thunder.hack.features.modules.Module;
4
import thunder.hack.setting.Setting;
5
6
public class AspectRatio extends Module {
7
    public AspectRatio() {
8
        super("AspectRatio", Category.RENDER);
9
    }
10
11
    public Setting<Float> ratio = new Setting<>("Ratio", 1.78f, 0.1f, 5f);
12
}
13
CombatantVISUALSsrc/main/java/combatant/client/features/module/modules/visuals/AspectRatio.javaJava · 63 lines · 1.9 KB
SettingsaspectMultiplier
AspectRatio.javaJava · Minecraft 26.2 · 63 lines · 1.9 KB · complete file, verbatimOriginal ↗
1
/*
2
 * This file is part of the Combatant Client distribution.
3
 * Copyright (c) 2026 pivosos2007.
4
 *
5
 * Licensed under the GNU General Public License v3.0.
6
 */
7
8
package combatant.client.features.module.modules.visuals;
9
10
import net.minecraft.util.Mth;
11
import org.joml.Matrix4f;
12
import combatant.client.config.values.NumberValue;
13
import combatant.client.features.module.Module;
14
import combatant.client.features.module.ModuleCategory;
15
import combatant.client.features.module.ModuleInfo;
16
import combatant.client.features.module.Modules;
17
18
//todo Description
19
@ModuleInfo(
20
        id = "aspectratio",
21
        displayName = "AspectRatio",
22
        category = ModuleCategory.VISUALS
23
)
24
public final class AspectRatio extends Module {
25
    private static final float EPSILON = 1.0e-4f;
26
27
    private final NumberValue<Float> aspect =
28
            num(
29
                    "aspectMultiplier",
30
                    "aspect_multiplier",
31
                    1.0f,
32
                    0.2f,
33
                    3.0f
34
            );
35
36
    public float getMultiplier() {
37
        if (!isEnabled()) return 1.0f;
38
        return Mth.clamp(aspect.get(), 0.2f, 3.0f);
39
    }
40
41
    public static float currentMultiplier() {
42
        AspectRatio module = Modules.get(AspectRatio.class);
43
        if (module == null || !module.isEnabled()) return 1.0f;
44
        return module.getMultiplier();
45
    }
46
47
    public static boolean isProjectionModified() {
48
        return Math.abs(currentMultiplier() - 1.0f) > EPSILON;
49
    }
50
51
    public static void applyToProjection(Matrix4f projection) {
52
        applyToProjection(projection, currentMultiplier());
53
    }
54
55
    public static void applyToProjection(Matrix4f projection, float multiplier) {
56
        if (projection == null) return;
57
        float mul = Mth.clamp(multiplier, 0.2f, 3.0f);
58
        if (Math.abs(mul - 1.0f) <= EPSILON) return;
59
60
        projection.m00(projection.m00() * mul);
61
    }
62
}
63