Anuken/Mindustry · error · RuntimeException
Team field missing.
Error message
Team field missing.
What it means
A team content entry MUST supply a "team" sub-object (parsed by the Team classParser) from which the actual Team reference is derived. Without it, there is no Team to bind the TeamEntry to, so the parser throws before constructing anything.
Solutions
- Add a "team" object to the team JSON (it carries team properties like color, name).
- Confirm the key is literally "team".
Example fix
// before
{ "name": "crimson" }
// after
{ "team": { "name": "crimson", "color": "ff3333" } } Defensive patterns
Strategy: validation
Validate before calling
if(!value.has("team")){
throw new IllegalStateException("team content entry requires a 'team' object");
} Prevention
- Always nest the team definition under the "team" key.
- Match the key name exactly.
When it happens
Trigger: A team JSON omits the "team" key entirely. The guard is the else branch of value.has("team").
Common situations: New team entries missing the required nested team config; misnaming the key (e.g. "teamId").
Related errors
- : not found
- You are missing a " ". It must be added before the file can…
- Blocks cannot be larger than
- Content JSON must be an object, not a single value.
- Invalid unit type: ' '. Must be…
AI-assisted analysis of Anuken/Mindustry@f695ad7e60 (2026-08-14).
Data as JSON: /api/errors/529bdd25ff78494f.
Report an issue: GitHub.
Appendix: source
Thrown at core/src/mindustry/mod/ContentParser.java:869
Log.err(e);
}
};
}
//always one sector right now...
planet.sectors.add(new Sector(planet, Ptile.empty));
currentContent = planet;
read(() -> readFields(planet, value));
return planet;
},
ContentType.team, (TypeParser<TeamEntry>)(mod, name, value) -> {
TeamEntry entry;
Team team;
if(value.has("team")){
team = (Team)classParsers.get(Team.class).parse(Team.class, value.get("team"));
}else{
throw new RuntimeException("Team field missing.");
}
value.remove("team");
if(allowPatching && locate(ContentType.team, name) != null){
entry = locate(ContentType.team, name);
readBundle(ContentType.team, name, value);
}else{
readBundle(ContentType.team, name, value);
entry = new TeamEntry(mod + "-" + name, team);
}
currentContent = entry;
read(() -> readFields(entry, value));
return entry;
}
);
Prov<Unit> unitType(JsonValue value){
if(value == null) return UnitEntity::create;View on GitHub (pinned to f695ad7e60)