Hitbox

From Minecraft Wiki
Jump to navigation Jump to search
A zombie chasing a villager with their hitboxes visible by using F3 + B debug hotkey.

A hitbox defines the physical "boundaries" (or an approximation thereof) of a block or entity. Hitboxes are utilised in the calculations of collisions and targeting.

Unlike with block models, all hitboxes' sizes are hard-coded and cannot be changed independently without modification. However, it can be scaled via minecraft:scale attribute.

Entities' hitboxes are color-coded, and can be seen through the F3 + B debug hotkey.

Entity hitboxes[edit | edit source]

Bounding box[edit | edit source]

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

The bounding box manages an entity's collision with other entities and blocks. It is also used for detecting hits and interactions from players, villagers, arrows, and other entities.

The bounding box is shown as a white color-coded hitbox around the entities.‌[Java Edition only] It moves with the entity but maintains a static orientation without rotating.

An entity's bounding box can transform into different shapes depending on the situation. 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.

Eye height[edit | edit source]

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

The eye height shows an entity's eyes placement. It is 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.

The eye height is also used to determine if two entities can see and follow each other by their eye contact.[1]

The eye height is shown as flat red lines typically appearing on entities' eyes or head.

A long blue tint placed in-line with the eye height hitbox shows which direction entities are looking.

Passenger attachment point[edit | edit source]

The passenger attachment point shows the point where an entity passenger is attached on a mountable entity.

The passenger attachment point is shown as a small green hitbox. This hitbox appears on a mountable entity when it is mounted by another entity.

When an entity mounts another entity, the passenger's bounding box aligns precisely with the bottom side of the passenger attachment point hitbox.

Block hitboxes[edit | edit source]

Collision box[edit | edit source]

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

The collision box manages block collision with entities. The collision boxes for blocks are usually shaped in cubes, but some may have different shapes, like slabs, lecterns, fences, 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[edit | edit source]

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

The interaction box manages block interactions with entities, such as block placement, destruction, right-click, and other interactions. The interaction box is shown in black outlines around the block's edges when looking at the given block; this is especially visible in the barrier block.

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

  • The arm of an extended piston – specifically the part that protrudes into the piston's block space.[2][3]
  • The extended top of an opened shulker box.[2]
  • The very top part of a lectern's head.[2] 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[edit | edit source]

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

Third-person view camera collision box[edit | edit source]

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[edit | edit source]

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[edit | edit source]

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.

Java Edition hitboxes are shown first, unless stated otherwise.

