Class JsonHelper
java.lang.Object
com.pixelmonmod.pixelmon.api.util.helpers.JsonHelper
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> com.google.common.collect.ImmutableList<T>
deserializeList
(com.google.gson.JsonArray array, Function<com.google.gson.JsonElement, T> deserializer) static <T> T
getOrDefault
(com.google.gson.JsonObject object, String key, Class<T> type, T def, com.google.gson.JsonDeserializationContext context) static net.minecraft.core.NonNullList<QuantifiedIngredient>
quantifiedItemsFromJson
(com.google.gson.JsonArray ingredients) static <T> com.google.gson.JsonArray
serializeList
(Collection<T> collection, Function<T, com.google.gson.JsonElement> serializer)
-
Constructor Details
-
JsonHelper
public JsonHelper()
-
-
Method Details
-
getOrDefault
-
serializeList
public static <T> com.google.gson.JsonArray serializeList(Collection<T> collection, Function<T, com.google.gson.JsonElement> serializer) -
deserializeList
public static <T> com.google.common.collect.ImmutableList<T> deserializeList(com.google.gson.JsonArray array, Function<com.google.gson.JsonElement, T> deserializer) -
quantifiedItemsFromJson
public static net.minecraft.core.NonNullList<QuantifiedIngredient> quantifiedItemsFromJson(com.google.gson.JsonArray ingredients)
-