public class Vector3fTypeAdapter
extends java.lang.Object
implements com.google.gson.JsonSerializer<net.minecraft.util.math.vector.Vector3f>, com.google.gson.JsonDeserializer<net.minecraft.util.math.vector.Vector3f>
Gson
type TypeAdapter
for the Vector3f
class such that it can be converted
to and from Json text when loading to/from Species
data.Constructor and Description |
---|
Vector3fTypeAdapter() |
Modifier and Type | Method and Description |
---|---|
net.minecraft.util.math.vector.Vector3f |
deserialize(com.google.gson.JsonElement json,
java.lang.reflect.Type typeOfT,
com.google.gson.JsonDeserializationContext context) |
com.google.gson.JsonElement |
serialize(net.minecraft.util.math.vector.Vector3f src,
java.lang.reflect.Type typeOfSrc,
com.google.gson.JsonSerializationContext context) |
public net.minecraft.util.math.vector.Vector3f deserialize(com.google.gson.JsonElement json, java.lang.reflect.Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
deserialize
in interface com.google.gson.JsonDeserializer<net.minecraft.util.math.vector.Vector3f>
com.google.gson.JsonParseException
public com.google.gson.JsonElement serialize(net.minecraft.util.math.vector.Vector3f src, java.lang.reflect.Type typeOfSrc, com.google.gson.JsonSerializationContext context)
serialize
in interface com.google.gson.JsonSerializer<net.minecraft.util.math.vector.Vector3f>