From 2f1e67660dcaeccae93f73434a8cbcd05d9588b5 Mon Sep 17 00:00:00 2001 From: Kam Date: Thu, 26 Feb 2026 02:59:40 -0500 Subject: [PATCH] Anchor Point Helper Eye - Item Staff Fixes --- src/main/java/kamkeel/npcs/util/AnchorPointHelper.java | 4 +++- src/main/java/noppes/npcs/items/ItemStaff.java | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/kamkeel/npcs/util/AnchorPointHelper.java b/src/main/java/kamkeel/npcs/util/AnchorPointHelper.java index ad0cefe9e..3cf7dd72b 100644 --- a/src/main/java/kamkeel/npcs/util/AnchorPointHelper.java +++ b/src/main/java/kamkeel/npcs/util/AnchorPointHelper.java @@ -75,7 +75,9 @@ public class AnchorPointHelper { float anchorZ = anchorData.anchorOffsetZ; double x = entity.posX; - double y = entity.posY + getClientPlayerYCorrection(entity); + // EYE uses getEyeHeight() which already gives the correct offset from posY, + // so the client player correction would double-subtract and place it at feet level + double y = entity.posY + (anchor == AnchorPoint.EYE ? 0 : getClientPlayerYCorrection(entity)); double z = entity.posZ; float headYaw = (float) Math.toRadians(entity.rotationYawHead); diff --git a/src/main/java/noppes/npcs/items/ItemStaff.java b/src/main/java/noppes/npcs/items/ItemStaff.java index 143f1c535..5ce50d011 100644 --- a/src/main/java/noppes/npcs/items/ItemStaff.java +++ b/src/main/java/noppes/npcs/items/ItemStaff.java @@ -65,6 +65,11 @@ public class ItemStaff extends ItemNpcInterface implements IProjectileCallback { EntityAbilityOrb orb = (EntityAbilityOrb) entity; + if (orb.getChargeProgress() < 1.0f) { + orb.setDead(); + return; + } + orb.startMoving(null); world.playSoundAtEntity( @@ -127,7 +132,7 @@ public class ItemStaff extends ItemNpcInterface implements IProjectileCallback { ); orb.setupCharging( - new EnergyAnchorData(AnchorPoint.FRONT, 0, -1, 0), + new EnergyAnchorData(AnchorPoint.EYE, 0, 0, 1), chargeTime );