Package alexiil.mc.lib.attributes.fluid
Interface LimitedGroupedFluidInv.FluidLimitRule
- Enclosing interface:
- LimitedGroupedFluidInv
public static interface LimitedGroupedFluidInv.FluidLimitRule
A rule that is applied once for every
FluidKey
that matches the FluidFilter
that was used in
LimitedGroupedFluidInv.getRule(FluidFilter)
.-
Method Summary
Modifier and TypeMethodDescriptionStops disallowing extraction of fluids.Resets any insertion limitations previously imposed by thisLimitedGroupedFluidInv.FluidLimitRule
.Completely disallows extraction of fluids.Disallows insertion for thisLimitedGroupedFluidInv.FluidLimitRule
.Completely disallows insertion and extraction for thisLimitedGroupedFluidInv.FluidLimitRule
.Limits the amount of fluid that can be inserted (in total) to the given amount.limitInsertionCount
(int max) 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) Deprecated, for removal: This API element is subject to removal in a future version.Replaced bysetMinimum(FluidAmount)
.setMinimum
(FluidAmount min) Limits the amount of fluid 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 thisLimitedGroupedFluidInv.FluidLimitRule
. -
reset
Clears all limitations for this current rule. -
disallowInsertion
Disallows insertion for thisLimitedGroupedFluidInv.FluidLimitRule
. -
allowInsertion
Resets any insertion limitations previously imposed by thisLimitedGroupedFluidInv.FluidLimitRule
. -
limitInsertionCount
@Deprecated(since="0.6.4", forRemoval=true) default LimitedGroupedFluidInv.FluidLimitRule limitInsertionCount(int max) Deprecated, for removal: This API element is subject to removal in a future version.Replaced bylimitInsertionAmount(FluidAmount)
Limits the amount of fluid that can be inserted (in total) to the given amount.- Parameters:
max
- The maximum. A value less than 0 will reset this back to no limits.- Returns:
- this.
-
limitInsertionAmount
Limits the amount of fluid that can be inserted (in total) to the given amount.- Parameters:
max
- The maximum. A value less than 0 will reset this back to no limits.- Returns:
- this.
-
disallowExtraction
Completely disallows extraction of fluids.- Returns:
- this.
-
allowExtraction
Stops disallowing extraction of fluids.- Returns:
- this.
-
setMinimum
@Deprecated(since="0.6.4", forRemoval=true) default LimitedGroupedFluidInv.FluidLimitRule setMinimum(int min) Deprecated, for removal: This API element is subject to removal in a future version.Replaced bysetMinimum(FluidAmount)
.Limits the amount of fluid 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 thisFluidFilter
.- Returns:
- this.
-
setMinimum
Limits the amount of fluid 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 amount of fluid. A value of 0 removes the rule for thisFluidFilter
.- Returns:
- this.
-
limitInsertionAmount(FluidAmount)