Interface ItemAttributeAdder<T>

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ItemAttributeAdder<T>
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addAll​(Reference<net.minecraft.item.ItemStack> stack, LimitedConsumer<net.minecraft.item.ItemStack> excess, ItemAttributeList<T> to)
    Adds every attribute instance to the given list that the item itself cannot be expected to add support for.
  • Method Details

    • addAll

      void addAll(Reference<net.minecraft.item.ItemStack> stack, @Nullable LimitedConsumer<net.minecraft.item.ItemStack> excess, ItemAttributeList<T> to)
      Adds every attribute instance to the given list that the item itself cannot be expected to add support for.
      Parameters:
      stack - A Reference to the stack to test for. If any of the added attributes need to modify the stack then they should do that by setting the given Reference.set(Object), rather than modifying the stack directly.
      excess - If interacting with any of the returned attributes produces excess itemstacks then they should be added to this Consumer.