{"record":{"id":"04191504d14ed756","repo":"Anuken/Mindustry","slug":"unknown-operation-op-check-partprogress-clas","errorCode":null,"errorMessage":"Unknown operation '${op}', check PartProgress class for a list of methods.","messagePattern":"Unknown operation '(.+?)', check PartProgress class for a list of methods\\.","errorType":"validation","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"core/src/mindustry/mod/ContentParser.java","lineNumber":1178,"sourceCode":"        //I have to hard-code this, no easy way of getting parameter names, unfortunately\n        return switch(op){\n            case \"inv\" -> base.inv();\n            case \"slope\" -> base.slope();\n            case \"clamp\" -> base.clamp();\n            case \"delay\" -> base.delay(data.getFloat(\"amount\"));\n            case \"sustain\" -> base.sustain(data.getFloat(\"offset\", 0f), data.getFloat(\"grow\", 0f), data.getFloat(\"sustain\"));\n            case \"shorten\" -> base.shorten(data.getFloat(\"amount\"));\n            case \"compress\" -> base.compress(data.getFloat(\"start\"), data.getFloat(\"end\"));\n            case \"add\" -> data.has(\"amount\") ? base.add(data.getFloat(\"amount\")) : base.add(parser.readValue(PartProgress.class, data.get(\"other\")));\n            case \"blend\" -> base.blend(parser.readValue(PartProgress.class, data.get(\"other\")), data.getFloat(\"amount\"));\n            case \"mul\" -> data.has(\"amount\") ? base.mul(data.getFloat(\"amount\")) : base.mul(parser.readValue(PartProgress.class, data.get(\"other\")));\n            case \"min\" -> base.min(parser.readValue(PartProgress.class, data.get(\"other\")));\n            case \"sin\" -> base.sin(data.has(\"offset\") ? data.getFloat(\"offset\") : 0f, data.getFloat(\"scl\"), data.getFloat(\"mag\"));\n            case \"absin\" -> base.absin(data.getFloat(\"scl\"), data.getFloat(\"mag\"));\n            case \"mod\" -> base.mod(data.getFloat(\"amount\"));\n            case \"loop\" -> base.loop(data.getFloat(\"time\"));\n            case \"curve\" -> data.has(\"interp\") ? base.curve(parser.readValue(Interp.class, data.get(\"interp\"))) : base.curve(data.getFloat(\"offset\"), data.getFloat(\"duration\"));\n            default -> throw new RuntimeException(\"Unknown operation '\" + op + \"', check PartProgress class for a list of methods.\");\n        };\n    }\n\n    <T> T make(Class<T> type){\n        try{\n            Constructor<T> cons = type.getDeclaredConstructor();\n            cons.setAccessible(true);\n            return cons.newInstance();\n        }catch(Exception e){\n            throw new RuntimeException(e);\n        }\n    }\n\n    private <T> T make(Class<T> type, String name){\n        try{\n            Constructor<T> cons = type.getDeclaredConstructor(String.class);\n            cons.setAccessible(true);\n            return cons.newInstance(name);","sourceCodeStart":1160,"sourceCodeEnd":1196,"githubUrl":"https://github.com/Anuken/Mindustry/blob/f695ad7e60323ebced984fa26d0bcf0bc54296b4/core/src/mindustry/mod/ContentParser.java#L1160-L1196","documentation":"parseProgressOp() applies a named transformation to a PartProgress value (inv, slope, clamp, delay, sustain, shorten, compress, add, blend, mul, min, sin, absin, mod, loop, curve). An unrecognized op string hits the default branch; the message directs the author to the PartProgress class for the canonical method list.","triggerScenarios":"A progress operation name in a unit/block part JSON does not match any case in the switch (e.g. \"ease\", \"lerp\", \"wave\").","commonSituations":"Guessing an op name; using a name from a different build; typo.","solutions":["Use one of the supported ops: inv, slope, clamp, delay, sustain, shorten, compress, add, blend, mul, min, sin, absin, mod, loop, curve.","Cross-check against the PartProgress class methods.","Supply any required parameters (amount, scl, mag, etc.) for the chosen op."],"exampleFix":"// before\n{ \"op\": \"ease\", \"amount\": 0.5 }\n// after\n{ \"op\": \"clamp\", \"amount\": 0.5 }","handlingStrategy":"validation","validationCode":"Set<String> ops = Set.of(\"inv\",\"slope\",\"clamp\",\"delay\",\"sustain\",\"shorten\",\"compress\",\"add\",\"blend\",\"mul\",\"min\",\"sin\",\"absin\",\"mod\",\"loop\",\"curve\");\nif(!ops.contains(op)) throw new IllegalStateException(\"Unsupported PartProgress op '\" + op + \"'\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep the op whitelist synced with the switch and PartProgress methods.","Supply the parameters each op requires."],"tags":["mindustry","modding","json","content-parser","part-progress","unknown-op"],"backgroundTag":null,"analyzedSha":"f695ad7e60323ebced984fa26d0bcf0bc54296b4","analyzedAt":"2026-08-14T04:31:16.262Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}