ItemAttachment

open class ItemAttachment(val player: Player, val itemStack: ItemStack, val translation: Vector3fc = Vector3f(0f, 0f, 0f), val scale: Vector3fc = Vector3f(1f, 1f, 1f)) : Attachment

An item model that attaches to a Player by using an ArmorStand as a passenger.

Parameters

player

Specifies the Player that carries this ItemAttachment.

itemStack

The ItemStack to be used for the ItemAttachment.

Inheritors

Constructors

Link copied to clipboard
constructor(player: Player, itemStack: ItemStack, translation: Vector3fc = Vector3f(0f, 0f, 0f), scale: Vector3fc = Vector3f(1f, 1f, 1f))

Properties

Link copied to clipboard
val itemStack: ItemStack
Link copied to clipboard
override var passengerId: Int

The id of the entity that rides the player.

Link copied to clipboard
override val player: Player
Link copied to clipboard
val scale: Vector3fc
Link copied to clipboard
val translation: Vector3fc

Functions

Link copied to clipboard
override fun despawn()

Despawns all entities of this Attachment.

Link copied to clipboard
open override fun handleTeleport()

Called when the player was teleported.

Link copied to clipboard
open override fun handleTick()

Called every tick by the AttachmentManager.