Package alexiil.mc.lib.attributes.fluid
Interface LimitedFixedFluidInv.FluidTankLimitRule
- Enclosing interface:
- LimitedFixedFluidInv
public static interface LimitedFixedFluidInv.FluidTankLimitRule
A rule for a set of tanks.
-
Method Summary
Modifier and TypeMethodDescriptionStops disallowing extraction of fluids.Completely disallows extraction of fluids.Completely disallows inserting items.filterInserts
(FluidFilter filter) Filters all insertions with the given filter in addition to whatever filters are already present.Limits the amount of fluid that can be inserted (in total) to the given count.limitInsertionCount
(int max) Deprecated, for removal: This API element is subject to removal in a future version.Removes the currentinsertion filter
.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()
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 this tank cannot have an amount that goes below the given value.
-
Method Details
-
reset
Clears all limitations for this current rule. -
disallowExtraction
Completely disallows extraction of fluids.- Returns:
- this.
-
allowExtraction
Stops disallowing extraction of fluids.- Returns:
- this.
-
filterInserts
Filters all insertions with the given filter in addition to whatever filters are already present.- Parameters:
filter
- Null orConstantFluidFilter.ANYTHING
to clear the current filter.
-
noInsertionLimits
@Deprecated(since="0.8.2", forRemoval=true) default LimitedFixedFluidInv.FluidTankLimitRule 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(FluidFilter)
. -
noInsertionFilter
Removes the currentinsertion filter
. -
disallowInsertion
Completely disallows inserting items.- Returns:
- this.
-
limitInsertionCount
@Deprecated(since="0.6.0", forRemoval=true) default LimitedFixedFluidInv.FluidTankLimitRule 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 count.- Parameters:
max
- The maximum. A value below 0 will reset this rule.- Returns:
- this.
-
limitInsertionAmount
Limits the amount of fluid that can be inserted (in total) to the given count.- Parameters:
max
- The maximum. A value below 0 will reset this rule. Null is treated as zero.- Returns:
- this.
-
setMinimum
@Deprecated(since="0.6.0", forRemoval=true) default LimitedFixedFluidInv.FluidTankLimitRule 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 this tank 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).- Returns:
- this.
-
setMinimum
Limits the amount of fluid that can be extracted to ensure that this tank cannot have an amount that goes below the given value. (This of course has no effect on the underlying tank, so it is always possible for the underlying tank to be modified to contain less than the given amount).- Parameters:
min
- The minimum. Both null and non-positive values are treated as removing the limit.- Returns:
- this.
-
limitInsertionAmount(FluidAmount)
.