Getting Started.md - gawrmonster/CustomHitboxLib GitHub Wiki
Getting Started
Installation
As a Mod Dependency (Java API)
If you're developing a mod that uses CustomHitboxLib:
- Download the JAR from Modrinth or CurseForge
- Place it in your
mods/folder alongside your mod loader - Add it as a dependency in your
build.gradle:
Forge 1.20.1
repositories {
maven { url = "https://modrinth.com/maven" }
}
dependencies {
implementation fg.deobf("com.gawrmonster:customhitboxlib:1.3.0")
}
NeoForge 1.21.1
repositories {
maven { url = "https://modrinth.com/maven" }
}
dependencies {
implementation "com.gawrmonster:customhitboxlib:2.0.0"
}
As a Datapack (No Code Required)
If you just want to add custom hitboxes to existing entities:
- Download the JAR from Modrinth or CurseForge
- Place it in your
mods/folder (both client and server need it) - Create a datapack -- see Datapack Guide
- Drop the datapack in your world's
datapacks/folder - Run
/reload
Sides
CustomHitboxLib must be installed on both client and server:
- Server side handles collision detection, pathfinding, rotation safety, and entity logic
- Client side handles rendering wireframe hitboxes and crosshair targeting of parts
If only installed on one side, the mod will not function correctly.
Verifying Installation
- Start Minecraft with the mod installed
- Open the logs and look for:
Loaded X custom part definitions from datapacks - Spawn an entity that has parts defined
- Press F3+B to see green wireframe hitboxes on the custom parts
Dependencies
| Dependency | Forge 1.20.1 | NeoForge 1.21.1 |
|---|---|---|
| Minecraft | 1.20.1 | 1.21.1 |
| Mod Loader | Forge 47.4.10+ | NeoForge 21.1.77+ |
| Java | 17+ | 21+ |