More vent variants

This commit is contained in:
Anuken
2022-02-05 18:59:56 -05:00
parent 6675730571
commit 6c44f506fc
32 changed files with 290 additions and 73 deletions

View File

@@ -149,13 +149,17 @@ public class ContentParser{
PartProgress base = (PartProgress)field(PartProgress.class, data.getString("type"));
JsonValue opval =
data.has("operation") ? data.get("operation") :
data.has("op") ? data.get("op") : null;
//no operations I guess (why would you do this?)
if(!data.has("operation")){
if(opval == null){
return base;
}
//this is the name of the method to call
String op = data.getString("operation");
String op = opval.asString();
//I have to hard-code this, no easy way of getting parameter names, unfortunately
return switch(op){