Skip to main content

Hitbox

Configure the entity's collision box and eye height.

Default Behavior​

ModEngine uses sensible defaults that match vanilla Minecraft mobs:

DimensionDefaultBehavior
width0.6Standard humanoid width (matches Zombie, Villager, Skeleton)
heightautoCalculated from model geometry
eye_height85%85% of the final height

This means entities can navigate through standard 1-block wide openings (like doors) without getting stuck.

Why not auto-calculate width?

Model bounds include arms, wings, and decorations that extend outward. Using these for collision would create hitboxes wider than the entity's "core body", causing navigation issues. Vanilla Minecraft uses a fixed 0.6 width for all humanoid mobs regardless of their visual size.

Options​

OptionTypeDefaultDescription
copystring-Copy hitbox from an existing entity (e.g., minecraft:zombie)
widthfloat0.6Width and depth in blocks
heightfloatautoHeight in blocks
eye_heightfloat0.85Eye position height

Copying from Existing Entities​

Use copy to match the exact hitbox of any registered entity:

my_zombie:
Model: custom_zombie
Hitbox:
copy: minecraft:zombie # width: 0.6, height: 1.95

You can copy and then override specific values:

tall_zombie:
Model: tall_zombie
Hitbox:
copy: minecraft:zombie # Get base dimensions
height: 2.5 # Override just the height

Common Entity Hitboxes​

EntityWidthHeight
minecraft:zombie0.61.95
minecraft:skeleton0.61.99
minecraft:spider1.40.9
minecraft:creeper0.61.7
minecraft:enderman0.62.9
minecraft:iron_golem1.42.7
minecraft:wolf0.60.85
minecraft:chicken0.40.7

Manual Configuration​

For precise control, specify values manually:

my_entity:
Hitbox:
width: 0.8
height: 2.0
eye_height: 1.7

Eye Height​

The eye_height value can be:

  • An absolute value (e.g., 1.7 = 1.7 blocks from ground)
  • A ratio if less than 1.0 (e.g., 0.85 = 85% of height)
# Absolute eye height
Hitbox:
height: 2.0
eye_height: 1.8 # 1.8 blocks up

# Ratio eye height
Hitbox:
height: 2.0
eye_height: 0.9 # 90% of 2.0 = 1.8 blocks up

Examples​

Standard Humanoid​

custom_villager:
Model: villager_model
# No Hitbox needed - defaults work perfectly
# width: 0.6 (default), height: auto from model

Copy a Spider​

giant_spider:
Model: spider_model
Hitbox:
copy: minecraft:spider

Small Creature​

tiny_bug:
Model: bug
Hitbox:
width: 0.3
height: 0.2
eye_height: 0.15

Large Boss​

giant_boss:
Model: boss_model
Hitbox:
width: 2.0
height: 4.0
eye_height: 3.5