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

minecraft:collision_box

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

Overview

minecraft:collision_box is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Sets the size of the box the entity uses to bump into blocks and other entities. Keep it close to the size of your model.

Fields

FieldTypeDefaultDescription
widthnumber0.6Width and depth of the box in blocks.Range: -100000000 to 100000000
heightnumber1.8Height of the box in blocks.Range: -100000000 to 100000000

Example

Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):

BP/entities/<name>.json
{
  "minecraft:collision_box": {
    "width": 0.6,
    "height": 1.8
  }
}

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