TPSSync module

TPSSync: Minecraft 26.3 cheat module, full source for every implementation (1 client: Combatant).

1 implementationCOMBAT

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.

CombatantCOMBATsrc/main/java/combatant/client/features/module/modules/combat/TPSSync.javaJava · 44 lines · 1.5 KB
Settingstpssync_start_tps
TPSSync.javaJava · Minecraft 26.2 · 44 lines · 1.5 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.combat;
9
10
import net.minecraft.client.Minecraft;
11
import combatant.client.config.values.BooleanValue;
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.util.player.NetworkStatsUtil;
17
18
//todo Description
19
@ModuleInfo(
20
        id = "tpssync",
21
        displayName = "TPSSync",
22
        category = ModuleCategory.COMBAT
23
)
24
public class TPSSync extends Module {
25
26
    private static final String SETTING_START_TPS = "start_tps";
27
    private final Minecraft mc = Minecraft.getInstance();
28
    private final BooleanValue enabled =
29
            new BooleanValue("tpssync_enabled", true);
30
    private final NumberValue<Float> startTps =
31
            num("tpssync_start_tps", SETTING_START_TPS, 19.0f, 1.0f, 20.0f);
32
33
    /** сколько серверных тиков прошло за клиентский */
34
    public float getServerTickDelta() {
35
        if (!isEnabled() || !enabled.get()) return 1.0f;
36
        if (mc == null || mc.level == null) return 1.0f;
37
38
        float tps = NetworkStatsUtil.getTps(mc);
39
        if (tps >= startTps.get()) return 1.0f;
40
41
        return Math.max(0.0f, tps / 20.0f);
42
    }
43
}
44