promotional bannermobile promotional banner

MECHA - Multiple Entity Collision Hitboxes API

Fabric API for implementing multiple collider hitboxes for a single entity

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; } }

The MECHA - Multiple Entity Collision Hitboxes API Team

profile avatar
  • 3
    Followers
  • 2
    Projects
  • 1.4K
    Downloads

More from bytemaniak

  • MCQuake3 project image

    MCQuake3

    • 1.0K
    • Mods

    Quake3 mod for Minecraft 1.19.3+

    • 1.0K
    • November 21, 2025
    • Mods
    • +1
  • MCQuake3 project image

    MCQuake3

    • 1.0K
    • Mods

    Quake3 mod for Minecraft 1.19.3+

    • 1.0K
    • November 21, 2025
    • Mods
    • +1