Hitbox Api
by AnECanSaiTin
Hitbox Api adds collider objects for Minecraft entities and blocks, including oriented bounding boxes, combined colliders and composite colliders nested in one another.
What it does
Collision detection is the step where a game object tests whether it touches another one. Hitbox Api supplies the colliders for that step: a developer builds a collider object with the methods of ColliderUtil wherever collision detection is needed, then checks whether a collision occurred. Oriented bounding boxes, which can be rotated with the relevant vectors recalculated, cover shapes that plain axis-aligned boxes fit poorly. Several colliders can be merged into one, or nested inside a composite collider.
Entities keep their collider box in a cache attached through HitboxDataAttachments under COLLISION, so the box is not rebuilt on every check. A cached collider is drawn on screen by pressing F3 + B. The author notes that data persistence is implemented, and that collision detection works between colliders of the same type. The mod is licensed under the GNU General Public License v3.0 or later and is open source; its source code and issue tracker are public.
The library is installed on both the server and the client, and the environment is client and server. It targets NeoForge only, with release files for 1.21 – 1.21.3; the latest file, neo-1.21.1-1.0.0, is marked for 1.21.3 and was published on 2024-12-03, the same day the mod was first released.
Key features
Oriented bounding boxes
Colliders can be oriented boxes that rotate with the object they wrap, not only boxes aligned to the axes.
Combined and nested colliders
Several colliders can be joined into one shape, and composite colliders can contain other composite colliders.
Cached entity colliders
Entity collider boxes are stored through HitboxDataAttachments, so they are reused rather than recalculated each time.
Debug rendering
Pressing F3 + B shows the cached colliders on screen, which helps check where a box sits.
Gallery
Compatibility
Latest build for each game version and loader.
Only full game releases are shown. This mod publishes no snapshot builds.
Use cases
Who it’s for: Mod developers who write NeoForge code for Minecraft 1.21 – 1.21.3 and need collision shapes beyond simple boxes. The mod does not add items, blocks or entities of its own.
Questions
Does Hitbox Api need other mods to run?
Does Hitbox Api have to be installed on both sides?
Which game versions does Hitbox Api support?
In the catalog
Hitbox Api is one of 3,514 Library mods on ModsFinder, and one of 1,449 Library mods for NeoForge. 13,252 mods support Minecraft 1.21.3.
More from AnECanSaiTin
Similar mods
What the author says
In any place where collision detection is needed, create a collider object and use the methods in ColliderUtil to determine if a collider has occurred. For entities (Entity), you can achieve collider box caching by attaching HitboxDataAttachments#COLLISION. The cached collider can be rendered by pressing F3 + B. Note…
Official listing
- Modrinth page
- modrinth.com/mod/hitbox-api
- Owner
- AnECanSaiTin
- Published
- 2024-12-03
- Updated on Modrinth
- 2024-12-03
- Facts verified
- 2026-10-15
