From e4717d4bc7c24c1465bdb50944517106fbc6e31e Mon Sep 17 00:00:00 2001 From: fullwall Date: Fri, 26 Apr 2019 17:53:53 +0800 Subject: [PATCH] Fix gravity, half-fix look close bug --- .../net/citizensnpcs/nms/v1_14_R1/entity/EntityHumanNPC.java | 2 +- .../citizensnpcs/nms/v1_14_R1/util/PlayerControllerLook.java | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EntityHumanNPC.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EntityHumanNPC.java index b9e9f0f5f..8c811b32c 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EntityHumanNPC.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EntityHumanNPC.java @@ -418,7 +418,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable updatePackets(navigating); if (!navigating && getBukkitEntity() != null && npc.getTrait(Gravity.class).hasGravity() && Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))) { - a(0, 0, 0); + e(new Vec3D(0, 0, 0)); } Vec3D mot = getMot(); if (Math.abs(mot.getX()) < EPSILON && Math.abs(mot.getY()) < EPSILON && Math.abs(mot.getZ()) < EPSILON) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/PlayerControllerLook.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/PlayerControllerLook.java index 21a7398e2..ad1b753f8 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/PlayerControllerLook.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/PlayerControllerLook.java @@ -23,16 +23,15 @@ public class PlayerControllerLook { if (!NMSImpl.isNavigationFinished(this.a.getNavigation())) return; if (this.b()) { - this.a.pitch = 0.0F; + // this.a.pitch = 0.0F; } - if (this.d) { this.d = false; this.a.aM = this.a(this.a.aM, this.h(), this.b); this.a.yaw = this.a.aM; this.a.pitch = this.a(this.a.pitch, this.g(), this.c); } else { - this.a.aM = this.a(this.a.aM, this.a.aK, 10.0F); + // this.a.aM = this.a(this.a.aM, this.a.aK, 10.0F); } if (!this.a.getNavigation().n()) {