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