Anuken/Mindustry · error · RuntimeException
Unknown matrix transformation: '
Error message
Unknown matrix transformation: '
What it means
Thrown by the Mat3D parser when iterating a matrix object's keys and encountering a name outside the allowed set (translate/trans, scale/scl, rotate/rot, multiply/mul, x/y/z). Unrecognized keys are rejected to prevent silent no-ops.
Source
Thrown at core/src/mindustry/mod/ContentParser.java:300
return new Mat3D().translate(data.getFloat("x", 0f), data.getFloat("y", 0f), data.getFloat("z", 0f));
}
//transform array format
if(data.isArray() && data.size == 3){
return new Mat3D().setToTranslation(new Vec3(data.asFloatArray()));
}
Mat3D mat = new Mat3D();
//TODO this is kinda bad
for(var val : data){
switch(val.name){
case "translate", "trans" -> mat.translate(parser.readValue(Vec3.class, data));
case "scale", "scl" -> mat.scale(parser.readValue(Vec3.class, data));
case "rotate", "rot" -> mat.rotate(parser.readValue(Vec3.class, data), data.getFloat("degrees", 0f));
case "multiply", "mul" -> mat.mul(parser.readValue(Mat3D.class, data));
case "x", "y", "z" -> {}
default -> throw new RuntimeException("Unknown matrix transformation: '" + val.name + "'");
}
}
return mat;
});
put(Vec3.class, (type, data) -> {
if(data.isArray()) return new Vec3(data.asFloatArray());
return new Vec3(data.getFloat("x", 0f), data.getFloat("y", 0f), data.getFloat("z", 0f));
});
put(Sound.class, (type, data) -> {
if(data.isArray()) return new RandomSound(parser.readValue(Sound[].class, data));
if(headless) return Sounds.none; //no reason to fetch on a server
var field = fieldOpt(Sounds.class, data);
//try grabbing it from the asset manager directly (relevant for data patches)
if(field == null) field = Core.assets.getOrNull(data.asString() + ".ogg", Sound.class);
if(field == null) field = Core.assets.getOrNull(data.asString() + ".mp3", Sound.class);View on GitHub (pinned to f695ad7e60)
Solutions
- Use one of the supported transformation keys (translate/trans, scale/scl, rotate/rot, multiply/mul).
- Check spelling and casing of the key.
Example fix
// before
{ "translation": [1, 0, 0] }
// after
{ "translate": [1, 0, 0] } Defensive patterns
Strategy: validation
Validate before calling
// Validate matrix object keys against the allowed transformation set.
static final Set<String> ALLOWED = Set.of("translate","trans","scale","scl","rotate","rot","multiply","mul","x","y","z");
boolean validMatrix(JsonValue v) {
for (var c : v) if (!ALLOWED.contains(c.name)) return false;
return true;
} Prevention
- Use only supported transformation key names.
- Double-check spelling/casing of transform keys.
- Keep the allowed set documented near your content authoring.
When it happens
Trigger: A mod JSON matrix/transformation object contains a key with an unsupported or misspelled transformation name.
Common situations: Typos like "translation" or "scaling", or attempting a transform type Mat3D does not support in this parser.
Related errors
- Attribute definitions must be objects, e.g. {heat: 10}
- Unknown status effect: '
- Unknown unit command name:
- Unit commands must be strings.
- Unknown unit stance name:
AI-assisted analysis of Anuken/Mindustry@f695ad7e60 (2026-08-14).
Data as JSON: /api/errors/83008233fae717af.
Report an issue: GitHub.