Mod bugfixes
This commit is contained in:
@@ -8,6 +8,7 @@ import mindustry.ctype.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.world.*;
|
||||
import mindustry.world.meta.*;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
@@ -111,6 +112,18 @@ public class JsonIO{
|
||||
}
|
||||
});
|
||||
|
||||
json.setSerializer(Attribute.class, new Serializer<>(){
|
||||
@Override
|
||||
public void write(Json json, Attribute object, Class knownType){
|
||||
json.writeValue(object.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Attribute read(Json json, JsonValue jsonData, Class type){
|
||||
return Attribute.get(jsonData.asString());
|
||||
}
|
||||
});
|
||||
|
||||
json.setSerializer(Item.class, new Serializer<>(){
|
||||
@Override
|
||||
public void write(Json json, Item object, Class knownType){
|
||||
|
||||
Reference in New Issue
Block a user