mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-11 23:07:37 +00:00
Fix Custom Hitboxes not working on Custom Entities / Models
This commit is contained in:
1 parent
1e51d6b243
commit
269bb8346e
1 file changed
+11
@@ -72,11 +72,22 @@ public class EntityCustomNpc extends EntityNPCFlying {
|
||||
((EntityNPCInterface)entity).updateHitbox();
|
||||
width = (entity.width / 5f) * display.modelSize;
|
||||
height = (entity.height / 5f) * display.modelSize;
|
||||
if(display.hitboxData.isHitboxEnabled()){
|
||||
width = width * display.hitboxData.getWidthScale();
|
||||
height = height * display.hitboxData.getHeightScale();
|
||||
}
|
||||
|
||||
if(width < 0.1f)
|
||||
width = 0.1f;
|
||||
if(height < 0.1f)
|
||||
height = 0.1f;
|
||||
if(isKilled() && stats.hideKilledBody){
|
||||
width = 0.00001f;
|
||||
}
|
||||
if(width / 2 > worldObj.MAX_ENTITY_RADIUS) {
|
||||
worldObj.MAX_ENTITY_RADIUS = width / 2;
|
||||
}
|
||||
|
||||
this.setPosition(posX, posY, posZ);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user