Class CraftingHelper
java.lang.Object
net.minecraftforge.common.crafting.CraftingHelper
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final Map<ResourceLocation,
IConditionSerializer<?>> private static final org.apache.logging.log4j.Marker
private static com.google.gson.Gson
private static final com.google.common.collect.BiMap<ResourceLocation,
IIngredientSerializer<?>> private static final org.apache.logging.log4j.Logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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, 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 Details
-
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
-
ingredients
private static final com.google.common.collect.BiMap<ResourceLocation,IIngredientSerializer<?>> ingredients
-
-
Constructor Details
-
CraftingHelper
public CraftingHelper()
-
-
Method Details
-
register
-
register
public static <T extends Ingredient> IIngredientSerializer<T> register(ResourceLocation key, IIngredientSerializer<T> serializer) -
getID
-
write
-
getIngredient
-
getIngredient
-
getItemStack
-
processConditions
-
processConditions
public static boolean processConditions(com.google.gson.JsonArray conditions) -
getCondition
-
serialize
-