Old Ff

Create a Minecraft Java Fabric 1.21.11 mod. The player's base default movement speed must be significantly faster than standard vanilla Minecraft (around 150% faster, just like before). However, the momentum system must be highly noticeable: as the player continues to walk or sprint, their speed must increase dramatically and rapidly at a high acceleration rate so the player can easily feel the massive speed buildup. There must be NO maximum speed limit (infinite scaling), allowing the player to become infinitely faster the longer they move. If the player stops moving completely for 5 seconds, the speed must instantly reset back to the fast modded default baseline speed.

Kodari AI
KodariSep 26 at 6:58 am 2
InfiniteMomentum
InfiniteMomentum is a Minecraft Fabric mod that dramatically enhances player movement. The base walking speed is set 150% faster than vanilla, and a dynamic momentum system rapidly accelerates the player's speed as they continue moving, with no maximum velocity cap. Speed increases exponentially the longer the player walks or sprints, creating an intense buildup sensation. If the player remains completely stationary for 5 seconds, their speed instantly resets to the enhanced baseline. The mod features seamless integration with existing movement mechanics, sprinting, and directional input, ensuring a fluid and exhilarating gameplay experience where speed is limited only by the player's willingness to keep moving.
  1. Verify the 1.21.11 tick-event and movement-attribute signatures.

  2. Create the Fabric project skeleton and implement a fast baseline, exponential movement buildup, and five-second stationary reset.

Created the Fabric 1.21.11 mod. It sets the baseline movement speed to 0.25—150% above vanilla’s 0.1—and multiplies it by 1.08 for each tick the player moves. After 100 stationary ticks (5 seconds), speed resets to baseline. A Mixin bypasses vanilla’s 1024 movement-attribute cap so the mod imposes no maximum.

Old Ff

Create a Minecraft Java Fabric 1.21.11 mod. The player's base default movement speed must be moderately faster than standard vanilla Minecraft (around 50% faster). As the player continues to walk or sprint, their speed should noticeably increase at a steady, controlled acceleration rate so they can feel the momentum building up. However, to prevent chunk loading issues and game crashes, there must be a safe maximum speed limit (cap the max speed at around 5 times the vanilla sprint speed). If the player stops moving completely for 5 seconds, the speed must instantly reset back to the modded default baseline fast speed.

Kodari AI
KodariSep 26 at 7:10 am 1
  1. Inspect the existing momentum implementation and project metadata.

  2. Verify the 1.21.11 tick and movement-attribute APIs, then update it with controlled acceleration, a sprint-relative cap, and the five-second reset.

Updated Momentum: the baseline is 0.15 (50% above vanilla’s 0.1 movement-speed base), and horizontal movement adds 0.005 per tick up to a 0.5 base. While sprinting, that caps the movement-speed attribute at 0.65, five times vanilla sprint speed. After 100 stationary ticks (5 seconds), speed resets to baseline. Removed the mixin that bypassed vanilla’s attribute cap.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
5 149
src/main/java/com/kodari/momentum/MomentumMod.java
package com.kodari.momentum;

import java.util.Map;
import java.util.WeakHashMap;

import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents;
import net.minecraft.entity.attribute.EntityAttributeInstance;
import net.minecraft.entity.attribute.EntityAttributes;
import net.minecraft.server.network.ServerPlayerEntity;

public final class MomentumMod implements ModInitializer {
    private static final double BASE_SPEED = 0.15;
    private static final double ACCELERATION_PER_TICK = 0.005;
    private static final double MAX_BASE_SPEED = 0.5;
    private static final double MOVEMENT_EPSILON_SQUARED = 1.0E-8;
    private static final int RESET_DELAY_TICKS = 100;
    private static final Map<ServerPlayerEntity, MomentumState> PLAYER_STATES = new WeakHashMap<>();

    @Override
    public void onInitialize() {
        ServerTickEvents.END_SERVER_TICK.register(server -> {
            for (var player : server.getPlayerManager().getPlayerList()) {
                double x = player.getX();
                double z = player.getZ();
                MomentumState state = PLAYER_STATES.get(player);

                if (state == null) {
                    state = new MomentumState(x, z);
                    PLAYER_STATES.put(player, state);
                } else if ((x - state.lastX) * (x - state.lastX) + (z - state.lastZ) * (z - state.lastZ) > MOVEMENT_EPSILON_SQUARED) {
                    state.speed = Math.min(MAX_BASE_SPEED, state.speed + ACCELERATION_PER_TICK);
                    state.stationaryTicks = 0;
                } else if (state.stationaryTicks < RESET_DELAY_TICKS) {
                    state.stationaryTicks++;
                    if (state.stationaryTicks == RESET_DELAY_TICKS) {
                        state.speed = BASE_SPEED;
                    }
                }

                EntityAttributeInstance movementSpeed = player.getAttributeInstance(EntityAttributes.MOVEMENT_SPEED);
                if (movementSpeed != null) {
                    movementSpeed.setBaseValue(state.speed);
                }

                state.lastX = x;
                state.lastZ = z;
            }
        });
    }

    private static final class MomentumState {
        private double lastX;
        private double lastZ;
        private double speed = BASE_SPEED;
        private int stationaryTicks;

        private MomentumState(double x, double z) {
            this.lastX = x;
            this.lastZ = z;
        }
    }
}