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 Type Method Description default LimitedFixedFluidInv.FluidTankLimitRule
allowExtraction()
Stops disallowing extraction of fluids.default LimitedFixedFluidInv.FluidTankLimitRule
disallowExtraction()
Completely disallows extraction of fluids.default LimitedFixedFluidInv.FluidTankLimitRule
disallowInsertion()
Completely disallows inserting items.LimitedFixedFluidInv.FluidTankLimitRule
filterInserts(FluidFilter filter)
Filters all insertions with the given filter in addition to whatever filters are already present.LimitedFixedFluidInv.FluidTankLimitRule
limitInsertionAmount(FluidAmount max)
Limits the amount of fluid that can be inserted (in total) to the given count.default LimitedFixedFluidInv.FluidTankLimitRule
limitInsertionCount(int max)
Deprecated.Replaced bylimitInsertionAmount(FluidAmount)
.default LimitedFixedFluidInv.FluidTankLimitRule
noInsertionFilter()
Removes the currentinsertion filter
.default LimitedFixedFluidInv.FluidTankLimitRule
noInsertionLimits()
Deprecated.Because this is ambiguous as the name could refer to the count, or the filter, so instead you should usenoInsertionFilter()
default LimitedFixedFluidInv.FluidTankLimitRule
reset()
Clears all limitations for this current rule.default LimitedFixedFluidInv.FluidTankLimitRule
setMinimum(int min)
Deprecated.Replaced bysetMinimum(FluidAmount)
LimitedFixedFluidInv.FluidTankLimitRule
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.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.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.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.
-