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>>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.resources.ResourceKey
<Type> deserialize
(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) com.google.gson.JsonElement
serialize
(net.minecraft.resources.ResourceKey<Type> src, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
-
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 interfacecom.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 interfacecom.google.gson.JsonSerializer<net.minecraft.resources.ResourceKey<Type>>
-