KarnsLib
by Karn
KarnsLib is a server-side Fabric library that draws shapes, hitboxes and paths with particles, and exposes a command for placing them.
What it does
Hitbox and particle shape drawing is the core of KarnsLib. Cubic, sphere, cylinder, line and arc shapes are rendered as particles so that players can see the area a mechanic covers. Lines can be defined by two points, or by one point with a rotation and a length, and the shapes can be mixed in a single drawing.
The library is built for other mod authors and for server owners who need visual feedback in adventure maps or command setups. A shape can be drawn at a local position relative to a source, and the library returns the list of entities and living entities, including players, found inside a shape. The author describes the work as ongoing, with more shape types planned.
KarnsLib runs on the server only, so players join without installing anything. It is published for Fabric alone, with files for 1.20.2, 1.20.3 and 1.20.4 (latest file 0.2 for 1.20.2). The mod is released under All rights reserved and is not open source, though the source code is publicly available.
Key features
Cubic and sphere hitboxes
Cubes and spheres are drawn with particles to show the volume a hitbox covers.
Cylinder and arc shapes
Cylinders and arcs join the set, so curved or round areas can be marked on the ground or in the air.
Line shapes
Lines can be defined by two points, or by a single point together with a rotation and a length.
Entity detection in shapes
The library returns the entities, living entities and players that fall inside a drawn shape.
Local position command
A Minecraft command lets a shape be placed at a local position, which helps in command-based setups.
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 authors who need particle-drawn hitboxes and server owners running adventure maps or command setups on Minecraft 1.20.2 – 1.20.4 with Fabric.
How it compares
Solid Hitbox is a Fabric mod for 1.21.11 that runs on the client and server together under a custom license, and it is not open source. Hitbox+ is client-side only, released under All rights reserved, and covers 1.21.11 – 26.3. KarnsLib differs from both by running on the server alone, for 1.20.2 – 1.20.4, and by drawing shapes rather than showing entity boxes.
| Mod | Loaders | Game versions | Environment | Updated |
|---|---|---|---|---|
| KarnsLib | Fabric | 1.20.2 – 1.20.4 | Server-side only | 2024-01-16 |
| Solid Hitbox | Fabric | 1.21.11 | Client and server | 2026-03-27 |
| Hitbox+ | Fabric | 1.21.11 – 26.3 | Client-side only | 2026-10-13 |
Questions
Does KarnsLib need to be installed on the client?
Which loader does KarnsLib support?
Is the source code of KarnsLib available?
More from Karn
What the author says
WIP mod that add Hitbox Types, Particle Shapes, and More. Hitbox: returns List of Entity, or LivingEntity, or Player. - Cubic Hitbox - Sphere Hitbox - Cylinder Hitbox - Line Hitbox
Official listing
- Modrinth page
- modrinth.com/mod/karnslib
- Owner
- Karn
- Published
- 2024-01-05
- Updated on Modrinth
- 2024-01-16
- Facts verified
- 2026-10-15