Mineuniverse
Mods
MECHA - Multiple Entity Collision Hitboxes API

MECHA - Multiple Entity Collision Hitboxes API

MOD
Fabric API for implementing multiple collider hitboxes for a single entity
by bytemaniak
Download Claim this project
528 downloads
0 likes
Updated Oct 14, 2026
0 hypes
API and Library
Advertisement Remove ads with Premium →

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; } }
MECHA 0.1.1 - Fabric 1.19.4
MC 1.19.4, Fabric, Client, Server
Beta 2024-05-12 Get
MECHA 0.1.1 - Fabric 1.20
MC 1.20.2, 1.20.5, Fabric, Client, 1.20.3, 1.20.1, 1.20.6, 1.20.4, Server
Beta 2024-05-12 Get

More from bytemaniak

Advertisement Remove ads with Premium →

You Might Also Like