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
-
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.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.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.
-