Composite

class Composite(val actions: List<ItemAction>) : ItemAction

Applies actions in sequence.

Constructors

Link copied to clipboard
constructor(actions: List<ItemAction>)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun apply(world: World, itemStack: ItemStack): List<ItemStack>

Applies this action to a copy of itemStack, in the context of world, then returns it. Does not modify the original itemStack. This function is used in cases where the item interaction was not triggered by an entity.

open override fun apply(entity: LivingEntity, slot: EquipmentSlot)

Applies this action to the item in the slot of entity.