Class GeckoLibSerializer
java.lang.Object
dev.kosmx.playerAnim.core.data.gson.GeckoLibSerializer
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<List<KeyframeAnimation>>
public class GeckoLibSerializer
extends Object
implements com.google.gson.JsonDeserializer<List<KeyframeAnimation>>
Serialize movements as emotes from GeckoLib format
...
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) static List<KeyframeAnimation> deserialize(com.google.gson.JsonObject node) static TypeDeprecated.getTargetVec(KeyframeAnimation.StateCollection stateCollection, TransformType type) static com.google.gson.JsonArraygetVector(com.google.gson.JsonElement element) static Stringsnake2Camel(String original) Convert snake_case_string to camelCaseString
-
Field Details
-
GSON
@Internal public static final com.google.gson.Gson GSON
-
-
Constructor Details
-
GeckoLibSerializer
public GeckoLibSerializer()
-
-
Method Details
-
getListedTypeToken
Deprecated.TypeToken helper for serializing- Returns:
- TypeToken for animation deserialization
-
deserialize
public List<KeyframeAnimation> deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException - Specified by:
deserializein interfacecom.google.gson.JsonDeserializer<List<KeyframeAnimation>>- Throws:
com.google.gson.JsonParseException
-
deserialize
-
getVector
public static com.google.gson.JsonArray getVector(com.google.gson.JsonElement element) -
snake2Camel
Convert snake_case_string to camelCaseString- Parameters:
original- string_to_convert- Returns:
- camelCaseString
-
getTargetVec
public static KeyframeAnimation.StateCollection.State[] getTargetVec(KeyframeAnimation.StateCollection stateCollection, TransformType type)
-