Anuken/Mindustry · error · IllegalArgumentException

Unknown status effect: '

Error message

Unknown status effect: '

What it means

Thrown by the StatusEffect parser when data is a string but locate(ContentType.status, name) returns null, meaning no registered status effect matches the name. Used wherever a bullet/effect references a status by name.

Source

Thrown at core/src/mindustry/mod/ContentParser.java:148

            if(!result.found()){
                warn("Sprite not found: '" + str + "'");
            }
            return result;
        });
        put(Color.class, (type, data) -> {
            if(data.isNumber()){
                int len =  data.asString().length();
                if(len != 6 && len != 8){
                    warn("@Colors should strings, not numbers. Make sure you have quotes around the value, or they will not be parsed correctly: '@'", currentContent == null ? "" : "[" + currentContent.minfo.sourceFile.name() + "]: ", data);
                }
            }
            return Color.valueOf(data.asString());
        });
        put(StatusEffect.class, (type, data) -> {
            if(data.isString()){
                StatusEffect result = locate(ContentType.status, data.asString());
                if(result != null) return result;
                throw new IllegalArgumentException("Unknown status effect: '" + data.asString() + "'");
            }
            StatusEffect effect = new StatusEffect((currentMod == null ? null : currentMod.name + "-") + data.getString("name"));
            effect.minfo.mod = currentMod;
            readFields(effect, data);
            return effect;
        });
        put(UnitCommand.class, (type, data) -> {
            if(data.isString()){
               var cmd = content.unitCommand(data.asString());
               if(cmd != null){
                   return cmd;
               }else{
                   throw new IllegalArgumentException("Unknown unit command name: " + data.asString());
               }
            }else{
                throw new IllegalArgumentException("Unit commands must be strings.");
            }
        });

View on GitHub (pinned to f695ad7e60)

Solutions

  1. Correct the spelling against the registered status names (inspect Vars.content by ContentType.status).
  2. Ensure any mod providing that status loads before this content (fix load order / dependencies).
  3. If you want a brand-new effect, define it inline as an object with a `name` instead of referencing by string.

Example fix

// before
"status": "burnning"
// after
"status": "burning"
Defensive patterns

Strategy: validation

Validate before calling

// Verify a status effect name exists before referencing it.
boolean statusExists(String name) {
    return Vars.content.getByName(ContentType.status, name) != null;
}

Try / catch

try { /* parse content */ }
catch (IllegalArgumentException e) {
    if (e.getMessage().contains("Unknown status effect")) Log.err("Fix status ref: @", e.getMessage());
    else throw e;
}

Prevention

When it happens

Trigger: A mod JSON references a status effect by string (e.g. a bullet's `status` field) whose name is not present in the status content registry.

Common situations: Misspelled status name, referencing a status from another mod that hasn't loaded yet, or a status renamed/removed in a newer game version.

Related errors


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