Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Hitbox

From SAS Gaming Wiki
Revision as of 11:08, 7 May 2026 by SyncBot (talk | contribs) (Sync: new page from Minecraft)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
File:Zombie chasing villager with hitboxes.png
A zombie chasing a Minecraft:villager with their hitboxes visible by using Template:Keys debug hotkey.

A hitbox defines the physical boundary (or an approximation) of a Minecraft:block or Minecraft: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.

Template:IN, hitboxes can be seen through the Template:Keys Minecraft:debug hotkey.

Entity hitboxes

Bounding box

File:Entities' hitboxes comparison.png
Several entities with different bounding box sizes next to each other. From left to right, the shortest to tallest: chicken, Minecraft:pig, Minecraft:cow, Minecraft:creeper, Minecraft:zombie, and Minecraft: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 Minecraft:players, Minecraft:villagers, Minecraft:arrows, and other entities. Template:IN, it's shown as a white color coded hitbox around the entities' Minecraft: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 Minecraft: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 Minecraft:sneaking, Minecraft:crawling, Minecraft:swimming, Minecraft:gliding, or any other means.

Bounding boxes can be scaled by Template:Attr attribute, or for specific entities, like Minecraft:interaction, it can be changed by modifying their entity data.

Eye height

File:Wither skeleton and villager eye height.png
A wither skeleton has a taller eye height hitbox (red) than a Minecraft: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 Minecraft:fluid or phasing through a solid block. In this state, the game usually times the entity Minecraft:drowning or Minecraft:suffocating. In Java Edition, it's shown as red box typically appearing on entities' eyes or head.

The eye height is also used to determine if two Minecraft:entities can see and follow each other by their eye contact.<ref name="eye-contact">Template:Mcnet</ref>

View vector

A blue arrow starting from the eye position and sticking forward 2 blocks shows the orientation the entities are facing, this is called the view vector.<ref>Template:Jcp defines the end position of this arrow as the "viewVector".</ref> This arrow does not indicate a hit-scan or line of sight test, instead, the mechanic is handled as a part of the Minecraft:mob AI and a different method<ref>Template:Jcp method is primarily used in detecting if the target is looking at an entity.</ref>.

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

Template:Anchor Template:FakeImage

File:Fences hitboxes height.png
Fences have a one Minecraft: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 Minecraft:slabs, Minecraft:lecterns, Minecraft:lily pads, Minecraft:fences, Minecraft:walls, and Minecraft:stairs.

A collision box may not be present for all blocks; Minecraft:non-solid blocks such as Minecraft:grass, Minecraft:sign, Minecraft:button, Minecraft:lever, and Minecraft:torch have no collision box. Template:Collapse

While most blocks have their collision box identical to their interaction boxTemplate:Note or an empty collision box if it is a non-solid block, some may have a different collision box compared to their interaction box counterpart. For instance, a Minecraft:lectern's collision box does not extend into the upper part of their interaction box, and a Minecraft:fence's collision box is a bit taller than their interaction box. The table below shows all the exceptions Template:In:Template:Note

  1. REDIRECT Template:PG/-

Template:IN, it is possible to visualize the collision boxes by enabling Template:Cd in the debug renderer. It is also possible to see when the Minecraft:debug property Template:Cd is enabled, indicated by a dark gray outline.

Interaction box

File:Barrier Outline Box (held).png
A barrier block's interaction box is shown when hovered by the Minecraft:crosshair.

The interaction box manages block interactions with Minecraft:players, such as block placement, destruction, Template:Control actions, etc. When looking at the given block, the interaction box is shown as a black outline around the block's edges; this is especially visible in the Minecraft:barrier block. The interaction box appears only if the block the player is looking at is inside of the Minecraft:interaction range.

A block's interaction box is usually contained within its own 1×1×1 cube space. However, some blocks, such as the ones reported below, are capable of extending outside of this space.

  • The very top part of a Minecraft:lectern's head.Template:Only This is particularly noticeable when a block is placed above the lectern, making the lectern's outline overlap with the block.

