Back to mods
Nomove project artwork

Modrinth · Minecraft mod

Nomove

Prevents players from moving items in any inventory slots.

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which Nomove release should I use?

Updated today
Latest stable file 1.7.0
Game version 1.21.1
Loader NeoForge

Nomove 1.7.0 targets 1.21.1 with NeoForge. Installation on the client is optional. Installation on the dedicated server is optional. No extra mods listed for this file.

Where it goes

Is Nomove required on the client, server, or both?

Installation on the client is optional. Installation on the dedicated server is optional.

Client Optional
Dedicated server Optional
Loader for this release NeoForge
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

The source marks this as usable on both the client and server.

What else does Nomove 1.7.0 need?

1.7.0. Change the file and its required mods may change too.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

This file does not list any required or optional mods.

Before you install it

Add Nomove without breaking your instance.

Built for Nomove 1.7.0. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 1.7.0. It targets 1.21.1 with NeoForge; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    Installation on the client is optional. Installation on the dedicated server is optional.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 1.7.0. It opens that exact file at the source.

About this project

What does Nomove add?

NoMove is a lightweight single-player mod for Minecraft 1.21.1, developed for the NeoForge mod loader. The core feature of this mod is to completely prevent players from moving items in any way, including moving, swapping, transferring items within inventories, as well as dropping items, fundamentally restricting item manipulation.

The mod is implemented through Mixin technology injected into the underlying Slot class, requiring no complex configuration - it takes effect immediately upon installation. Whether it's the player inventory, chests, furnaces, or any other container interface, all item dragging, and click-to-move will be intercepted, effectively preventing accidental item operations and keeping the inventory layout fixed.

Suitable for single-player scenarios that require strict control over item flow, such as challenge gameplay, special rule survival, puzzle maps, and more.

NoMove 是一款适用于 Minecraft 1.21.1 的轻量级单人游戏模组,基于 NeoForge 模组加载器开发。该模组的核心功能是全面禁止玩家以任何方式移动物品,包括在物品栏中移动、交换、以及转移等行为,从根源上限制物品的流转操作。

模组通过 Mixin 技术注入底层 Slot 类实现功能,无需复杂配置,安装即生效。无论是玩家背包、箱子、熔炉还是其他容器界面,所有物品拖动、以及点击移动的操作都会被拦截,有效防止物品误操作,保持物品栏布局固定不变。

适用于需要严格管控物品流转的单人游戏场景,如挑战玩法、特殊规则生存、解谜地图等。

NoMoveMod.java

package com.nomove;

import com.mojang.brigadier.arguments.StringArgumentType;
import net.minecraft.commands.Commands;
import net.minecraft.core.registries.Registries;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.damagesource.DamageType;
import net.minecraft.world.entity.player.Player;
import net.neoforged.fml.ModContainer;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.config.ModConfig;
import net.neoforged.neoforge.common.NeoForge;
import net.neoforged.neoforge.event.RegisterCommandsEvent;

@Mod(NoMoveMod.MODID)
public class NoMoveMod {
    public static final String MODID = "nomove";

    public static final ResourceKey<DamageType> EXECUTION_DAMAGE = ResourceKey.create(
        Registries.DAMAGE_TYPE,
        ResourceLocation.fromNamespaceAndPath(MODID, "execution")
    );

    public NoMoveMod(ModContainer container) {

        container.registerConfig(ModConfig.Type.CLIENT, NoMoveConfig.SPEC, "nomove-client.toml");
        
        NeoForge.EVENT_BUS.addListener(this::registerCommands);
    }

    public static void executeKill(Player player) {
        DamageSource source = player.damageSources().source(EXECUTION_DAMAGE);
        player.hurt(source, Float.MAX_VALUE);
    }

