Hitbox

A zombie chasing a villager with their hitboxes visible by using F3 + B debug hotkey.

A hitbox defines the physical boundary (or an approximation) of a block or entity. Hitboxes are used in the calculations of collisions and targeting.

Unlike with block models, all hitboxes' sizes are hard-coded and cannot be changed independently without modification.

In Java Edition, hitboxes can be seen through the F3 + B debug hotkey.

Entity hitboxes

Bounding box

Several entities with different bounding box sizes next to each other. From left to right, the shortest to tallest: chicken, pig, cow, creeper, zombie, and enderman.

An entity's bounding box manages their collision with blocks and other entities. It's also used for detecting hits and other interactions from players, villagers, arrows, and other entities. In Java Edition, it's shown as a white color coded hitbox around the entities' model, and moves with the entity but maintains a static orientation without rotating.

When the bounding boxes between two entities overlap, a small force is applied to each entity proportional to the distance between them to push them away from each other horizontally. Because there is no vertical collision, it is possible to put multiple entities in the same block by dropping them in from above.

An entity's bounding box can transform into different shapes depending on certain situations, typically unique to the entity itself. For instance, a pufferfish when approached by players gradually expands its shape, from unpuffed, to semi-puffed, then to fully puffed. It instantly shrinks its shape back to normal once it cools down. Players can also change their bounding box by sneaking, crawling, swimming, gliding, or any other means. They can also be scaled by minecraft:scale attribute.

Eye height

A wither skeleton has a taller eye height hitbox (red) than a villager, making it suffocate in the barrier block above it.

The eye height shows an entity's eyes placement. It's used for detecting when an entity is submerged in a water or phasing through a solid block. In this state, the game usually times the entity running out of air or suffocate. In Java Edition, it's shown as flat red lines typically appearing on entities' eyes or head.

The eye height is also used to determine if two entities can see and follow each other by their eye contact.[1] A long blue tint placed in-line with the eye height hitbox shows which direction entities are looking (view angle).

Passenger attachment point

The passenger attachment point is a hitbox that shows the point where an entity passenger is attached on a mountable entity. It's shown as a small green hitbox. It appears on a mountable entity when it is mounted by another entity, and aligns precisely with the bottom side of the hitbox.

Block hitboxes

Collision box

Fences have a one blocks tall interaction box, but with 1.5 blocks tall collision box.

The collision box manages a block's collision with entities. They are usually shaped in cubes, but some may have different shapes, like slabs, lecterns, lily pads, fences, walls, and stairs.

A collision box may not be present for all blocks, like non-solid blocks such as grass, sign, button, lever and torch have no collision box. Some blocks may have custom collision box that make them semi-solid, like scaffolding and hanging sign.

While most blocks have their collision box identical to their interaction box, some may have different collision box compared to their interaction box counterpart. For instances, the lecterns' collision box do not extend into the upper part of their interaction box, and the fences' collision box are a bit taller than their interaction box.

Interaction box

A barrier block's interaction box is shown when hovered by the crosshair.

The interaction box manages block interactions with entities, such as block placement, destruction, right-click, and other interactions. When looking at the given block, the interaction box is shown in black outlines around the block's edges; this is especially visible in the barrier block. This may be affected by the interaction range of players.

Blocks' interaction boxes are usually contained within its own 1×1×1 cube space, however, some blocks are capable of extending outside of this space. There are several instances where this can be seen:[2]

  • The arm of an extended piston – specifically the part that protrudes into the piston's block space.[3]
  • The very top part of a lectern's head. This is especially obvious when a block is placed above the lectern, making lectern's outline overlap with the block.

This behavior is caused by the ray-casting that usually detect the interaction box precense to never collide with it, even though it should.[2]

Miscellaneous hitboxes

Smoke particles coming from the soul campfire colliding with the barrier block, but not the glass block.

Third-person view camera collision box