Table Legend 
Here are information about 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
EntitySprite area-effect-cloud.png: Sprite image for area-effect-cloud in Minecraft linking to Area Effect CloudArea Effect Cloud 0.5 Varies
EntitySprite end-crystal.png: Sprite image for end-crystal in Minecraft linking to End CrystalEnd Crystal 2 2
EntitySprite evoker-fangs.png: Sprite image for evoker-fangs in Minecraft linking to Evoker FangsEvoker Fangs 0.8 0.5
EntitySprite fishing-bobber.png: Sprite image for fishing-bobber in Minecraft linking to Fishing BobberFishing Bobber 0.25 0.25
EntitySprite glow-item-frame.png: Sprite image for glow-item-frame in Minecraft linking to Glow Item FrameGlow Item Frame N/A N/A
EntitySprite item-frame.png: Sprite image for item-frame in Minecraft linking to Item FrameItem Frame N/A N/A
EntitySprite leash-knot.png: Sprite image for leash-knot in Minecraft linking to Leash KnotLeash Knot 0.5 0.375
EntitySprite interaction.png: Sprite image for interaction in Minecraft linking to InteractionInteraction[JE only] Varies Varies
EntitySprite marker.png: Sprite image for marker in Minecraft linking to MarkerMarker[JE only] None None
EntitySprite block-display.png: Sprite image for block-display in Minecraft linking to Block DisplayBlock Display[JE only] None None
EntitySprite text-display.png: Sprite image for text-display in Minecraft linking to Text DisplayText Display[JE only] None None
EntitySprite item-display.png: Sprite image for item-display in Minecraft linking to Item DisplayItem Display[JE only] None None
EntitySprite painting.png: Sprite image for painting in Minecraft linking to PaintingPainting N/A N/A
Projectiles
Entity Height Width Note
EntitySprite arrow.png: Sprite image for arrow in Minecraft linking to ArrowArrow and Tipped Arrow 0.5 0.5 Eye Height: 0.13 blocks
EntitySprite bottle-o'-enchanting.png: Sprite image for bottle-o'-enchanting in Minecraft linking to Bottle o' EnchantingBottle o' Enchanting 0.25 0.25
EntitySprite dragon-fireball.png: Sprite image for dragon-fireball in Minecraft linking to Dragon FireballDragon Fireball 1 1
EntitySprite egg.png: Sprite image for egg in Minecraft linking to EggEgg 0.25 0.25
EntitySprite ender-pearl.png: Sprite image for ender-pearl in Minecraft linking to Ender PearlEnder Pearl 0.25 0.25
EntitySprite eye-of-ender.png: Sprite image for eye-of-ender in Minecraft linking to Eye of EnderEye of Ender 0.25 0.25
EntitySprite fireball.png: Sprite image for fireball in Minecraft linking to FireballFireball 1‌[JE only] 0.31‌[BE only] 1‌[JE only] 0.31‌[BE only]
EntitySprite firework-rocket.png: Sprite image for firework-rocket in Minecraft linking to Firework RocketFirework Rocket 0.25 0.25
EntitySprite llama-spit.png: Sprite image for llama-spit in Minecraft linking to Llama SpitLlama Spit 0.25 0.25
EntitySprite shulker-bullet.png: Sprite image for shulker-bullet in Minecraft linking to Shulker bulletShulker bullet 0.3125 0.3125
EntitySprite small-fireball.png: Sprite image for small-fireball in Minecraft linking to Small FireballSmall Fireball 0.3125 0.3125
EntitySprite snowball.png: Sprite image for snowball in Minecraft linking to SnowballSnowball 0.25 0.25
EntitySprite spectral-arrow.png: Sprite image for spectral-arrow in Minecraft linking to Spectral ArrowSpectral Arrow 0.5 0.5
EntitySprite lingering-potion.png: Sprite image for lingering-potion in Minecraft linking to Lingering PotionThrown Lingering Potion 0.25 0.25
EntitySprite trident.png: Sprite image for trident in Minecraft linking to TridentTrident 0.5 0.5
EntitySprite wind-charge.png: Sprite image for wind-charge in Minecraft linking to Wind ChargeWind Charge 0.3125 0.3125
EntitySprite wither-skull.png: Sprite image for wither-skull in Minecraft linking to Wither SkullWither Skull 0.3125 0.3125
Vehicles
Entity Height Width
EntitySprite boat.png: Sprite image for boat in Minecraft linking to BoatBoat 0.5625 1.375
EntitySprite boat-with-chest.png: Sprite image for boat-with-chest in Minecraft linking to Boat with ChestBoat with Chest 0.5625 1.375
EntitySprite minecart.png: Sprite image for minecart in Minecraft linking to MinecartMinecart 0.7 0.98
EntitySprite minecart-with-chest.png: Sprite image for minecart-with-chest in Minecraft linking to Minecart with ChestMinecart with Chest 0.7 0.98
EntitySprite minecart-with-command-block.png: Sprite image for minecart-with-command-block in Minecraft linking to Minecart with Command BlockMinecart with Command Block 0.7 0.98
EntitySprite minecart-with-furnace.png: Sprite image for minecart-with-furnace in Minecraft linking to Minecart with FurnaceMinecart with Furnace 0.7 0.98
EntitySprite minecart-with-hopper.png: Sprite image for minecart-with-hopper in Minecraft linking to Minecart with HopperMinecart with Hopper 0.7 0.98
EntitySprite minecart-with-monster-spawner.png: Sprite image for minecart-with-monster-spawner in Minecraft linking to Minecart with Monster SpawnerMinecart with Monster Spawner 0.7 0.98
EntitySprite minecart-with-tnt.png: Sprite image for minecart-with-tnt in Minecraft linking to Minecart with TNTMinecart with TNT 0.7 0.98
Items
Entity Height Width
EntitySprite experience-orb.png: Sprite image for experience-orb in Minecraft linking to Experience OrbExperience Orb 0.5‌[JE only] 0.25‌[BE only] 0.5‌[JE only] 0.25‌[BE only]
EnvSprite item.png: Sprite image for item in Minecraft Item 0.25 0.25
Blocks
Entity Height Width
EntitySprite falling-block.png: Sprite image for falling-block in Minecraft linking to Falling BlockFalling Block 0.98 0.98
EntitySprite primed-tnt.png: Sprite image for primed-tnt in Minecraft linking to Primed TNTPrimed TNT 0.98 0.98


Ender dragon[edit | edit source]

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[edit | edit source]

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 the hitbox of a pufferfish changes while its puffed. Below is the list of entities whose hitbox can change sizes given specific situations.

EntitySprite enderman.png: Sprite image for enderman in Minecraft linking to EndermanEnderman Normal Angry
Height 2.9 3.25
Width 0.6 0.6
EntitySprite player.png: Sprite image for player in Minecraft linking to PlayerPlayer Normal Sneaking Gliding/swimming Sleeping
Height 1.8 1.5 0.6 0.2
Width 0.6 0.6 0.6 0.2
EntitySprite pufferfish.png: Sprite image for pufferfish in Minecraft linking to PufferfishPufferfish Unpuffed Semi-puffed Fully Puffed
Height 0.35 0.49 0.7
Width 0.35 0.49 0.7
EntitySprite shulker.png: Sprite image for shulker in Minecraft linking to ShulkerShulker Closed Peeking Open
Height 1 1.2 2
Width 1 1 1

History[edit | edit source]

Block hitboxes[edit | edit source]

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[verify] 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[verify] 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[edit | edit source]

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][verify]
The collision box of walls has been made to be correctly concave.[7][verify]
1.1419w13aThe outline boxes of cauldrons now fit the model better, allowing for blocks beneath it to be targeted.[8][verify]

Interaction box[edit | edit source]

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][verify]
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][verify]
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]

Entity hitboxes[edit | edit source]

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[edit | edit source]

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

Gallery[edit | edit source]

Screenshots[edit | edit source]

References[edit | edit source]

  1. "How crawling came to Minecraft" by Henrik Kniberg – minecraft.net, July 21, 2020.
  2. a b c d e 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[edit | edit source]