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 );