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
static class LootTypesManager.Serializer<E,T extends LootType<E>> extends java.lang.Object implements com.google.gson.JsonDeserializer<E>, com.google.gson.JsonSerializer<E>
-
-
Field Summary
Fields Modifier and Type Field Description private com.mojang.datafixers.util.Pair<T,LootTypesManager.ISerializer<? extends E>>
defaultType
private java.lang.String
elementName
private Registry<T>
registry
private java.util.function.Function<E,T>
typeGetter
private java.lang.String
typeKey
-
Constructor Summary
Constructors Modifier Constructor Description private
Serializer(Registry<T> p_i232162_1_, java.lang.String p_i232162_2_, java.lang.String p_i232162_3_, java.util.function.Function<E,T> p_i232162_4_, com.mojang.datafixers.util.Pair<T,LootTypesManager.ISerializer<? extends E>> p_i232162_5_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description E
deserialize(com.google.gson.JsonElement p_deserialize_1_, java.lang.reflect.Type p_deserialize_2_, com.google.gson.JsonDeserializationContext p_deserialize_3_)
com.google.gson.JsonElement
serialize(E p_serialize_1_, java.lang.reflect.Type p_serialize_2_, com.google.gson.JsonSerializationContext p_serialize_3_)
-
-
-
Field Detail
-
elementName
private final java.lang.String elementName
-
typeKey
private final java.lang.String typeKey
-
defaultType
@Nullable private final com.mojang.datafixers.util.Pair<T extends LootType<E>,LootTypesManager.ISerializer<? extends E>> defaultType
-
-
Method Detail
-
deserialize
public E deserialize(com.google.gson.JsonElement p_deserialize_1_, java.lang.reflect.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
-
-