Package net.minecraft.loot
Class LootTypesManager.Serializer<E,T extends LootType<E>>
java.lang.Object
net.minecraft.loot.LootTypesManager.Serializer<E,T>
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<E>
,com.google.gson.JsonSerializer<E>
- Enclosing class:
- LootTypesManager
-
Field Summary
Modifier and TypeFieldDescriptionprivate final com.mojang.datafixers.util.Pair<T,
LootTypesManager.ISerializer<? extends E>> private final String
private final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(com.google.gson.JsonElement p_deserialize_1_, Type p_deserialize_2_, com.google.gson.JsonDeserializationContext p_deserialize_3_) com.google.gson.JsonElement
serialize
(E p_serialize_1_, Type p_serialize_2_, com.google.gson.JsonSerializationContext p_serialize_3_)
-
Field Details
-
registry
-
elementName
-
typeKey
-
typeGetter
-
defaultType
@Nullable private final com.mojang.datafixers.util.Pair<T extends LootType<E>,LootTypesManager.ISerializer<? extends E>> defaultType
-
-
Constructor Details
-
Serializer
-
-
Method Details
-
deserialize
public E deserialize(com.google.gson.JsonElement p_deserialize_1_, Type p_deserialize_2_, com.google.gson.JsonDeserializationContext p_deserialize_3_) throws com.google.gson.JsonParseException - Specified by:
deserialize
in interfacecom.google.gson.JsonDeserializer<E>
- Throws:
com.google.gson.JsonParseException
-
serialize
public com.google.gson.JsonElement serialize(E p_serialize_1_, Type p_serialize_2_, com.google.gson.JsonSerializationContext p_serialize_3_) - Specified by:
serialize
in interfacecom.google.gson.JsonSerializer<E>
-