


A simple API for enabling custom entities to implement more than one collision box.
Setup
Add the Modrinth Maven and the right version of the mod to your build.gradle file:
repositories {
maven { url 'https://api.modrinth.com/maven' }
}
dependencies {
modImplementation "maven.modrinth:mecha-api:VERSION_GOES_HERE"
}
Usage
Implement MultiCollidable in your custom entity class, and override getColliders to add extra colliders to the entity.
Example
The following example code adds 2 colliders to an entity, each the size of a slab:
public CustomEntity extends Entity implements MultiCollidable {
public List<VoxelShape> getColliders() {
List<VoxelShape> colliders = new ArrayList<>();
BlockPos pos = this.blockPos();
double x = pos.getX();
double y = pos.getY();
double z = pos.getZ();
colliders.add(VoxelShapes.cuboid(x, y, z, x+1, y+0.5, z+1));
colliders.add(VoxelShapes.cuboid(x, y+0.5, z, x+1, y+1, z+1));
return colliders;
}
}
For 0.1.2 and newer, there is now also a custom entity type, DynamicBoundingBoxEntity, which has a dynamic bounding box based on the list returned by getColliders():
public CustomEntity extends DynamicBoundingBoxEntity {
// The bounding box of this entity will dynamically resize
// to fit the colliders returned by this function
@Override
public List<VoxelShape> getColliders() { ... }
}
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.19.4, 1.20, 1.20.1
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Modrinth — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
Verified by MCModsHub
- Ships as mecha-0.1.2.jar — drop this file into the mods folder
- Download size: 12 KB
- Download link checked 31 Aug 2026 — working
These come from our own check of the pack file, not from the source page.