2018-04-25 13:02:10 +02:00
|
|
|
package com.minelittlepony.pony.data;
|
2016-11-24 08:01:23 +01:00
|
|
|
|
|
|
|
import com.google.gson.JsonDeserializationContext;
|
|
|
|
import com.google.gson.JsonElement;
|
|
|
|
import com.google.gson.JsonParseException;
|
|
|
|
import net.minecraft.client.resources.data.IMetadataSectionSerializer;
|
|
|
|
|
|
|
|
import java.lang.reflect.Type;
|
|
|
|
|
2018-08-27 17:03:43 +02:00
|
|
|
public class PonyDataSerialiser implements IMetadataSectionSerializer<IPonyData> {
|
2016-11-24 08:01:23 +01:00
|
|
|
|
|
|
|
public static final String NAME = "pony";
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getSectionName() {
|
|
|
|
return NAME;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public PonyData deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
|
|
|
|
return context.deserialize(json, PonyData.class);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|