Anuken/Mindustry · error · ArcRuntimeException

Invalid block ID in block plans! Client is likely using an i

Error message

Invalid block ID in block plans! Client is likely using an incorrectly configured mod.

What it means

readClientPlans() resolves each plan's block via Vars.content.block(id). If the ID maps to no registered Block (null), it throws ArcRuntimeException with a message pointing at an incorrectly configured mod. The content registries must agree between sender and receiver.

Source

Thrown at core/src/mindustry/io/TypeIO.java:710

                write.b((byte)plan.rotation);
            }
            writeObject(write, validClientPlanConfig(plan.config) ? plan.config : null);
        }
    }

    public static ClientBuildPlans readClientPlans(Reads read){
        short amount = read.s();

        if(amount == 0) return null;
        if(amount > maxPlayerPreviewPlans) throw new RuntimeException("Too many plans: " + amount);

        var result = new ClientBuildPlans();
        result.ensureCapacity(Math.min(amount, maxPlayerPreviewPlans));
        for(int i = 0; i < amount; i++){
            int x = read.us();
            int y = read.us();
            Block block = Vars.content.block(read.us());
            if(block == null) throw new ArcRuntimeException("Invalid block ID in block plans! Client is likely using an incorrectly configured mod.");
            int rotation = (block.rotate ? read.b() : 0);
            Object config = readClientPlanConfig(read);
            BuildPlan plan = new BuildPlan(x, y, rotation, block, config);
            result.add(plan);
        }

        return result;
    }

    static @Nullable Object readClientPlanConfig(Reads read){
        byte type = read.b();
        return switch(type){
            case 0 -> null;
            case 1 -> read.i();
            case 2 -> read.l();
            case 3 -> read.f();
            case 5 -> content.getByID(ContentType.all[read.b()], read.s());
            case 10 -> read.bool();

View on GitHub (pinned to f695ad7e60)

Solutions

  1. Ensure server and client load exactly the same mods in the same order.
  2. Update mods to matching versions on both sides.
  3. Server: catch ArcRuntimeException and kick with a mod-mismatch message.
Defensive patterns

Strategy: validation

Validate before calling

// Resolve the block id locally before serializing/sending.
Block b = Vars.content.block(id);
if(b == null){
    throw new IllegalStateException("Unknown block id " + id + " — mod/content mismatch");
}

Try / catch

try { ClientBuildPlans p = TypeIO.readClientPlans(read); }
catch(ArcRuntimeException e){ Log.err("Block mismatch in client plans", e); con.kick("Mod mismatch."); }

Prevention

When it happens

Trigger: A client plan references a block ID that the server's content registry does not contain.

Common situations: Client has a mod the server lacks (or vice versa); mod load order differs; block content IDs shifted after a mod update; an out-of-range ID.

Related errors


AI-assisted analysis of Anuken/Mindustry@f695ad7e60 (2026-08-14). Data as JSON: /api/errors/9ebbce3ecb9ca004. Report an issue: GitHub.