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
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA rule that is applied once for everyItemStackthat matches theItemFilterthat was used ingetRule(ItemFilter).Nested classes/interfaces inherited from interface alexiil.mc.lib.attributes.item.AbstractItemInvView
AbstractItemInvView.DefaultChangeTrackerNested classes/interfaces inherited from interface alexiil.mc.lib.attributes.item.GroupedItemInvView
GroupedItemInvView.ItemInvStatistic -
Method Summary
Modifier and TypeMethodDescriptiondefault GroupedItemInvcopy()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 LimitedGroupedItemInvreset()Completely clears all rules currently imposed.Methods inherited from interface alexiil.mc.lib.attributes.item.AbstractItemInvView
getChangeValueMethods inherited from interface alexiil.mc.lib.attributes.item.GroupedItemInv
createLimitedGroupedInv, filteredMethods inherited from interface alexiil.mc.lib.attributes.item.GroupedItemInvView
addListener, addListener, getAmount, getAmount, getCapacity, getGroupedView, getSpace, getStatistics, getStatistics, getStoredStacks, getTotalCapacity, isEmptyMethods inherited from interface alexiil.mc.lib.attributes.item.ItemExtractable
attemptAnyExtraction, attemptExtraction, couldExtractAnything, extract, extract, extract, getPureExtractableMethods 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
GroupedItemInvwith the current rules of this, but that cannot be modified.
-
getAllRule
- Returns:
- An
LimitedGroupedItemInv.ItemLimitRulethat applies to everything.
-
getRule
- Returns:
- A rule for the specific
ItemStackgiven.
-
getRule
- Returns:
- An
LimitedGroupedItemInv.ItemLimitRulethat applies to every item that matches the given filter.
-