The interaction box isn't visible when aiming the Minecraft:crosshair at the part that extends outside of the cube.<ref>Template:Bug</ref>

Template:IN, the interaction box outline is cyan (Template:Color) with a small black outline if Template:UI is enabled. When the Minecraft:debug property Template:Cd is enabled, the interaction box outline is white.

Miscellaneous hitboxes

Blocks visual box

In most instances where Minecraft uses line clipping for detection, it utilizes the collision box or the interaction box of the blocks. For example, when a player tries to interact with a block, the game draws a line from it to the Minecraft:interaction range and looks for the first block whose interaction box the line intersects with. In the case of movement, the game draws a line in the direction of movement to find the first collision box to limit movement instead of crossing it.

However, there are five situations in the game where line clipping uses neither the interaction box nor the collision box, instead, the game uses the visual box. The visual box attempts to simulate what a sight would look like; however, most game sight simulations, such as a Minecraft:mob AI searching for a target, use line clipping with a collision box.

For Minecraft:fences, Minecraft:mud, Minecraft:snow, and Minecraft:soul sand the visual box and the interaction box are identical. For all copper bars, Minecraft:copper grates, Minecraft:glass, Minecraft:glass pane, Minecraft:iron bars, Minecraft:powder snow, Minecraft:stained glass, Minecraft:stained glass pane, and Minecraft:tinted glass the visual box are empty. For all other blocks, the visual box and the collision box are identical.

Note that many Minecraft:transparent blocks have an empty visual box; this is so they can be ignored when drawing a line of sight, because they are transparent. However, not all transparent blocks are ignored; for example, the Minecraft:barrier, Minecraft:ice, and Minecraft:leaves have a full visual box.

Below are all the uses of the visual box Template:In:

  • Third-person view camera: To position the Minecraft:third-person view camera, the game calculates the distance from the player based on the visual box, using it to avoid collisions.
  • Looking at the creaking: Visual boxes are used by the Minecraft:creaking to know if it is in a player's line of sight; if so, it stops. This is different from Minecraft:endermen, which use the collision box to detect when a player is looking at them.
  • Trial spawner detecting a player: When the Minecraft:trial spawner attempts to detect a player in order to activate, or detect a player with Minecraft:Trial Omen, the player needs to be looking at the spawner, and for that, a visual box is used. However, if the spawner already has a player in its list of detected players, new players will not need to look at the spawner unless they want to use the Trial Omen effect to convert the spawner into an Minecraft:ominous trial spawner.
  • Trial spawner mob spawning: When attempting to spawn a mob, the trial spawner checks if the position where it will spawn is visible starting from the center of the block where it is located. For this, it uses the visual box.
  • Ominous item spawner: When an Minecraft:ominous item spawner spawns above an entity, it first defines a point between 2 and 5 blocks above the top of the entity's hitbox. Then, it draws a line from the entity to that point, stopping at the chosen point or one block below the first collision found by the visual box. Note that this means that if an entity is directly below, for example, a glass block, the ominous item spawner will be spawned above the glass.

Particle collision box

Some particles have physics: for example, the smoke particles from campfires. Particles with physics have a collision box that collides with collision box of blocks. Upon collision, the particle's motion is brought to zero along one of the axes, depending on the direction of the collision.

However, particles are generated even if their collision box intersects the collision box of a block. When this happens, the particle ignores the collision box.

A lit Minecraft:campfire creates smoke particles between 0 and 2 blocks above it, with a symmetric triangular distribution, by the formula Template:Cd, when Template:Cd is the Y coordinates of the campfire and Template:Cd is a random number between 0 and 1. Each particle has a 4×4×4 pixels (0.25×0.25×0.25 blocks) collision box. Therefore, the closer a collision box is above the campfire, the more likely a smoke particle is to pass through it, and when the collision box is at 2.25 blocks or more, no particle will pass through it.

