Chargeable

fun Chargeable(maxEnergy: Long? = null, affectsItemDurability: Boolean = true): ItemBehaviorFactory<Chargeable>

Creates a factory for Chargeable behaviors using the given values, if not specified otherwise in the item's config.

Parameters

maxEnergy

The maximum amount of energy the item can store. Used when max_energy is not specified in the config, or null to require the presence of a config entry.

affectsItemDurability

Whether the item's durability bar should be used to visualize the amount of energy stored in the item. Used when charge_affects_item_durability is not specified in the config.