Package alexiil.mc.lib.attributes
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.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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
- 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 excess itemstacks then they should be added to thisConsumer
.
-