mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 16:37:45 +00:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
008fca66bf
1 file changed
+8
@@ -299,6 +299,14 @@ public class EntityAbilityDome extends EntityAbilityBarrier {
|
||||
double surfaceX = posX + nx * pushDist;
|
||||
double surfaceY = posY + ny * pushDist - ent.height * 0.5;
|
||||
double surfaceZ = posZ + nz * pushDist;
|
||||
|
||||
// Prevent grounded entities from being teleported below the floor.
|
||||
// The spherical surface calculation can produce a Y below ground level
|
||||
// near the dome's equator, and setPosition bypasses collision detection.
|
||||
if (ent.onGround && surfaceY < ent.posY) {
|
||||
surfaceY = ent.posY;
|
||||
}
|
||||
|
||||
teleportEntity(ent, surfaceX, surfaceY, surfaceZ);
|
||||
|
||||
// Cancel radial velocity and add corrective push
|
||||
|
||||
Reference in new issue
Block a user