Class NBTIngredient
java.lang.Object
net.minecraft.world.item.crafting.Ingredient
io.github.tropheusj.serialization_hooks.ingredient.BaseCustomIngredient
io.github.vampirestudios.vampirelib.crafting.AbstractIngredient
io.github.vampirestudios.vampirelib.crafting.NBTIngredient
- All Implemented Interfaces:
io.github.tropheusj.serialization_hooks.ingredient.CustomIngredient,Predicate<net.minecraft.world.item.ItemStack>
Ingredient that matches the given stack, performing an exact NBT match.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.world.item.crafting.Ingredient
net.minecraft.world.item.crafting.Ingredient.ItemValue, net.minecraft.world.item.crafting.Ingredient.TagValue, net.minecraft.world.item.crafting.Ingredient.Value -
Field Summary
Fields inherited from class net.minecraft.world.item.crafting.Ingredient
EMPTY, values -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.github.tropheusj.serialization_hooks.ingredient.IngredientDeserializerstatic NBTIngredientof(net.minecraft.world.item.ItemStack stack) Creates a new ingredient matching the given stack and tagbooleantest(@Nullable net.minecraft.world.item.ItemStack input) com.google.gson.JsonElementtoJson()voidtoNetwork(net.minecraft.network.FriendlyByteBuf buffer) Methods inherited from class io.github.vampirestudios.vampirelib.crafting.AbstractIngredient
fromJson, fromNetwork, fromValues, of, of, of, of, ofMethods inherited from class net.minecraft.world.item.crafting.Ingredient
getItems, getStackingIds, isEmpty, valueFromJsonMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.tropheusj.serialization_hooks.ingredient.CustomIngredient
customDeserializer, customTest, testCustom
-
Constructor Details
-
NBTIngredient
protected NBTIngredient(net.minecraft.world.item.ItemStack stack)
-
-
Method Details
-
of
Creates a new ingredient matching the given stack and tag -
test
public boolean test(@Nullable @Nullable net.minecraft.world.item.ItemStack input) -
toJson
public com.google.gson.JsonElement toJson()- Specified by:
toJsonin classAbstractIngredient
-
toNetwork
public void toNetwork(net.minecraft.network.FriendlyByteBuf buffer) - Overrides:
toNetworkin classnet.minecraft.world.item.crafting.Ingredient
-
getDeserializer
public io.github.tropheusj.serialization_hooks.ingredient.IngredientDeserializer getDeserializer()
-