1. Wiki
  2. /Entities
  3. /minecraft:custom_hit_test

minecraft:custom_hit_test

Don't want to write this by hand? GodCraft sets minecraft:custom_hit_test for you with a switch.Get GodCraft

Overview

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

FieldTypeDefaultDescription
hitboxesArraynoneThe 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": {}
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more