minecraft:on_equipment_changed for you with a switch.Get GodCraftOverview
minecraft:on_equipment_changed is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Runs events when something is put into or taken out of one of the entity's equipment slots, like armor or the main hand. It does not watch a regular inventory; use equippable for that.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
slots | OnEquipmentChangedSlotEntryDescriptor[] | none | Each entry names a slot and the events to run when its item changes. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:on_equipment_changed": {
"slots": []
}
}