Skip to content
LuckyMods

Addons Minecraft

Dynamic Entity Hitbox for Minecraft Bedrock: Hitboxes

Utilities

Checking why a mob can hit you from a distance, or how to position an entity in a build? Dynamic Entity Hitbox shows hitbox boundaries and collision geometry in Minecraft Bedrock. Use it to study entity positions, understand interactions, and fine-tune combat mechanics.

WavePlayz

Axes, Viewing Direction, and Boundaries 🎮

The pack draws debug shapes around entities, including the head area, and shows the coordinate axes: red is X, green is Y, and blue is Z. A cyan ray from the head area shows the entity’s server-side viewing direction. This makes it easier to track where it’s looking and where its boundaries lie.

Display takes distance and viewing direction into account: entities outside your field of view are skipped. You can adjust the radius; increasing it, for example to 1000, may also include entities behind you. Custom entities are supported, and in multiplayer the display can be configured for each player.

How to Enable the Display 🛠️

Minecraft Bedrock v1.20.90 and Beta Script API enabled are required. Put the pack in the behavior_packsfolder, enable it in the world settings, and activate Beta APIs under Experiments. For best performance, it’s recommended to use @minecraft/debug-utilities.

To get the tool, run /tool. You can also take a stick minecraft:stick named @hitbox_viewer. Use it with right-click or hold the action button: hitboxes of entities in your field of view will appear for a set time. If you crouch and use the tool, the display will stay on until you use it again.

Configuring with Commands

Slash commands let you change settings right in the game. Default values are shown in the table; for /mode only the listed numeric codes are accepted.

Dynamic Entity Hitbox Commands
Command Parameter and default value What it does
/remove — Removes the debug shapes.
/tool — Gives you the hitbox viewing tool.
/toggle — Enables or disables the pack.
/settings — Shows the active settings.
/duration <ticks: number> (default: 400) Changes how long the display stays on when the mode isn’t set to persistent.
/radius <radius: number> (default: 5) Changes the hitbox display distance.
/size <size: number> (default: 10) Changes the maximum size of an entity’s hitbox.
/refresh <refresh: number> (default: 5) Changes the update interval for dynamic entities, such as shulkers and players.
/maxcount <Entities: number> (default: 10) Changes the maximum number of entities displayed per player.
/mode [1 = hitbox, 2 = collisionbox, 3 = both] (default: both) Chooses whether to show the hitbox, collision box, or both. Only numeric codes are accepted.
/includeplayers — (default: false) Toggles hitbox display for players.
/sendnumerics <value: boolean> (default: false) Enables or disables numeric bounding box dimensions.

Updating Entity Data

The pack uses system.runJob() for real-time updates, and draws shapes using DebugBox and DebugLine. Hitbox dimensions are calculated using rays directed toward the entity from all cardinal directions. Hitboxes of static entities that don’t change aren’t recalculated; changing hitboxes are updated every 10 ticks, or twice per second.

In-game controls are also available through /scriptevent. The pack is useful if you’re building custom mechanics or want to study collisions and entity positions more precisely.

Files