Hitbox Api Mod (1.21.11, 1.21.1) – Add Custom Collider Shapes and Render Mob
Hitbox Api Mod adds more common collider shapes to Minecraft as a library mod. It brings five new collider types: Oriented Bounding Box (OBB), Sphere, Capsule, Ray, and Compound. With this mod, multiple colliders can be combined into one composite shape, and you can also cache and view hitboxes on mobs in-game.
![]()
Features:
- Compound Colliders: Combines multiple colliders into one single collider, and lets composite colliders be nested inside each other.
- Entity Collider Caching: Caches collider boxes on entities by attaching
HitboxDataAttachments#COLLISION, though this cached data is not saved permanently. - Adds Oriented Bounding Box (OBB), Sphere, Capsule, and Ray collider shapes for collision detection.
- Lets you see cached colliders rendered in the game by pressing the F3 + B shortcut.
- Includes the
ColliderUtilclass with methods to check if a collision has happened.
Collider Performance Benchmark:
Tested with JMH Benchmark (5 warm-up rounds, 5 test rounds) on an AMD R5 5600G CPU with 32GB memory and Microsoft OpenJDK 21.0. Higher scores mean better speed when checking collisions between the same collider type, while rotated entries include the time needed to rotate the collider and recalculate its vectors:
| Collider | Score | Error | Unit |
|---|---|---|---|
| Axis-Aligned Bounding Box | 3561837865.930 | 157982649.213 | Ops/s |
| Sphere | 119556589.705 | 1711146.560 | Ops/s |
| Capsule | 22350681.198 | 238993.658 | Ops/s |
| Rotated Capsule | 16842309.523 | 103959.918 | Ops/s |
| Oriented Bounding Box | 5528493.224 | 64548.996 | Ops/s |
| Rotated Oriented Bounding Box | 4648963.750 | 111369.535 | Ops/s |
How to Use:
- Create a collider object wherever you need collision detection.
- Use the methods inside
ColliderUtilto check if a collision has occurred. - Attach
HitboxDataAttachments#COLLISIONto an Entity to turn on collider box caching for it. - Press F3 + B in the game to render and view the cached collider box on the screen.
How to Install:
New to Minecraft? Follow our step-by-step guide to install Mods on your PC.View Guide
Requirements:
Hitbox Api Mod Download Links
0



















This post has no comments yet. Be the first — your comment will appear here.