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>

public class IntersectionIngredient extends AbstractIngredient
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    Nested 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

    Constructors
    Modifier
    Constructor
    Description
    protected
    IntersectionIngredient(List<net.minecraft.world.item.crafting.Ingredient> children)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.github.tropheusj.serialization_hooks.ingredient.IngredientDeserializer
     
    net.minecraft.world.item.ItemStack[]
     
    it.unimi.dsi.fastutil.ints.IntList
     
    boolean
     
    static net.minecraft.world.item.crafting.Ingredient
    of(net.minecraft.world.item.crafting.Ingredient... ingredients)
    Gets an intersection ingredient
    boolean
    test(@Nullable net.minecraft.world.item.ItemStack stack)
     
    com.google.gson.JsonElement
     
    void
    toNetwork(net.minecraft.network.FriendlyByteBuf buffer)
     

    Methods inherited from class io.github.vampirestudios.vampirelib.crafting.AbstractIngredient

    fromJson, fromNetwork, fromValues, of, of, of, of, of

    Methods inherited from class net.minecraft.world.item.crafting.Ingredient

    valueFromJson

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.github.tropheusj.serialization_hooks.ingredient.CustomIngredient

    customDeserializer, customTest, testCustom

    Methods inherited from interface java.util.function.Predicate

    and, negate, or
  • Constructor Details

    • IntersectionIngredient

      protected IntersectionIngredient(List<net.minecraft.world.item.crafting.Ingredient> children)
  • 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)
      Specified by:
      test in interface Predicate<net.minecraft.world.item.ItemStack>
      Overrides:
      test in class net.minecraft.world.item.crafting.Ingredient
    • getItems

      public net.minecraft.world.item.ItemStack[] getItems()
      Overrides:
      getItems in class net.minecraft.world.item.crafting.Ingredient
    • isEmpty

      public boolean isEmpty()
      Overrides:
      isEmpty in class net.minecraft.world.item.crafting.Ingredient
    • getStackingIds

      public it.unimi.dsi.fastutil.ints.IntList getStackingIds()
      Overrides:
      getStackingIds in class net.minecraft.world.item.crafting.Ingredient
    • toJson

      public com.google.gson.JsonElement toJson()
      Specified by:
      toJson in class AbstractIngredient
    • getDeserializer

      public io.github.tropheusj.serialization_hooks.ingredient.IngredientDeserializer getDeserializer()
    • toNetwork

      public void toNetwork(net.minecraft.network.FriendlyByteBuf buffer)
      Overrides:
      toNetwork in class net.minecraft.world.item.crafting.Ingredient