Anuken/Mindustry · error · RuntimeException
Planet '${value.getString("planet")}' not found.
Error message
Planet '${value.getString("planet")}' not found. What it means
When a sector preset JSON specifies a "planet", the parser calls locate(ContentType.planet, ...) to find it. If no registered Planet matches the name (including the current-mod-prefixed lookup), locate returns null and the parser throws, because a preset cannot exist without a host planet.
Source
Thrown at core/src/mindustry/mod/ContentParser.java:767
SectorPreset preset;
SectorPreset found = allowPatching ? locate(ContentType.sector, name) : null;
if(found != null){
preset = found;
}else{
if(!value.has("sector") || !value.get("sector").isNumber()) throw new RuntimeException("SectorPresets must have a sector number.");
preset = new SectorPreset(mod + "-" + name, currentMod);
}
currentContent = preset;
read(() -> {
Planet planet = preset.planet == null ? Planets.serpulo : preset.planet;
if(value.has("planet")){
planet = locate(ContentType.planet, value.getString("planet", "serpulo"));
if(planet == null) throw new RuntimeException("Planet '" + value.getString("planet") + "' not found.");
}
if(value.has("sector")){
//clear old value
Sector prev = preset.sector;
if(prev != null && prev.preset == preset){
prev.preset = null;
}
int sector = value.getInt("sector", 0) % planet.sectors.size;
if(!allowPatching && sector > 0 && planet.sectors.get(sector).preset != null){
throw new RuntimeException("Overwriting existing sectors is not allowed.");
}
preset.initialize(planet, sector, true);
}
value.remove("sector");
value.remove("planet");
View on GitHub (pinned to f695ad7e60)
Solutions
- Use the correct internal planet name (default is "serpulo").
- Ensure the planet's content JSON is loaded before this preset (mod load order).
- Register the planet in the same mod with proper ordering.
Example fix
// before "planet": "serpullo" // after "planet": "serpulo"
Defensive patterns
Strategy: validation
Validate before calling
if(value.has("planet")){
String pname = value.getString("planet", "serpulo");
if(Vars.content.planets().find(p -> p.name.equals(pname)) == null){
throw new IllegalStateException("Planet '" + pname + "' is not registered");
}
} Prevention
- Use registered planet names only (serpulo by default).
- Ensure custom planets load before presets referencing them.
When it happens
Trigger: A preset sets "planet": "nonexistent" or misspells a planet name (e.g. "serpulo" vs "serpullo"). The planet must already be registered in content before the preset is parsed.
Common situations: Referencing a custom planet that loads in a later content pass; typo; depending on a planet from an unloaded mod.
Related errors
- SectorPresets must have a sector number.
- Overwriting existing sectors is not allowed.
- Rules must be an object!
- Meshes must be objects.
- No ${type} found with name '${name}'
AI-assisted analysis of Anuken/Mindustry@f695ad7e60 (2026-08-14).
Data as JSON: /api/errors/e66d9c443638dabb.
Report an issue: GitHub.