Class ResourceKeyTypeAdapter

java.lang.Object
com.pixelmonmod.pixelmon.battles.attacks.ResourceKeyTypeAdapter
All Implemented Interfaces:
com.google.gson.JsonDeserializer<net.minecraft.resources.ResourceKey<Type>>, com.google.gson.JsonSerializer<net.minecraft.resources.ResourceKey<Type>>

public class ResourceKeyTypeAdapter extends Object implements com.google.gson.JsonSerializer<net.minecraft.resources.ResourceKey<Type>>, com.google.gson.JsonDeserializer<net.minecraft.resources.ResourceKey<Type>>
  • Constructor Details

    • ResourceKeyTypeAdapter

      public ResourceKeyTypeAdapter()
  • Method Details

    • deserialize

      public net.minecraft.resources.ResourceKey<Type> 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<net.minecraft.resources.ResourceKey<Type>>
      Throws:
      com.google.gson.JsonParseException
    • serialize

      public com.google.gson.JsonElement serialize(net.minecraft.resources.ResourceKey<Type> src, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
      Specified by:
      serialize in interface com.google.gson.JsonSerializer<net.minecraft.resources.ResourceKey<Type>>