Interface AttributeProviderItem


public interface AttributeProviderItem
An Item that contains attributes.
  • Method Summary

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

    • addAllAttributes

      void addAllAttributes(Reference<net.minecraft.item.ItemStack> stack, LimitedConsumer<net.minecraft.item.ItemStack> excess, ItemAttributeList<?> 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 ItemStack's then they should be added to this LimitedConsumer.