Interface ItemCapacityModifier

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ItemCapacityModifier
Implemented by a CraftEngine item behavior that changes how much its item can hold, for example an installed module that multiplies the energy capacity. ResourceItem.capacity(Item) asks every such behavior on the item, in the order of its behaviors: list.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    modify(@NotNull net.momirealms.craftengine.core.item.Item item, @NotNull net.kyori.adventure.key.Key resource, long capacity)
     
  • Method Details

    • modify

      long modify(@NotNull @NotNull net.momirealms.craftengine.core.item.Item item, @NotNull @NotNull net.kyori.adventure.key.Key resource, long capacity)
      Returns:
      the capacity of resource in item, given the capacity so far