public class CraftingHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.util.Map<ResourceLocation,IConditionSerializer<?>> |
conditions |
private static org.apache.logging.log4j.Marker |
CRAFTHELPER |
private static com.google.gson.Gson |
GSON |
private static com.google.common.collect.BiMap<ResourceLocation,IIngredientSerializer<?>> |
ingredients |
private static org.apache.logging.log4j.Logger |
LOGGER |
Constructor and Description |
---|
CraftingHelper() |
Modifier and Type | Method and Description |
---|---|
static ICondition |
getCondition(com.google.gson.JsonObject json) |
static ResourceLocation |
getID(IIngredientSerializer<?> serializer) |
static Ingredient |
getIngredient(com.google.gson.JsonElement json) |
static Ingredient |
getIngredient(ResourceLocation type,
PacketBuffer buffer) |
static ItemStack |
getItemStack(com.google.gson.JsonObject json,
boolean readNBT) |
static boolean |
processConditions(com.google.gson.JsonArray conditions) |
static boolean |
processConditions(com.google.gson.JsonObject json,
java.lang.String memberName) |
static IConditionSerializer<?> |
register(IConditionSerializer<?> serializer) |
static <T extends Ingredient> |
register(ResourceLocation key,
IIngredientSerializer<T> serializer) |
static <T extends ICondition> |
serialize(T condition) |
static <T extends Ingredient> |
write(PacketBuffer buffer,
T ingredient) |
private static final org.apache.logging.log4j.Logger LOGGER
private static final org.apache.logging.log4j.Marker CRAFTHELPER
private static com.google.gson.Gson GSON
private static final java.util.Map<ResourceLocation,IConditionSerializer<?>> conditions
private static final com.google.common.collect.BiMap<ResourceLocation,IIngredientSerializer<?>> ingredients
public static IConditionSerializer<?> register(IConditionSerializer<?> serializer)
public static <T extends Ingredient> IIngredientSerializer<T> register(ResourceLocation key, IIngredientSerializer<T> serializer)
@Nullable public static ResourceLocation getID(IIngredientSerializer<?> serializer)
public static <T extends Ingredient> void write(PacketBuffer buffer, T ingredient)
public static Ingredient getIngredient(ResourceLocation type, PacketBuffer buffer)
public static Ingredient getIngredient(com.google.gson.JsonElement json)
public static ItemStack getItemStack(com.google.gson.JsonObject json, boolean readNBT)
public static boolean processConditions(com.google.gson.JsonObject json, java.lang.String memberName)
public static boolean processConditions(com.google.gson.JsonArray conditions)
public static ICondition getCondition(com.google.gson.JsonObject json)
public static <T extends ICondition> com.google.gson.JsonObject serialize(T condition)