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

    Fields
    Modifier and Type
    Field
    Description
    static final AmountOverride
     
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    overrideAmount(ResourceKey resource, long amount, LongSupplier currentAmountSupplier)
    Modifies the requested amount to a new amount.
  • Field Details

  • Method Details

    • overrideAmount

      long overrideAmount(ResourceKey resource, long amount, LongSupplier currentAmountSupplier)
      Modifies the requested amount to a new amount.
      Parameters:
      resource - the resource
      amount - the original requested amount
      currentAmountSupplier - the current amount present in the source
      Returns:
      the new requested amount, may be 0