Package alexiil.mc.lib.attributes.item
Interface LimitedFixedItemInv.ItemSlotLimitRule
- Enclosing interface:
- LimitedFixedItemInv
public static interface LimitedFixedItemInv.ItemSlotLimitRule
A rule for a set of slots.
- 
Method SummaryModifier and TypeMethodDescriptionStops disallowing extraction of items.Stops disallowing insertion of items by setting thelimitInsertionCount(int)to 64.Completely disallows extraction of items.Completely disallows inserting items by setting thelimitInsertionCount(int)to 0.filterExtracts(ItemFilter filter)Filters all extractions with the given filter in addition to whatever filters are already present.filterInserts(ItemFilter filter)Filters all insertions with the given filter in addition to whatever filters are already present.limitInsertionCount(int max)Limits the number of items that can be inserted (in total) to the given count.Removes the currentextraction filter.Removes the currentinsertion filter.Deprecated, for removal: This API element is subject to removal in a future version.reset()Clears all limitations for this current rule.setMinimum(int min)Limits the number of items that can be extracted to ensure that this slot cannot have an amount that goes below the given value.
- 
Method Details- 
resetClears all limitations for this current rule.
- 
disallowExtractionCompletely disallows extraction of items.- Returns:
- this.
 
- 
allowExtractionStops disallowing extraction of items.- Returns:
- this.
 
- 
filterInsertsFilters all insertions with the given filter in addition to whatever filters are already present.- Parameters:
- filter- Null or- ConstantItemFilter.ANYTHINGto clear the current filter.
 
- 
filterExtractsFilters all extractions with the given filter in addition to whatever filters are already present.- Parameters:
- filter- Null or- ConstantItemFilter.ANYTHINGto clear the current filter.
 
- 
noInsertionLimits@Deprecated(since="0.5.1", forRemoval=true) default LimitedFixedItemInv.ItemSlotLimitRule noInsertionLimits()Deprecated, for removal: This API element is subject to removal in a future version.Because this is ambiguous as the name could refer to the count, or the filter, so instead you should usenoInsertionFilter().Removes the currentfilterInserts(ItemFilter).
- 
noInsertionFilterRemoves the currentinsertion filter.
- 
noExtractionFilterRemoves the currentextraction filter.
- 
disallowInsertionCompletely disallows inserting items by setting thelimitInsertionCount(int)to 0. (This leaves thefilterInserts(ItemFilter)alone, however setting it toConstantItemFilter.NOTHINGwould have the same effect).- Returns:
- this.
 
- 
allowInsertionStops disallowing insertion of items by setting thelimitInsertionCount(int)to 64.- Returns:
- this.
 
- 
limitInsertionCountLimits the number of items that can be inserted (in total) to the given count.- Parameters:
- max- The maximum, clamped between 0 and 64. (A value of 0 disallows insertion, and a value of 64 removes the limit).
- Returns:
- this.
 
- 
setMinimumLimits the number of items that can be extracted to ensure that this slot cannot have an amount that goes 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, clamped between 0 and 64. (A value of 0 removes this limit, and a value of 64 disallows extraction).
- Returns:
- this.
 
 
- 
noInsertionFilter().