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 TypeMethodDescriptionlongHow much the item holds when full, beforeItemCapacityModifiers.default longcapacity(@NotNull net.momirealms.craftengine.core.item.Item item) baseCapacity(), changed by the item'sItemCapacityModifierbehaviors.default longmaxInput()The most moved into the item per transfer (per tick for machines).default longThe most moved out of the item per transfer.@NotNull net.kyori.adventure.key.Keyresource()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, beforeItemCapacityModifiers. -
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'sItemCapacityModifierbehaviors.
-