Package alexiil.mc.lib.attributes.fluid
Interface LimitedFixedFluidInv
- All Superinterfaces:
Convertible,FixedFluidInv,FixedFluidInvView
- All Known Implementing Classes:
SimpleLimitedFixedFluidInv
A type of
FixedFluidInv that wraps an existing FixedFluidInv and provides custom control over the
actual modification of the wrapped FixedFluidInv.
Note that it is never possible to get the wrapped FixedFluidInv from this class.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA rule for a set of tanks. -
Method Summary
Modifier and TypeMethodDescriptiondefault FixedFluidInvcopy()Creates a copy of thisLimitedFixedItemInv(with the same backing inventory and the same rules).getRule(int tank) getSubRule(int from, int to) Marks this object as final, and disallows any further changes to this.default LimitedFixedFluidInvreset()Completely clears all rules currently imposed.Methods inherited from interface alexiil.mc.lib.attributes.fluid.FixedFluidInv
createLimitedFixedInv, extractFluid, forceSetInvFluid, getExtractable, getGroupedInv, getInsertable, getMappedInv, getSubInv, getTank, getTransferable, insertFluid, isFluidValidForTank, modifyTank, setInvFluid, tankIterableMethods inherited from interface alexiil.mc.lib.attributes.fluid.FixedFluidInvView
addListener, convertTo, fluidIterable, getFilterForTank, getFixedView, getInvFluid, getMaxAmount, getMaxAmount_F, getTankCount, offerSelfAsAttribute
-
Method Details
-
markFinal
LimitedFixedFluidInv markFinal()Marks this object as final, and disallows any further changes to this. If this is called thenasUnmodifiable()will return this object.- Returns:
- this.
-
copy
LimitedFixedFluidInv copy()Creates a copy of thisLimitedFixedItemInv(with the same backing inventory and the same rules). -
reset
Completely clears all rules currently imposed.- Returns:
- This.
-
asUnmodifiable
- Returns:
- A new
FixedFluidInvwith the current rules of this, but that cannot be modified.
-
getRule
- Returns:
- A rule for the single tank.
-
getSubRule
- Parameters:
from- The first tank (inclusive)to- The last tank (exclusive).- Returns:
- A rule that applies to every tank between from and to.
-
getAllRule
- Returns:
- A rule that applies to every tank in this inventory.
-