Memeware's Timer is a two-line tick-rate scaler: a LWJEB handler consumer on UpdateEvent writes the module's Timer setting straight into mc.timer.timerSpeed, and onDisable restores 1F.
Memeware's Timer is a two-line tick-rate scaler: a LWJEB handler consumer on UpdateEvent writes the module's Timer setting straight into mc.timer.timerSpeed, and onDisable restores 1F. The setting spans 0.1 to 10 with a default of 1, so the module both accelerates and slows the client's game loop. Because the vanilla Timer multiplies the tick advance by timerSpeed, every serverbound packet that the loop emits per tick scales with it, and the C03 movement stream is the first thing the server notices.
Tick-rate scaling
The vanilla net.minecraft.util.Timer.updateTimer() accumulates elapsedPartialTicks from the frame delta times timerSpeed times ticksPerSecond (20), then splits the integer part into elapsedTicks. Minecraft's main loop calls updateTimer once per frame and runs that many game ticks, so a timerSpeed of 2 makes the client execute roughly 40 game ticks per real second while the server still ticks at 20. The module never touches packet construction; it only rewrites the speed field, and every tick the client sends its C03 look or position packet, so the wire rate follows the speed multiplier directly.
Wire fingerprint
Each accelerated tick runs EntityPlayerSP.func_175161_p, which fires the pre UpdateEvent and then sends one C03 variant (C04 position, C05 look, C06 position-look) per tick based on the position and look deltas. At 2x the server receives roughly 40 movement packets per second instead of 20, and the player advances twice per server tick. Keepalive echoes and transaction confirmations ride the same loop, but their rate is set by the server's own S00 and S32 cadence, so the movement stream is the cleanest signal of the speed-up.
Detection surface
The rate checks and clock checks that catch a speed-up all live on the C00 and C0F corpora. NCP MorePackets caps the movement packet rate at 22 per second with a 20 ideal. NCP KeepAliveFrequency keeps the keepalive echo ledger that other checks gate on. Frequency TimerA measures the inter-movement delay against the 50ms tick expectation and runs only while a keepalive echo is accepted. Grim Timer accrues 50ms of balance per movement packet and compares it against a clock anchored to the C0F transaction stream, so ping fluctuations do not hide the drift.
public Consumer<UpdateEvent> eventConsumer0 = (event) -> {
18
mc.timer.timerSpeed = this.getDouble("Timer");
19
};
20
21
@Override
22
public void onDisable() {
23
mc.timer.timerSpeed = 1F;
24
}
25
}
What this file does
The entire module is this file. The constructor registers a double setting named Timer with range 0.1 to 10 and default 1, and the handler consumer is the only logic: every UpdateEvent writes the setting into mc.timer.timerSpeed. The update event fires once per client tick from EntityPlayerSP.func_175161_p, so the speed value is re-asserted every tick, which also makes the module self-correcting if another module or the game resets the field. onDisable restores the vanilla 1F so the speed-up or slow-down never leaks into the next session.
The setting is a plain multiplier on the vanilla tick clock. Values above 1 raise the movement packet rate and are the classic speed-hack use; values below 1 slow the loop, which is used to stretch timing-sensitive sequences. The double setting is read fresh every event, so changing it in the GUI applies on the next tick with no rebind step.
This is the vanilla class the module mutates. updateTimer() computes the frame delta var13, clamps it to [0, 1], and accumulates elapsedPartialTicks += var13 * timerSpeed * ticksPerSecond, then drains the integer part into elapsedTicks. The timerSpeed field is the only thing the module writes, and because the field multiplies the whole accumulation, a speed of 2 doubles the number of game ticks per real second. The constructor takes ticksPerSecond = 20, the vanilla tick rate.
The module writes the field every update event rather than once at toggle time, so any external reset of timerSpeed (server-side teleport handling, another module, a game-mode change) is overwritten on the next tick. onDisable restoring 1F is what keeps the scale from persisting across toggles.
anticheat Countering Checks
The anticheat code that detects or counters the techniques this module uses. Full source, with the detection mechanism explained below each box.
anticheat MorePackets (movement packet rate)
MorePackets.java127 lines · Java
1
/*
2
* This program is free software: you can redistribute it and/or modify
3
* it under the terms of the GNU General Public License as published by
4
* the Free Software Foundation, either version 3 of the License, or
5
* (at your option) any later version.
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* TODO: Harmonize with MovingUtil.getApplicableSetBackLocation
108
* (somehow include the desired set back type / loc / context).
109
*/
110
return data.hasMorePacketsSetBack() ? data.getMorePacketsSetBack() : data.getSetBack(to); // TODO
111
}
112
}
113
else if (allowSetSetBack && data.getMorePacketsSetBackAge() > cc.morePacketsSetBackAge) {
114
// Update the set back location. (CHANGED to only update, if not a violation.)
115
// (Might update whenever newTo == null)
116
data.setMorePacketsSetBack(from);
117
if (debug) {
118
debug(player, "Update set back (morepackets) to from.");
119
}
120
}
121
122
// No set back.
123
return null;
124
125
}
126
127
}
How it counteracts this module
MorePackets counts serverbound movement packets content-blind. MovingListener invokes morePackets.check on every processed move, which feeds NetStatic.morePacketsCheck with data.morePacketsFreq, an ActionFrequency with 500ms buckets (MovingData line 321) over the configured window, and cc.morePacketsEPSMax, default 22 packets per second with 20 ideal (DefaultConfig lines 458-459). A second ActionFrequency(12, 5000) (MovingData line 322) backs a burst path with defaults of 15 packets in half a second, 10 direct-burst events, and 95 burst events per minute (DefaultConfig lines 460-462). A violation returns the MorePackets set-back location, seeded from the SurvivalFly set-back when one exists, so the player snaps back on top of the movement check.
A timer speed of 2 raises the C03 stream to about 40 packets per second, nearly double the 22 per second ceiling, so the window accumulator runs positive for the whole window and the default actions cancel at vl > 2. Even a speed of 1.2 pushes the average toward the ceiling, and the half-second burst path catches a concentrated flush. The tolerance is real: speeds at or slightly above 1.1 keep the average inside the window most of the time because empty buckets burn the excess, so the check is not a hard edge at 1.0; sustained use above roughly 1.1 is what accumulates.
KeepAliveFrequency replaces the accept-any-echo model with a timed ledger over the C00 stream. Every incoming echo is timestamped into data.keepAliveFreq (an ActionFrequency with 20 one-second buckets), the check bails while a reply is still expected unless the id is a duplicate (lines 44-46), and a newest-bucket score above 1 flags a violation with a full-window score comparison (lines 48-58). The modeled-boundary-burst helpers (lines 63-83) forgive small monotonic id bursts when outgoing tracking is unavailable, so the check is tuned to reject only real floods.
Against the timer module the ledger is the gatekeeper, not the main trigger. A 2x loop does not raise the echo rate by itself, because the server issues S00 at its own cadence and the client answers each one; the check fires when the accelerated loop drains a batched delivery of keepalives in one tick, landing several echoes in the same second, or when a reply arrives with a duplicate or aged-out id that the tracking window no longer recognizes. Its real value for the timer family is that Frequency TimerA refuses to run unless a keepalive was accepted in the current tick window, so a module that floods or starves the echo stream disables the transaction-clock checks that would otherwise catch it.
private final MovingStats movingStats = new MovingStats(20);
14
15
private long lastFlying = 0L;
16
private long allowance = 0;
17
18
public TimerA(final PlayerData playerData) {
19
super(playerData);
20
}
21
22
@Override
23
public void process(final Object object) {
24
final boolean flying = object instanceof WrappedPlayInFlying;
25
26
if (flying) {
27
// Get the server ticks and the current time for the check processing
28
final int serverTicks = Frequency.INSTANCE.getTickManager().getTicks();
29
final long now = System.currentTimeMillis();
30
31
/*
32
* We want to make sure the player is not exempt from any of the actions below.
33
* Additionally, we want to ensure that the player is not lagged out and accepted a keepalive.
34
* Thankfully, we shouldn't have any bypasses because of this because of PingSpoof.
35
*/
36
final boolean exempt = this.isExempt(ExemptType.TPS, ExemptType.TELEPORTING, ExemptType.LAGGING);
37
final boolean accepted = playerData.getConnectionManager().getKeepAliveTime(serverTicks).isPresent();
38
39
/*
40
* Basic theory is that the player is going to deviate through 50ms without many changes to that
41
* basic range of [48, 50]. So we're running a deviation check to check how much the player has deviated
42
* from the basic limit of 50ms (square-root of 50 is 7.07). We're also making sure the player is actually
43
* increasing speed through an allowance that accounts for the tick expected versus the tick received.
44
*/
45
handle: {
46
if (exempt || !accepted) break handle;
47
48
// Get the delay from the current and the last flying packet
49
final long delay = now - lastFlying;
50
51
// Add the delay to the MovingStats to analyze our input
52
movingStats.add(delay);
53
54
/*
55
* As mentioned above, the basic threshold of the player is the square-root of 50. Because
56
* the expected tick should always be 50ms. To check how much the player has deviated from that
57
* single point, we're using it as a threshold value in the deviation check below.
58
*/
59
final double threshold = 7.07;
60
final double deviation = movingStats.getStdDev(threshold);
61
62
// We're making sure the deviation check processed and the deviation is smaller than the threshold.
63
if (deviation < threshold && !Double.isNaN(deviation)) {
64
/*
65
* I am sure many of you have seen this before, and it's essentially the most basic version of
66
* a balance / allowance check. We're increasing the allowance with the expected amount of 50,
67
* and we're subtracting from it the actual delay received. This will act as our "buffer" system.
68
*/
69
allowance += 50;
70
allowance -= delay;
71
72
// Our previous threshold can act as one here too.
73
if (allowance > Math.floor(threshold)) fail();
74
}
75
76
else {
77
allowance = 0;
78
}
79
}
80
81
this.lastFlying = now;
82
}
83
}
84
}
How it counteracts this module
Frequency TimerA measures the delay between consecutive C03 flying packets against the 50ms tick expectation. Each movement adds the inter-packet delay to a MovingStats(20) window, and the check runs only when the player is not exempt (TPS, teleporting, lagging) and the connection manager has an accepted keepalive for the current server tick (lines 36-37). If the delay standard deviation stays under 7.07 (the square root of the 50ms expectation), an allowance accumulates 50ms per packet minus the measured delay, and a fail fires once the allowance exceeds the floor of that threshold (lines 59-74).
A 2x timer halves the inter-movement delay to about 25ms, so each packet adds roughly 25ms to the allowance and the fail threshold is crossed on the second packet. Even 1.1x produces 45ms delays that accumulate the remaining 5ms per packet. The slow side is the blind spot: a sub-1x timer stretches delays past 50ms, which drains the allowance instead of filling it, so slow-motion modes pass this check by design. The keepalive gate is also a hard dependency, so the check goes dormant if the echo stream is broken.
Grim Timer accrues 50ms of balance for every counted movement packet and flags when the balance passes real time (timerBalanceRealTime > System.nanoTime(), lines 74-90), canceling the packet and running a setback. The clock it compares against is not wall time but the player's own transaction-anchored clock: knownPlayerClockTime is refreshed only after a movement followed by a transaction (PONG or WINDOW_CONFIRMATION, the C0F), so ping fluctuations and server lag do not shift the baseline (lines 47-64, 99-102). The drift allowance clockDrift defaults to 120ms (line 111) and a limitFallBehind clamps how far behind real time the balance may sit.
At 2x the balance accrues 50ms per packet while only 25ms of real time passes, so the surplus exceeds even the 120ms drift within a handful of packets and the check flags almost immediately. The check is deliberately one-directional: a slow timer makes the balance fall behind, which the drift clamp absorbs, so the module's sub-1x range is invisible here. Standing still also resets the drift (the movement stream stops accruing), which is why idle periods before the speed-up do not accumulate.