Old Ff

Create a Minecraft Java Fabric 1.21.11 mod. 1. The player's baseline default movement speed must be permanently set to match the exact effect of a Speed II Potion (about 40% faster than vanilla). 2. A proper momentum system must track ANY directional key press or player velocity input (including forward walking, sprinting, jumping, and left/right strafing). As long as the player is active in any movement direction, their speed must continuously and smoothly accelerate. 3. Fix friction glitches: Walking on path blocks, grass paths, or changing directions using A/D keys must NOT lower or glitch the speed buildup. 4. Set a safe maximum speed cap at 4 times the vanilla speed to prevent crashes. 5. If the player completely stops all inputs and stands still for exactly 4 seconds, the speed must instantly reset back to the modded Speed II default baseline.

Kodari AI
KodariSep 26 at 10:18 am 2
MomentumMovementOverhaul
A Fabric mod for Minecraft 1.21.11 that permanently sets the player's base movement speed to match Speed II potion effects. Implements a momentum system tracking all directional inputs including walking, sprinting, jumping, and strafing, allowing continuous smooth acceleration while active. Fixes friction glitches on path blocks and direction changes. Caps maximum speed at 4x vanilla to prevent crashes. Resets speed to baseline after 4 seconds of complete inactivity.
  1. Set up the Fabric 1.21.11 project and registration.

  2. Add the server-authoritative speed baseline, smooth acceleration, cap, and 4-second stationary reset.

  3. Sync client movement-key input so blocked movement and strafing still build momentum.

Created the Fabric 1.21.11 mod project. It sets the player’s movement-speed baseline to 1.4× vanilla, smoothly accelerates while movement input or qualifying velocity is active, caps the base speed at 4× vanilla, and resets to baseline after 80 stationary server ticks. Client key input is synced to the server, so strafing and direction changes do not interrupt buildup.

Old Ff

Create a Minecraft Java Fabric 1.21.11 mod. 1. The player's baseline default movement speed must match a Speed II Potion effect. 2. Implementation of a Step-Based Momentum System: As the player walks, sprints, jumps, or strafes, the speed should NOT increase infinitely or exponentially. Instead, after moving continuously for a few seconds, the speed should smoothly increase by just 1 or 2 blocks per second (a small noticeable step) and then temporarily LOCK at that constant speed so it remains controllable and safe. 3. If the player continues moving for a longer period, it can take another small step up after a delay, but it must never become dangerously fast or cause chunk-loading lag. 4. Changing directions (A/D keys) or pressing s or moving backward or walking on path blocks must not glitch or reset this speed. 5. If the player completely stops moving and stands still for exactly 4 seconds, the speed must instantly reset back to the baseline Speed II default.

Kodari AI
KodariSep 26 at 10:23 am 1
  1. Inspect the existing movement and input-sync implementation.

  2. Replace continuous speed growth with delayed, fixed-size speed steps and a safe cap.

  3. Preserve directional input handling and the exact 4-second idle reset.

Updated the momentum system: the baseline remains 1.4× vanilla movement speed (the Speed II attribute multiplier). After 3 seconds of movement, speed ramps smoothly to a new step over 1 second, then holds steady; further steps come every 4 seconds, each adding about 1 block/second, up to a 4× vanilla base-speed cap.

Direction changes and surface friction don’t reset the buildup. After 80 server ticks with no movement input, grounded, and effectively stationary, speed resets to baseline.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
7 246
src/client/java/com/kodari/momentum/client/MomentumModClient.java
package com.kodari.momentum.client;

import com.kodari.momentum.MovementInputPayload;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
import net.minecraft.client.MinecraftClient;

public class MomentumModClient implements ClientModInitializer {
    @Override
    public void onInitializeClient() {
        ClientTickEvents.END_CLIENT_TICK.register(MomentumModClient::sendMovementInput);
    }

    private static void sendMovementInput(MinecraftClient client) {
        if (client.player == null) {
            return;
        }

        boolean active = client.currentScreen == null && (
                client.options.forwardKey.isPressed()
                        || client.options.backKey.isPressed()
                        || client.options.leftKey.isPressed()
                        || client.options.rightKey.isPressed()
                        || client.options.jumpKey.isPressed()
        );
        ClientPlayNetworking.send(new MovementInputPayload(active));
    }
}