From 07ebe90437c34fbe3e1e5447b5caf5135329fa10 Mon Sep 17 00:00:00 2001 From: Kam Date: Mon, 9 Mar 2026 22:56:09 -0400 Subject: [PATCH] Fix Barrier Collision Logic --- src/main/java/kamkeel/npcs/entity/EntityEnergyBarrier.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/kamkeel/npcs/entity/EntityEnergyBarrier.java b/src/main/java/kamkeel/npcs/entity/EntityEnergyBarrier.java index 9683c2894..4ccb01269 100644 --- a/src/main/java/kamkeel/npcs/entity/EntityEnergyBarrier.java +++ b/src/main/java/kamkeel/npcs/entity/EntityEnergyBarrier.java @@ -741,6 +741,13 @@ public abstract class EntityEnergyBarrier extends EntityEnergyAbility { double px = ent.posX + dirX * probe; double py = ent.posY + dirY * probe; double pz = ent.posZ + dirZ * probe; + // Never probe below the entity's feet — a downward probe always detects the + // block the entity is already standing/hovering above (false positive). + // MC's own collision system prevents entities from falling through floors, + // so the downward check is redundant. Upward probes (ceiling detection) still work. + if (py < ent.posY) { + py = ent.posY; + } AxisAlignedBB box = AxisAlignedBB.getBoundingBox( px - halfW, py, pz - halfW, px + halfW, py + ent.height, pz + halfW