Interface AmountOverride
- All Known Implementing Classes:
ExporterBlockEntity
,ImporterBlockEntity
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@API(status=STABLE,
since="2.0.0-milestone.2.12")
@FunctionalInterface
public interface AmountOverride
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
overrideAmount
(ResourceKey resource, long amount, LongSupplier currentAmountSupplier) Modifies the requested amount to a new amount.
-
Field Details
-
NONE
-
-
Method Details
-
overrideAmount
Modifies the requested amount to a new amount.- Parameters:
resource
- the resourceamount
- the original requested amountcurrentAmountSupplier
- the current amount present in the source- Returns:
- the new requested amount, may be 0
-