minecraft:custom_hit_test for you with a switch.Get GodCraftOverview
minecraft:custom_hit_test is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Defines one or more boxes that count when the entity is hit by melee or projectiles. Use it when the clickable area should differ from the collision box.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
hitboxes | Array | none | The list of hit boxes, each with its own size and offset. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:custom_hit_test": {
"hitboxes": {}
}
}