Refactor entity owner checks and enhance FULL_MODEL rotation support in ability entities

This commit is contained in:
Kam committed 2026-02-15 21:29:26 -05:00
1 parent ce24c0a4ff
commit eda8931b5f
6 files changed
+175 -57

No files matched your search

@@ -391,19 +391,13 @@ public class EntityAbilityDisc extends EntityAbilityProjectile {
protected void updateCharging() {
chargeTick++;
Entity owner = getOwnerEntity();
if (owner == null || owner.isDead) {
setDead();
return;
}
// Grow size based on charge progress
float progress = getChargeProgress();
this.discRadius = targetDiscRadius * progress;
this.discThickness = targetDiscThickness * progress;
this.size = this.discRadius; // Base size for interpolation
// Calculate position based on anchor point, offset downward by half radius to center
Entity owner = getOwnerEntity();
if (owner instanceof EntityLivingBase) {
Vec3 pos = AnchorPointHelper.calculateAnchorPosition((EntityLivingBase) owner, anchorData);
setPosition(pos.xCoord, pos.yCoord, pos.zCoord);