mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-27 11:37:42 +01:00
Fix gravity, half-fix look close bug
This commit is contained in:
parent
3d893d81d0
commit
e4717d4bc7
@ -418,7 +418,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
|||||||
updatePackets(navigating);
|
updatePackets(navigating);
|
||||||
if (!navigating && getBukkitEntity() != null && npc.getTrait(Gravity.class).hasGravity()
|
if (!navigating && getBukkitEntity() != null && npc.getTrait(Gravity.class).hasGravity()
|
||||||
&& Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))) {
|
&& Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))) {
|
||||||
a(0, 0, 0);
|
e(new Vec3D(0, 0, 0));
|
||||||
}
|
}
|
||||||
Vec3D mot = getMot();
|
Vec3D mot = getMot();
|
||||||
if (Math.abs(mot.getX()) < EPSILON && Math.abs(mot.getY()) < EPSILON && Math.abs(mot.getZ()) < EPSILON) {
|
if (Math.abs(mot.getX()) < EPSILON && Math.abs(mot.getY()) < EPSILON && Math.abs(mot.getZ()) < EPSILON) {
|
||||||
|
@ -23,16 +23,15 @@ public class PlayerControllerLook {
|
|||||||
if (!NMSImpl.isNavigationFinished(this.a.getNavigation()))
|
if (!NMSImpl.isNavigationFinished(this.a.getNavigation()))
|
||||||
return;
|
return;
|
||||||
if (this.b()) {
|
if (this.b()) {
|
||||||
this.a.pitch = 0.0F;
|
// this.a.pitch = 0.0F;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.d) {
|
if (this.d) {
|
||||||
this.d = false;
|
this.d = false;
|
||||||
this.a.aM = this.a(this.a.aM, this.h(), this.b);
|
this.a.aM = this.a(this.a.aM, this.h(), this.b);
|
||||||
this.a.yaw = this.a.aM;
|
this.a.yaw = this.a.aM;
|
||||||
this.a.pitch = this.a(this.a.pitch, this.g(), this.c);
|
this.a.pitch = this.a(this.a.pitch, this.g(), this.c);
|
||||||
} else {
|
} 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()) {
|
if (!this.a.getNavigation().n()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user