Package alexiil.mc.lib.attributes.item
Interface LimitedGroupedItemInv.ItemLimitRule
- Enclosing interface:
- LimitedGroupedItemInv
public static interface LimitedGroupedItemInv.ItemLimitRule
A rule that is applied once for every
ItemStack
that matches the ItemFilter
that was used in
LimitedGroupedItemInv.getRule(ItemFilter)
.-
Method Summary
Modifier and TypeMethodDescriptionStops disallowing extraction of items.Resets any insertion limitations previously imposed by thisLimitedGroupedItemInv.ItemLimitRule
.Completely disallows extraction of items.Disallows insertion for thisLimitedGroupedItemInv.ItemLimitRule
.Completely disallows insertion and extraction for thisLimitedGroupedItemInv.ItemLimitRule
.limitInsertionCount
(int max) Limits the number of items that can be inserted (in total) to the given count.reset()
Clears all limitations for this current rule.setMinimum
(int min) Limits the number of items that can be extracted to ensure that the inventory cannot have an amount below the given value.
-
Method Details
-
disallowTransfer
Completely disallows insertion and extraction for thisLimitedGroupedItemInv.ItemLimitRule
. -
reset
Clears all limitations for this current rule. -
disallowInsertion
Disallows insertion for thisLimitedGroupedItemInv.ItemLimitRule
. -
allowInsertion
Resets any insertion limitations previously imposed by thisLimitedGroupedItemInv.ItemLimitRule
. -
limitInsertionCount
Limits the number of items that can be inserted (in total) to the given count.- Parameters:
max
- The maximum. A value less than 0 will reset this back to no limits.- Returns:
- this.
-
disallowExtraction
Completely disallows extraction of items.- Returns:
- this.
-
allowExtraction
Stops disallowing extraction of items.- Returns:
- this.
-
setMinimum
Limits the number of items that can be extracted to ensure that the inventory cannot have an amount below the given value. (This of course has no effect on the underlying inventory, so it is always possible for the underlying inventory to be modified to contain less than the given amount).- Parameters:
min
- The minimum number of items. A value of 0 removes the rule for thisItemFilter
.- Returns:
- this.
-