Class IntersectionIngredient
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.IntersectionIngredient
- All Implemented Interfaces:
io.github.tropheusj.serialization_hooks.ingredient.CustomIngredient,Predicate<net.minecraft.world.item.ItemStack>
-
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 -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedIntersectionIngredient(List<net.minecraft.world.item.crafting.Ingredient> children) -
Method Summary
Modifier and TypeMethodDescriptionio.github.tropheusj.serialization_hooks.ingredient.IngredientDeserializernet.minecraft.world.item.ItemStack[]getItems()it.unimi.dsi.fastutil.ints.IntListbooleanisEmpty()static net.minecraft.world.item.crafting.Ingredientof(net.minecraft.world.item.crafting.Ingredient... ingredients) Gets an intersection ingredientbooleantest(@Nullable net.minecraft.world.item.ItemStack stack) 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
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
-
IntersectionIngredient
-
-
Method Details
-
of
public static net.minecraft.world.item.crafting.Ingredient of(net.minecraft.world.item.crafting.Ingredient... ingredients) Gets an intersection ingredient- Parameters:
ingredients- List of ingredients to match- Returns:
- Ingredient that only matches if all the passed ingredients match
-
test
public boolean test(@Nullable @Nullable net.minecraft.world.item.ItemStack stack) -
getItems
public net.minecraft.world.item.ItemStack[] getItems()- Overrides:
getItemsin classnet.minecraft.world.item.crafting.Ingredient
-
isEmpty
public boolean isEmpty()- Overrides:
isEmptyin classnet.minecraft.world.item.crafting.Ingredient
-
getStackingIds
public it.unimi.dsi.fastutil.ints.IntList getStackingIds()- Overrides:
getStackingIdsin classnet.minecraft.world.item.crafting.Ingredient
-
toJson
public com.google.gson.JsonElement toJson()- Specified by:
toJsonin classAbstractIngredient
-
getDeserializer
public io.github.tropheusj.serialization_hooks.ingredient.IngredientDeserializer getDeserializer() -
toNetwork
public void toNetwork(net.minecraft.network.FriendlyByteBuf buffer) - Overrides:
toNetworkin classnet.minecraft.world.item.crafting.Ingredient
-