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 Details

    • GSON

      @Internal public static final com.google.gson.Gson GSON
  • Constructor Details

    • GeckoLibSerializer

      public GeckoLibSerializer()
  • Method Details

    • getListedTypeToken

      @Deprecated @Internal public static Type 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:
      deserialize in interface com.google.gson.JsonDeserializer<List<KeyframeAnimation>>
      Throws:
      com.google.gson.JsonParseException
    • deserialize

      public static List<KeyframeAnimation> deserialize(com.google.gson.JsonObject node)
    • getVector

      public static com.google.gson.JsonArray getVector(com.google.gson.JsonElement element)
    • snake2Camel

      public static String snake2Camel(String original)
      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)