类 CraftingHelper
java.lang.Object
net.minecraftforge.common.crafting.CraftingHelper
-
字段概要
字段修饰符和类型字段说明private 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
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static ICondition
getCondition
(com.google.gson.JsonObject json) static @Nullable ResourceLocation
getID
(IIngredientSerializer<?> serializer) static Ingredient
getIngredient
(com.google.gson.JsonElement json, boolean allowEmpty) static Ingredient
getIngredient
(ResourceLocation type, FriendlyByteBuf buffer) static Item
static ItemStack
getItemStack
(com.google.gson.JsonObject json, boolean readNBT) static ItemStack
getItemStack
(com.google.gson.JsonObject json, boolean readNBT, boolean disallowsAirInRecipe) static CompoundTag
getNBT
(com.google.gson.JsonElement element) static boolean
processConditions
(com.google.gson.JsonArray conditions, ICondition.IContext context) static boolean
processConditions
(com.google.gson.JsonObject json, String memberName, ICondition.IContext context) static <T extends Ingredient>
IIngredientSerializer<T>register
(ResourceLocation key, IIngredientSerializer<T> serializer) static IConditionSerializer<?>
register
(IConditionSerializer<?> serializer) static com.google.gson.JsonArray
serialize
(ICondition... conditions) static <T extends ICondition>
com.google.gson.JsonObjectserialize
(T condition) static <T extends Ingredient>
voidwrite
(FriendlyByteBuf buffer, T ingredient)
-
字段详细资料
-
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
-
-
构造器详细资料
-
CraftingHelper
public CraftingHelper()
-
-
方法详细资料
-
register
-
register
public static <T extends Ingredient> IIngredientSerializer<T> register(ResourceLocation key, IIngredientSerializer<T> serializer) -
getID
-
write
-
getIngredient
-
getIngredient
-
getItemStack
-
getItem
-
getNBT
-
getItemStack
public static ItemStack getItemStack(com.google.gson.JsonObject json, boolean readNBT, boolean disallowsAirInRecipe) -
processConditions
public static boolean processConditions(com.google.gson.JsonObject json, String memberName, ICondition.IContext context) -
processConditions
public static boolean processConditions(com.google.gson.JsonArray conditions, ICondition.IContext context) -
getCondition
-
serialize
-
serialize
-