# EquippableComponentHelper

`com.jsmacrosce.jsmacros.client.api.helper.inventory.EquippableComponentHelper`

**Since:** 2.3.0

Describes where a stack can be equipped, how it looks when worn, and its equipment rules.  
 ```js
const stack = Player.getPlayer()?.getMainHand();  
const slot = stack?.getComponents().getEquippable()?.getSlot();  
if (slot === "body") Chat.log("This item goes in an animal's body slot.");  
 ```

## Methods

### canBeSheared {#com.jsmacrosce.jsmacros.client.api.helper.inventory.EquippableComponentHelper_canBeSheared-}

```js
canBeSheared(): boolean
```

**Returns:** whether the item can be removed from the wearer using shears

### canEquipOnInteract {#com.jsmacrosce.jsmacros.client.api.helper.inventory.EquippableComponentHelper_canEquipOnInteract-}

```js
canEquipOnInteract(): boolean
```

**Returns:** whether interacting with a compatible entity can equip the item onto it

### getAllowedEntityTypeIds {#com.jsmacrosce.jsmacros.client.api.helper.inventory.EquippableComponentHelper_getAllowedEntityTypeIds-}

```js
getAllowedEntityTypeIds(): List<String>
```

Lists the entity types currently included in the restriction. Tags whose members are not
 loaded have an empty list; use [getAllowedEntityTypeTagId()](#com.jsmacrosce.jsmacros.client.api.helper.inventory.EquippableComponentHelper_getAllowedEntityTypeTagId-) to read the tag itself.  
 Entity types in the list still need to support the equipment slot.

**Returns:** allowed entity type IDs, or `null` if unrestricted by this component

### getAllowedEntityTypeTagId {#com.jsmacrosce.jsmacros.client.api.helper.inventory.EquippableComponentHelper_getAllowedEntityTypeTagId-}

```js
getAllowedEntityTypeTagId(): String
```

**Returns:** the allowed entity type tag ID without `"#"`, or `null` if no tag is used

### getCameraOverlayId {#com.jsmacrosce.jsmacros.client.api.helper.inventory.EquippableComponentHelper_getCameraOverlayId-}

```js
getCameraOverlayId(): String
```

**Returns:** the camera overlay ID for the wearer, or `null` if none is configured

### getEquipmentAssetId {#com.jsmacrosce.jsmacros.client.api.helper.inventory.EquippableComponentHelper_getEquipmentAssetId-}

```js
getEquipmentAssetId(): String
```

**Returns:** the equipment asset ID for the worn item, or `null` if none is configured

### getEquipSoundId {#com.jsmacrosce.jsmacros.client.api.helper.inventory.EquippableComponentHelper_getEquipSoundId-}

```js
getEquipSoundId(): String
```

**Returns:** the configured sound ID for equipping the item

### getShearingSoundId {#com.jsmacrosce.jsmacros.client.api.helper.inventory.EquippableComponentHelper_getShearingSoundId-}

```js
getShearingSoundId(): String
```

**Returns:** the configured sound ID for removing the item with shears

### getSlot {#com.jsmacrosce.jsmacros.client.api.helper.inventory.EquippableComponentHelper_getSlot-}

```js
getSlot(): String
```

Returns the slot specified by this component. The item can still have restrictions on who
 can wear it.

**Returns:** the slot name, such as `"head"`, `"body"`, or `"saddle"`

### isDispensable {#com.jsmacrosce.jsmacros.client.api.helper.inventory.EquippableComponentHelper_isDispensable-}

```js
isDispensable(): boolean
```

**Returns:** whether a dispenser is allowed to equip this item

### isSwappable {#com.jsmacrosce.jsmacros.client.api.helper.inventory.EquippableComponentHelper_isSwappable-}

```js
isSwappable(): boolean
```

**Returns:** whether using the item can swap it with equipment in the target slot

### takesDamageOnHurt {#com.jsmacrosce.jsmacros.client.api.helper.inventory.EquippableComponentHelper_takesDamageOnHurt-}

```js
takesDamageOnHurt(): boolean
```

**Returns:** whether the item is configured to take durability damage when the wearer is hurt