The third-person view camera has a collision box that collides with solid blocks, but doesn't collide with transparent blocks, such as glasses and glass panes, and non-solid blocks. However, the third-person view camera does collide with the barrier block.

Smoke particles collision box

Smoke particles have a collision box that collides with solid blocks. Smoke particles come from the campfire, and have collision unlike other particles, which usually phase through blocks and entities. Likewise, smoke particles do not collide with transparent blocks and non-solid blocks, but collide with the barrier block.

List of entities' hitboxes

Most entities' bounding boxes are shaped in cuboids, and do not always overlap with the models of the entities. For example, the witch's bounding box does not include the upper part of its hat, and the wither's bounding box does not include the two heads on its sides. Because most bounding boxes are cuboids, it is standard to measure them by their width and height, with both being measured in blocks tall.

Not all entities have a single cuboid bounding box, some entities like the ender dragon have multiple distinct hitboxes. The list mainly shows the sizes of an entity's bounding box or similar, other hitboxes may be include in the notes.

The list is mainly exclusive to Java Edition, unless stated otherwise.

Table Legends

Here are information about the indicators that are used in the table:

  • Varies indicates that entity has variable hitbox sizes.
  • None indicates that entity does not have hitbox sizes.
  • N/A indicates that no data is available for the hitbox sizes.
  • Empty cell indicates that entity may not have hitbox sizes or no data is available. (None or N/A)
Hitbox data are sourced either from in-game or the entities wiki articles.
Miscellaneous
Entity Height Width
Area Effect Cloud 0.5 Varies
End Crystal 2 2
Evoker Fangs 0.8 0.5
Fishing Bobber 0.25 0.25
Glow Item Frame N/A N/A
Item Frame N/A N/A
Leash Knot 0.5 0.375
Interaction Varies Varies
Marker None None
Block Display None None
Text Display None None
Item Display None None
Painting N/A N/A
Projectiles
Entity Height Width Note
Arrow and Tipped Arrow 0.5 0.5 Eye Height: 0.13 blocks
Bottle o' Enchanting 0.25 0.25
Dragon Fireball 1 1
Egg 0.25 0.25
Ender Pearl 0.25 0.25
Eye of Ender 0.25 0.25
Fireball 1‌ 0.31‌ 1‌ 0.31‌
Firework Rocket 0.25 0.25
Llama Spit 0.25 0.25
Shulker bullet 0.3125 0.3125
Small Fireball 0.3125 0.3125
Snowball 0.25 0.25
Spectral Arrow 0.5 0.5
Thrown Lingering Potion 0.25 0.25
Trident 0.5 0.5
Wind Charge 0.3125 0.3125
Wither Skull 0.3125 0.3125
Vehicles
Entity Height Width
Boat 0.5625 1.375
Boat with Chest 0.5625 1.375
Minecart 0.7 0.98
Minecart with Chest 0.7 0.98
Minecart with Command Block 0.7 0.98
Minecart with Furnace 0.7 0.98
Minecart with Hopper 0.7 0.98
Minecart with Monster Spawner 0.7 0.98
Minecart with TNT 0.7 0.98
Items
Entity Height Width
Experience Orb 0.5‌ 0.25‌ 0.5‌ 0.25‌
EnvSprite item.png: Sprite image for item in Minecraft Item 0.25 0.25
Blocks
Entity Height Width
Falling Block 0.98 0.98
Primed TNT 0.98 0.98


Ender dragon

The ender dragon has nine distinct hitboxes, consisting of a single massive white hitbox with eight small green hitboxes inside. These green hitboxes move as the ender dragon flies, but do not rotate. Players can damage the ender dragon by hitting one of their green hitboxes.

Variable hitbox sizes

The size of an entity's hitbox is not necessarily static and may change depending on certain situations. For instance, a player's hitbox gets smaller while crouching, and a pufferfish's hitbox changes while its puffing. Entity may also spawn in different sizes, like slime and magma cube.

Below is the list of entities whose hitbox can change sizes given specific situations:

