Entities inside of such boxes can still be hit by melee attacks if they hitbox is big enough.
my suggestion is to make a mixin in "Entity$isPickable" to make any entity "riding" in a invisible "seatEntity" be immune of the melee hitpoint;
@Override
public boolean isPickable() {
// Prevents crosshairs, melee attacks, and raycasts from targeting the entity
return !(this.getVehicle() instanceof SeatEntity) && super.isPickable();
}
@Override
public boolean canBeCollidedWith() {
// Stops other entities/players from pushing or colliding into the entity
return !(this.getVehicle() instanceof SeatEntity) && super.canBeCollidedWith();
}
@Override
public boolean canBeHitByProjectile() {
// Lets arrows and projectiles pass straight through without hitting a bounding box
return !(this.getVehicle() instanceof SeatEntity) && super.canBeHitByProjectile();
}
Entities inside of such boxes can still be hit by melee attacks if they hitbox is big enough.
my suggestion is to make a mixin in "Entity$isPickable" to make any entity "riding" in a invisible "seatEntity" be immune of the melee hitpoint;