From 481c7ee5cb6ab0369a9ac46f33a84f947414cd37 Mon Sep 17 00:00:00 2001 From: Kam Date: Tue, 24 Feb 2026 23:21:57 -0500 Subject: [PATCH] Fix Slam Jumping into Air on Target Mode --- .../npcs/controllers/data/ability/type/AbilitySlam.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/kamkeel/npcs/controllers/data/ability/type/AbilitySlam.java b/src/main/java/kamkeel/npcs/controllers/data/ability/type/AbilitySlam.java index 994da4cba..8f4eeaf8c 100644 --- a/src/main/java/kamkeel/npcs/controllers/data/ability/type/AbilitySlam.java +++ b/src/main/java/kamkeel/npcs/controllers/data/ability/type/AbilitySlam.java @@ -128,7 +128,7 @@ public class AbilitySlam extends Ability implements IAbilitySlam { targetZ = caster.posZ; } else if (targetingMode == TargetingMode.AOE_TARGET && target != null && !target.isDead) { targetX = target.posX; - targetY = target.posY; + targetY = findGroundLevel(caster.worldObj, target.posX, target.posY, target.posZ, 64); targetZ = target.posZ; } } @@ -161,7 +161,7 @@ public class AbilitySlam extends Ability implements IAbilitySlam { targetZ = caster.posZ; } else if (targetingMode == TargetingMode.AOE_TARGET && target != null && !target.isDead) { targetX = target.posX; - targetY = target.posY; + targetY = findGroundLevel(caster.worldObj, target.posX, target.posY, target.posZ, 64); targetZ = target.posZ; } else { targetX = caster.posX; @@ -186,11 +186,8 @@ public class AbilitySlam extends Ability implements IAbilitySlam { if (isAirborne) { double groundY = findGroundLevel(caster.worldObj, caster.posX, caster.posY, caster.posZ, 64); highEnoughForAirSlam = (caster.posY - groundY) >= 3.0; - System.out.println("[Slam] AIR CHECK: posY=" + caster.posY + " groundY=" + groundY + " dist=" + (caster.posY - groundY) + " highEnough=" + highEnoughForAirSlam); } - System.out.println("[Slam] EXECUTE: onGround=" + caster.onGround + " isAirborne=" + isAirborne + " highEnough=" + highEnoughForAirSlam + " -> " + (isAirborne && highEnoughForAirSlam ? "AIR SLAM" : "GROUND SLAM")); - if (isAirborne && highEnoughForAirSlam) { // Air slam: player is already airborne (flying, falling, jumping) and high enough airSlam = true;