Entity States Height Width
Camel Normal 2.375 1.7
Sitting 0.945 1.0
Sitting (Baby) 0.945 0.45
Goat Normal 1.3 0.9
Jumping 0.91 0.63
Magma Cube Big 2.08 2.0808
Medium 1.04 1.0404
Small 0.52 0.5202
Player Normal 1.8 0.6
Sneaking 1.5 0.6
Gliding/Swimming 0.6 0.6
Sleeping 0.2 0.2
Polar Bear Normal 1.4 1.4
Attacking 2.0 1.0
Pufferfish Unpuffed 0.35 0.35
Semi-puffed 0.49 0.49
Fully Puffed 0.7 0.7
Shulker Closed 1 1
Peeking 1.2 1
Open 2 1
Slime Big 2.08 2.0808
Medium 1.04 1.0404
Small 0.52 0.5202
Warden Normal 2.9 0.9
Digging/Emerging 1 0.9

History

Block hitboxes

This section needs cleanup to comply with the style guide.
 [discuss]
Please help improve this page. The talk page may contain suggestions.
Reason: all information on the list need to be placed on the history table
  • The hitboxes of pointed dripstone in Java Edition 20w48a could sometimes also randomly extend into adjacent blocks, allowing this to be seen.[4] Fixed in Java Edition 20w49a.
  • The hitboxes of melon stems and pumpkin stems with ages 8 and over could visually extend into the block space above them while they existed (from Beta 1.8 Pre-release up to the removal of the last four in 14w10a and the remaining four in 14w25a).
  • The hitboxes of cakes with 8 or more bites could extend into the adjacent block space while these existed (from Beta 1.2 up to their removal in 14w26a).
  • The hitboxes of cakes and cacti at far distances could previously (from Beta 1.2 and Alpha v1.0.11 respectively up to their fixing, although it became unobservable for cake from 15w38a onward due to MC-106300 — resolved as "Fixed".) also become greater than a full block, allowing this to be seen.

Collision box

This section is missing information about:
 
Please expand the section to include this information. Further details may exist on the talk page.
Java Edition
1.0.0Beta 1.9 Prerelease 2Fences no longer have a full block hitbox on the xz plane, and instead more closely match their shape.
1.112w01aThe fence gate hitbox has changed to match the changes made to fence hitboxes.
1.4.41.4.3Walls now have their own collision box size - previously they shared their size with fences.[5]
The above change also fixed a bug causing their hitboxes to distort and stop working correctly at far distances from the world origin.
1.513w06aFence hitboxes have been changed - concave corners now have their collision boxes respect that rather than always using its effective convex hull, resulting in an invisible portion of collision box there.
The above change also fixed a bug causing their hitboxes to distort and stop working correctly at far distances from the world origin.
1.1317w47aThe hitbox of brewing stands now takes into account the central rod as well.[6]
The collision box of walls has been made to be correctly concave.[7]
1.1419w13aThe outline boxes of cauldrons now fit the model better, allowing for blocks beneath it to be targeted.[8]

Interaction box

