Package alexiil.mc.lib.attributes
Interface AttributeProviderItem
public interface AttributeProviderItem
An
Item
that contains attributes.-
Method Summary
Modifier and TypeMethodDescriptionvoid
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
- AReference
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 givenReference.set(Object)
, rather than modifying the stack directly.excess
- If interacting with any of the returned attributes produces excessItemStack
's then they should be added to thisLimitedConsumer
.
-