From 6e26252328cdf16ffb4b76897ef7d5052d41015c Mon Sep 17 00:00:00 2001 From: fullwall Date: Sun, 10 Jan 2016 00:12:17 +0800 Subject: [PATCH] More realistic gravity --- .../java/net/citizensnpcs/npc/entity/EntityHumanNPC.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main/java/net/citizensnpcs/npc/entity/EntityHumanNPC.java b/src/main/java/net/citizensnpcs/npc/entity/EntityHumanNPC.java index e6f8b6bbe..06373bb68 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/EntityHumanNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/EntityHumanNPC.java @@ -314,9 +314,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable updatePackets(navigating); if (gravity && !navigating && getBukkitEntity() != null && Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION)) && !NMS.inWater(getBukkitEntity())) { - move(0, -0.2, 0); - // gravity. also works around an entity.onGround not updating issue - // (onGround is normally updated by the client) + g(0, 0); } if (Math.abs(motX) < EPSILON && Math.abs(motY) < EPSILON && Math.abs(motZ) < EPSILON) { @@ -327,9 +325,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable NMS.updateNavigation(navigation); } moveOnCurrentHeading(); - } else if (motX != 0 || motZ != 0 || motY != 0) { - g(0, 0); // is this necessary? it does controllable but sometimes - // players sink into the ground } if (noDamageTicks > 0) {