For example, 71.9% of smoke particles pass through a full collidable block one block above the campfire, 28.1% pass through a top Minecraft:slab one block above the campfire, 3.13% pass through a full collidable block two blocks above the campfire, only 0.195% pass through a Minecraft:cauldron two blocks above the campfire, and no particle passes through a top slab two block above the campfire.Template:Note

List of entities' hitbox sizes

Template:Anchor

Most Minecraft:entities' bounding boxes are shaped in Template:Ws, and do not always overlap with the Minecraft:models of the entities. For example, the Minecraft:witch's bounding box does not include the upper part of its hat, and the Minecraft: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 Minecraft:blocks tall.

Base hitbox size

Below is a table of every entities' hitboxes, mainly sourced from Java Edition, unless stated otherwise. The list shows sizes of the entities' base bounding box size; other hitboxes may be noted.<ref group="note">In the game's code, most entities bounding boxes are defined in Template:Jcp class. Baby variant of mobs are not defined there, instead typically in each individual mob class.</ref>

Some entities' hitbox size is marked with "Varies", this indicates that the entity has variable hitbox sizes, see Template:Slink. For others, "None" marks that the entity does not have hitbox, and "N/A" indicates no data is available yet for the entity in the wiki. An empty cell indicates that the entity may not have hitbox or no data is available yet ("None" or "N/A").

Template:Hatnote

Minecraft:Hitbox/Entities' hitboxes

  1. REDIRECT Template:PG/-

Variable hitbox size

Template:Anchor

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. Some entities may also spawn in different sizes, like Minecraft:slime, Minecraft:magma cube, and Minecraft:salmonTemplate:Only.

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

Entity States Height Width
Template:EntityLink Normal 2.375 1.7
Sitting 0.945 1.0
Sitting (Baby) 0.945 0.45
Template:EntityLink Normal 1.3 0.9
Jumping 0.91 0.63
Template:EntityLink Small 0.52 0.5202
Medium 1.04 1.0404
Big 2.08 2.0808
Template:EntityLink Normal 1.8 0.6
Sneaking 1.5 0.6
Gliding/Swimming 0.6 0.6
Sleeping 0.2 0.2
Template:EntityLink Normal 1.4 1.4
Attacking 2.0 1.0
Template:EntityLink Unpuffed 0.35 0.35
Semi-puffed 0.49 0.49
Fully Puffed 0.7 0.7
Template:EntityLinkTemplate:Only Small 0.25 0.25
Medium 0.5 0.5
Large 0.75 0.75
Template:EntityLink Closed 1 1
Peeking 1.2 1
Open 2 1
Template:EntityLink Small 0.52 0.5202
Medium 1.04 1.0404
Big 2.08 2.0808
Template:EntityLink Normal 2.9 0.9
Digging/Emerging 1 0.9

History

Java Edition

Block hitboxes

Template:Info needed section

Template:HistoryTable

Entity hitboxes

Template:HistoryTable

Bedrock Edition

Template:Expand section

Entity hitboxes

Template:HistoryTable

Issues

Template:Issue list

Trivia

  • Template:IN, the visually shown entity hitboxes that appear when Template:Keys sometimes do not render where the hitbox actually is, as it is just highlighting the area relative to the position of the entity that has the hitbox. This can be quite prominent if the player runs Template:Cmd when a mob is moving.
  • Template:IN, if an entity has the Minecraft:Invisibility effect, its hitbox is not visually shown when Template:Keys is pressed.

Gallery

Screenshots

Notes

Template:Notelist

References

Template:Reflist

Navigation

Template:Navbox gameplay

Minecraft:de:Hitbox Minecraft:es:Caja de colisión Minecraft:ja:当たり判定 Minecraft:pl:Hitbox Minecraft:pt:Caixa de colisão Minecraft:ru:Хитбокс Minecraft:zh:判定箱