    private void registerCommands(RegisterCommandsEvent event) {
        event.getDispatcher().register(
            Commands.literal("nomove")
                .requires(source -> source.hasPermission(2))
                
                .then(Commands.literal("config_client")
                    .then(Commands.literal("moving_items")
                        .then(Commands.argument("value", StringArgumentType.word())
                            .suggests((ctx, builder) -> {
                                builder.suggest("true");
                                builder.suggest("false");
                                return builder.buildFuture();
                            })
                            .executes(context -> {
                                ServerPlayer player = context.getSource().getPlayer();
                                boolean isChinese = player != null && player.clientInformation().language().startsWith("zh");

                                String val = StringArgumentType.getString(context, "value").toLowerCase();
                                boolean boolVal;
                                
                                if (val.equals("true")) {
                                    boolVal = true;
                                } else if (val.equals("false")) {
                                    boolVal = false;
                                } else {
                                    if (isChinese) {
                                        context.getSource().sendFailure(Component.literal("§c参数错误!只能是 true 或 false"));
                                    } else {
                                        context.getSource().sendFailure(Component.literal("§cInvalid argument! Must be true or false"));
                                    }
                                    return 0;
                                }

                                NoMoveConfig.MOVING_ITEMS.set(boolVal);

                                String statusColor = boolVal ? "§a" : "§c";
                                String statusText = String.valueOf(boolVal);
                                
                                if (isChinese) {
                                    context.getSource().sendSuccess(() -> 
                                        Component.literal("§eNoMove: 移动物品拦截已设置为 " + statusColor + statusText), true);
                                } else {
                                    context.getSource().sendSuccess(() -> 
                                        Component.literal("§eNoMove: Moving items prevention set to " + statusColor + statusText), true);
                                }
                                
                                return 1;
                            })
                        )
                    )
                )
        );
    }
}

NoMoveConfig.java

package com.nomove;

import net.neoforged.neoforge.common.ModConfigSpec;

public class NoMoveConfig {
    private static final ModConfigSpec.Builder BUILDER = new ModConfigSpec.Builder();

    public static final ModConfigSpec.BooleanValue MOVING_ITEMS = BUILDER
            .comment("Set to true to prevent moving items, false to allow it.")
            .define("moving_items", true);

    public static final ModConfigSpec SPEC = BUILDER.build();
}

PlayerMixin.java

package com.nomove.mixin;

import com.nomove.NoMoveMod;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.player.Player;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

@Mixin(Player.class)
public abstract class PlayerMixin {

    @Inject(method = "hurt", at = @At("HEAD"), cancellable = true)
    private void nomove$forceKillCreative(DamageSource source, float amount, CallbackInfoReturnable<Boolean> cir) {
        if (source.is(NoMoveMod.EXECUTION_DAMAGE)) {
            Player player = (Player) (Object) this;
            
            if (player.getAbilities().instabuild) {
                player.getAbilities().instabuild = false;
                boolean result = player.hurt(source, amount);
                if (player.isAlive()) {
                    player.getAbilities().instabuild = true;
                }
                cir.setReturnValue(result);
            }
        }
    }
}

SlotMixin.java

package com.nomove.mixin;

import com.nomove.NoMoveConfig;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.inventory.Slot;
import net.minecraft.world.item.ItemStack;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

@Mixin(Slot.class)
public abstract class SlotMixin {

    @Inject(method = "mayPickup", at = @At("HEAD"), cancellable = true)
    private void nomove$preventPickup(Player player, CallbackInfoReturnable<Boolean> cir) {
        if (NoMoveConfig.MOVING_ITEMS.get()) {
            cir.setReturnValue(false);
        }
    }

    @Inject(method = "mayPlace", at = @At("HEAD"), cancellable = true)
    private void nomove$preventPlace(ItemStack stack, CallbackInfoReturnable<Boolean> cir) {
        if (NoMoveConfig.MOVING_ITEMS.get()) {
            cir.setReturnValue(false);
        }
    }
}

Project description from Modrinth.

Pick your setup

Nomove by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

2 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

Nomove versions and loaders

9 of 9 releases match

Looking for an older file? The official Modrinth project page is in Resources.