TConJSEvents.equipmentChange
OriginalSeptember 6, 2025About 2 min
Syntax:
TConJSEvents.equipmentChange((event: TinkerToolChangeEventJS) => {})
Field Overview
Name | Type | Description |
---|---|---|
context | EquipmentChangeContext | The context of the original Forge event |
entity | LivingEntity | The entity that triggered the event |
original | ItemStack | The item stack in the original slot |
originalTool | IToolStackView | The Tinkers' NBT data of the original slot |
player? | Player | The player who triggered the event (returns Null if event.entity is not a player) |
replacement | ItemStack | The item stack being replaced |
replacementTool | IToolStackView | The Tinkers' NBT data of the replacement |
tinkerData | LazyOptional<TinkerDataCapability$Holder> | Tinkers' data |
world | Level | The dimension the player is in |
hasModifiableArmor | boolean | Whether the entity has Tinkers' modifiable armor value |
Method Overview
Name | Return Value | Description |
---|---|---|
getToolInSlot(slot: EquipmentSlot) | IToolStackView | Get the Tinkers' tool stack in the specified slot. This method can be used to obtain tool information for a specific equipment slot. |
hasModifiableArmor(slot: EquipmentSlot[]) | boolean | Check whether the entity has Tinkers' modifiable armor value. This method can be used to determine if the entity is equipped with Tinkers' related armor. |