Class CraftingHelper
java.lang.Object
io.github.vampirestudios.vampirelib.crafting.CraftingHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanareShareTagsEqual(net.minecraft.world.item.ItemStack stack, net.minecraft.world.item.ItemStack other) Modeled after ItemStack.areItemStackTagsEqual Uses Item.getNBTShareTag for comparison instead of NBT and capabilities.static Predicate<com.google.gson.JsonObject>getConditionPredicate(com.google.gson.JsonObject json) static @Nullable net.minecraft.resources.ResourceLocationgetID(io.github.tropheusj.serialization_hooks.ingredient.IngredientDeserializer serializer) static net.minecraft.world.item.Itemstatic net.minecraft.world.item.ItemStackgetItemStack(com.google.gson.JsonObject json, boolean readNBT) static net.minecraft.world.item.ItemStackgetItemStack(com.google.gson.JsonObject json, boolean readNBT, boolean disallowsAirInRecipe) static net.minecraft.nbt.CompoundTaggetNBT(com.google.gson.JsonElement element) static voidinit()static net.minecraft.world.item.crafting.Ingredientmerge(Collection<net.minecraft.world.item.crafting.Ingredient> parts) static io.github.tropheusj.serialization_hooks.ingredient.IngredientDeserializerregister(net.minecraft.resources.ResourceLocation key, io.github.tropheusj.serialization_hooks.ingredient.IngredientDeserializer serializer) static @Nullable net.minecraft.world.item.ItemtryGetItem(String itemName, boolean disallowsAirInRecipe) static @Nullable net.minecraft.world.item.ItemStacktryGetItemStack(com.google.gson.JsonObject json, boolean readNBT, boolean disallowsAirInRecipe) static @Nullable net.minecraft.nbt.CompoundTagtryGetNBT(com.google.gson.JsonElement element)
-
Constructor Details
-
CraftingHelper
public CraftingHelper()
-
-
Method Details
-
init
public static void init() -
register
public static io.github.tropheusj.serialization_hooks.ingredient.IngredientDeserializer register(net.minecraft.resources.ResourceLocation key, io.github.tropheusj.serialization_hooks.ingredient.IngredientDeserializer serializer) -
getID
@Nullable public static @Nullable net.minecraft.resources.ResourceLocation getID(io.github.tropheusj.serialization_hooks.ingredient.IngredientDeserializer serializer) -
getItemStack
public static net.minecraft.world.item.ItemStack getItemStack(com.google.gson.JsonObject json, boolean readNBT) -
getItem
-
tryGetItem
@Nullable public static @Nullable net.minecraft.world.item.Item tryGetItem(String itemName, boolean disallowsAirInRecipe) -
getNBT
public static net.minecraft.nbt.CompoundTag getNBT(com.google.gson.JsonElement element) -
tryGetNBT
@Nullable public static @Nullable net.minecraft.nbt.CompoundTag tryGetNBT(com.google.gson.JsonElement element) -
getItemStack
public static net.minecraft.world.item.ItemStack getItemStack(com.google.gson.JsonObject json, boolean readNBT, boolean disallowsAirInRecipe) -
tryGetItemStack
@Nullable public static @Nullable net.minecraft.world.item.ItemStack tryGetItemStack(com.google.gson.JsonObject json, boolean readNBT, boolean disallowsAirInRecipe) -
merge
public static net.minecraft.world.item.crafting.Ingredient merge(Collection<net.minecraft.world.item.crafting.Ingredient> parts) -
getConditionPredicate
public static Predicate<com.google.gson.JsonObject> getConditionPredicate(com.google.gson.JsonObject json)
-