{"record":{"id":"5ec5d1884afd10d9","repo":"Anuken/Mindustry","slug":"unknown-team","errorCode":null,"errorMessage":"Unknown team: ","messagePattern":"Unknown team: ","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"core/src/mindustry/mod/ContentParser.java","lineNumber":389,"sourceCode":"        });\n        put(Consume.class, (type, data) -> {\n            var oc = resolve(data.getString(\"type\", \"\"), Consume.class);\n            data.remove(\"type\");\n            var consume = make(oc);\n            readFields(consume, data);\n            return consume;\n        });\n        put(ConsumeLiquidBase.class, (type, data) -> {\n            var oc = resolve(data.getString(\"type\", \"\"), ConsumeLiquidBase.class);\n            data.remove(\"type\");\n            var consume = make(oc);\n            readFields(consume, data);\n            return consume;\n        });\n        put(Team.class, (type, data) -> {\n            if(data.isString()){\n                Team out = Structs.find(Team.baseTeams, t -> t.name.equals(data.asString()));\n                if(out == null) throw new IllegalArgumentException(\"Unknown team: \" + data.asString());\n                return out;\n            }else if(data.isNumber()){\n                if(data.asInt() >= Team.all.length || data.asInt() < 0){\n                    throw new IllegalArgumentException(\"Unknown team: \" + data.asString());\n                }\n                return Team.get(data.asInt());\n            }else{\n                throw new IllegalArgumentException(\"Unknown team: \" + data.asString() + \". Team must either be a string or a number.\");\n            }\n        });\n    }};\n    /** Stores things that need to be parsed fully, e.g. reading fields of content.\n     * This is done to accommodate binding of content names first.*/\n    private Seq<Runnable> reads = new Seq<>();\n    private Seq<Runnable> postreads = new Seq<>();\n    private ObjectSet<Object> toBeParsed = new ObjectSet<>();\n\n    @Nullable LoadedMod currentMod;","sourceCodeStart":371,"sourceCodeEnd":407,"githubUrl":"https://github.com/Anuken/Mindustry/blob/f695ad7e60323ebced984fa26d0bcf0bc54296b4/core/src/mindustry/mod/ContentParser.java#L371-L407","documentation":"Thrown by the Team parser when data is a string but Structs.find over Team.baseTeams by name returns null. Only the built-in base teams can be matched by name; custom teams are not name-addressable this way.","triggerScenarios":"A mod JSON team field is a string that does not equal any base team's name (e.g. misspelled or a custom team name).","commonSituations":"Typo in a base team name, or attempting to reference a custom team by name (only numeric IDs work for those).","solutions":["Use a valid base team name string (e.g. sharded, crux, malig, derelict, green, blue).","For custom teams, use the numeric team ID instead of a name."],"exampleFix":"// before\n\"team\": \"shardedd\"\n// after\n\"team\": \"sharded\"","handlingStrategy":"validation","validationCode":"// Verify a base team name is valid before referencing.\nboolean baseTeamExists(String name) {\n    return Structs.find(Team.baseTeams, t -> t.name.equals(name)) != null;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use exact base team name strings.","Use numeric IDs for custom teams, not names.","Keep the base team name list documented."],"tags":["modding","json","content-parser","team"],"backgroundTag":null,"analyzedSha":"f695ad7e60323ebced984fa26d0bcf0bc54296b4","analyzedAt":"2026-08-14T04:31:16.262Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}