Java Edition pre-Classic
rd-132211Targeted blocks now have a visual indicator in which they alternate between bright and dark continuously.
Java Edition Classic
0.0.13aTargeted blocks also have a thin outline box.
0.24_SURVIVAL_TESTThe holographic pulsating hitbox displayed when able to place or break a block has been removed, leaving just the wireframe hitbox.
?The hitboxes for some blocks (flowers, mushrooms, torches) are no longer full cubes, and are more fitting for the size of the block.
Java Edition Infdev
Minecraft Infdev20100313Prior to this version, the wireframe hitbox for highlighting blocks would behave increasingly incorrectly at far distances from the world origin. On all supported hardware, its position would jitter erratically with small shifts in camera rotation. On some GPUs/graphics cards, the geometry of the box would also distort, resulting in non-cubic shapes.
Java Edition Alpha
v1.0.11The hitbox of cacti at far distances became greater than a full block.
Java Edition Beta
1.2The hitbox of cakes at far distances became greater than a full block.
Java Edition
?Stairs cannot be targeted at angles where the crosshair does not point at a solid feature of the block. However, the wireframe outline still displays as a full cube regardless.
?The hitboxes for randomly misaligned blocks such as tall grass are now themselves randomly offset as well to accommodate them.
1.915w38aCake's wireframe hitbox now always appears at (0,0,0) regardless of where the targeted cake actually is. This also masks a distance issue fixed in 15w49a - see below.
15w46aThe hitbox of redstone wire now covers only part of the surface of the block below, based on the orientation of the redstone.
15w49aPrior to this snapshot, the wireframe hitboxes used for cake and cactus would appear stretched and misshapen at far distances from spawn.
15w49bThe hitbox height of the end portal block has been increased from 116 of a block to 34 of a block.
1.1116w35aCake's hitbox now appears at the right position again.[9]
1.1317w47aThe outline boxes of anvils and hoppers now much more closely fit the model shape of these blocks.
The hitbox of brewing stands now takes into account the central rod as well.[10]
The outline boxes of fences is now correctly L-shaped, T-shaped or +-shaped when branching in perpendicular directions.[11]
Cactus now has a correct cuboid outline box.[12]
Blocks containing multiple vines now have better outline boxes.
Glass panes and iron bars have cleaner outline boxes when branching.
End portal frame outline boxes now properly account for the eye.
Piston and lily pad outline boxes were changed.
The collision box of walls has been made to be correctly concave.[13]
1.1418w48aThe outline boxes of beds now match better the visual shape of the bed.
19w13aThe outline boxes of cauldrons now fit the model better, allowing for blocks beneath it to be targeted.[14]
1.1620w10aFire now has an outline box (alongside soul fire),[15] bringing it more in line with other blocks. Previously, fire had no outline box at all, and breaking it required targeting underlying blocks, which also allowed it to be put out in Creative mode when holding a sword or trident, which were programmed to not break blocks. It also prevented its block states from being read in the debug screen or modified via debug stick.
20w18aThe outline box of redstone wire has been changed to much more closely the visual shape of the block. For example, redstone wire branching in different directions causes its outline box to itself branch in said directions,[16] mirroring the behavior of fences, glass panes, iron bars and walls, and, if traveling up the side of a block, the vertical portion of the dust can now also be targeted.[17]
1.1720w49aThe overall width of the outline box of the pointed dripstone is reduced by 18 of a block.

Entity hitboxes

Java Edition
1.4.41.4.3F3 + B now shows the hitbox around entities. At this point, the hitbox is white and opaque and does not have an outline.
1.7.21.7.1Debug entity hitboxes have visually changed to be more intuitive.
1.20.223w31aF3 + B now shows the passenger's attachment point on the entity it's riding.

Issues

Issues relating to "Hitbox" are maintained on the bug tracker. Issues should be reported and viewed there.

Gallery

Screenshots

References

  1. "How crawling came to Minecraft" by Henrik Kniberg – Minecraft.net, July 21, 2020.
  2. a b MC-158827
  3. MC-124459
  4. MC-206643 — resolved as "Fixed".
  5. MC-1332 — resolved as "Fixed".
  6. MC-4504 — resolved as "Fixed".
  7. MC-2666 — resolved as "Fixed".
  8. MC-129205 — resolved as "Fixed".
  9. MC-106300 — resolved as "Fixed".
  10. MC-4504 — resolved as "Fixed".
  11. MC-12000 — resolved as "Fixed".
  12. MC-59610 — resolved as "Fixed".
  13. MC-2666 — resolved as "Fixed".
  14. MC-129205 — resolved as "Fixed".
  15. MC-163655 — resolved as "Fixed".
  16. MC-137336 — resolved as "Fixed".
  17. MC-153508 — resolved as "Fixed".

Navigation