MythicMobs + ModelEngine Projectil Bounces Bug

Summary

When configuring a projectile to bounce in MythicMobs, using a ModelEngine entity, an error related to the projectile's bounding box occurs. The error indicates that the bounding boxes do not overlap and suggests that the bounding box might have been set to zero.

Steps to reproduce

  1. Set up an entity in ModelEngine.
  2. Configure a projectile in MythicMobs to use the ModelEngine entity with the following properties: bounce=true, bouncevelocity=0.95, and 3. other related properties.
  3. Launch the projectile in-game.
  4. Observe the error in the server console.

https://mclo.gs/3RshWkO (Mob and Skill)

This is the hitbox configuration of the model image image Current behavior

When the configured projectile, which uses a ModelEngine entity, is launched, an error related to bounding boxes appears in the server console. The error indicates that the bounding boxes do not overlap.

Intended correct behavior

The projectile, utilizing a ModelEngine entity, should bounce correctly without producing errors in the server console. Bounding boxes should function correctly to calculate the projectile's bounce.

Server log file

https://mclo.gs/dC7NRk0

Debug log snippet

https://mclo.gs/uciNYR1

Proposed fixes

Before reaching this exception check that modelengine is installed on the server and recover its hitbox. it would be something like this

ModeledEntity modeledEntity = ModelEngineAPI.getModeledEntity(api.getMythicMobInstance(entity).getUniqueId());    
if (modeledEntity != null) {
    Hitbox hitbox = modeledEntity.getBase().getHitbox();
    boundingBox = new BoundingBox(hitbox.getMaxWidth(), hitbox.getHeight(), hitbox.getDepth());
}

~Bug

Edited Sep 04, 2023 by MurcisLuis
Assignee Loading
Time tracking Loading