Package alexiil.mc.lib.attributes.item
Interface LimitedGroupedItemInv
- All Superinterfaces:
AbstractItemInvView
,GroupedItemInv
,GroupedItemInvView
,ItemExtractable
,ItemInsertable
,ItemTransferable
,LimitedConsumer<net.minecraft.item.ItemStack>
- All Known Implementing Classes:
SimpleLimitedGroupedItemInv
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
A rule that is applied once for everyItemStack
that matches theItemFilter
that was used ingetRule(ItemFilter)
.Nested classes/interfaces inherited from interface alexiil.mc.lib.attributes.item.AbstractItemInvView
AbstractItemInvView.DefaultChangeTracker
Nested classes/interfaces inherited from interface alexiil.mc.lib.attributes.item.GroupedItemInvView
GroupedItemInvView.ItemInvStatistic
-
Method Summary
Modifier and TypeMethodDescriptiondefault GroupedItemInv
copy()
Creates a copy of thisLimitedGroupedItemInv
(with the same backing inventory and the same rules), but not marked as final.getRule
(ItemFilter filter) getRule
(net.minecraft.item.ItemStack stack) Marks this object as final, and disallows any further changes to this.default LimitedGroupedItemInv
reset()
Completely clears all rules currently imposed.Methods inherited from interface alexiil.mc.lib.attributes.item.AbstractItemInvView
getChangeValue
Methods inherited from interface alexiil.mc.lib.attributes.item.GroupedItemInv
createLimitedGroupedInv, filtered
Methods inherited from interface alexiil.mc.lib.attributes.item.GroupedItemInvView
addListener, addListener, getAmount, getAmount, getCapacity, getGroupedView, getSpace, getStatistics, getStatistics, getStoredStacks, getTotalCapacity, isEmpty
Methods inherited from interface alexiil.mc.lib.attributes.item.ItemExtractable
attemptAnyExtraction, attemptExtraction, couldExtractAnything, extract, extract, extract, getPureExtractable
Methods inherited from interface alexiil.mc.lib.attributes.item.ItemInsertable
attemptInsertion, getInsertionFilter, getPureInsertable, insert, offer, offer, wouldAccept, wouldPartiallyAccept
-
Method Details
-
markFinal
LimitedGroupedItemInv markFinal()Marks this object as final, and disallows any further changes to this. If this is called thenasUnmodifiable()
will return this object.- Returns:
- this.
-
copy
LimitedGroupedItemInv copy()Creates a copy of thisLimitedGroupedItemInv
(with the same backing inventory and the same rules), but not marked as final. -
reset
Completely clears all rules currently imposed.- Returns:
- This.
-
asUnmodifiable
- Returns:
- A new
GroupedItemInv
with the current rules of this, but that cannot be modified.
-
getAllRule
- Returns:
- An
LimitedGroupedItemInv.ItemLimitRule
that applies to everything.
-
getRule
- Returns:
- A rule for the specific
ItemStack
given.
-
getRule
- Returns:
- An
LimitedGroupedItemInv.ItemLimitRule
that applies to every item that matches the given filter.
-