Interface ResourceItem


public interface ResourceItem
Implemented by a CraftEngine item behavior whose item holds one resource: the engine's machineengine:energy_item and machineengine:resource_item, or an addon's own (D32). The amount lives in the item's data (ItemResources); the behavior only says what the item holds and how much.

An item may hold several resources (energy and hydrogen): one behavior per resource.

  • Method Summary

    Modifier and Type
    Method
    Description
    long
    How much the item holds when full, before ItemCapacityModifiers.
    default long
    capacity(@NotNull net.momirealms.craftengine.core.item.Item item)
    baseCapacity(), changed by the item's ItemCapacityModifier behaviors.
    default long
    The most moved into the item per transfer (per tick for machines).
    default long
    The most moved out of the item per transfer.
    @NotNull net.kyori.adventure.key.Key
    The resource type this item holds, e.g.
  • Method Details

    • resource

      @NotNull @NotNull net.kyori.adventure.key.Key resource()
      The resource type this item holds, e.g. machineengine:energy.
    • baseCapacity

      long baseCapacity()
      How much the item holds when full, before ItemCapacityModifiers.
    • maxInput

      default long maxInput()
      The most moved into the item per transfer (per tick for machines).
    • maxOutput

      default long maxOutput()
      The most moved out of the item per transfer.
    • capacity

      default long capacity(@NotNull @NotNull net.momirealms.craftengine.core.item.Item item)
      baseCapacity(), changed by the item's ItemCapacityModifier behaviors.