mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 18:05:10 +00:00
Refactor entity owner checks and enhance FULL_MODEL rotation support in ability entities
This commit is contained in:
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);
|
||||
|
||||
Reference in new issue
Block a user