Fix gravity

This commit is contained in:
fullwall 2020-08-08 15:21:54 +08:00
parent d579fcbb53
commit b902879ca6
8 changed files with 8 additions and 8 deletions

View File

@ -287,7 +287,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
} }
boolean navigating = npc.getNavigator().isNavigating(); boolean navigating = npc.getNavigator().isNavigating();
if (!navigating && getBukkitEntity() != null if (!navigating && getBukkitEntity() != null
&& (npc.hasTrait(Gravity.class) && npc.getTrait(Gravity.class).hasGravity()) && (!npc.hasTrait(Gravity.class) || npc.getTrait(Gravity.class).hasGravity())
&& Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))) { && Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))) {
g(0, 0); g(0, 0);
} }

View File

@ -347,7 +347,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
cA(); cA();
boolean navigating = npc.getNavigator().isNavigating(); boolean navigating = npc.getNavigator().isNavigating();
if (!navigating && getBukkitEntity() != null if (!navigating && getBukkitEntity() != null
&& (npc.hasTrait(Gravity.class) && npc.getTrait(Gravity.class).hasGravity()) && (!npc.hasTrait(Gravity.class) || npc.getTrait(Gravity.class).hasGravity())
&& Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))) { && Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))) {
g(0, 0); g(0, 0);
} }

View File

@ -374,7 +374,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
Y(); Y();
boolean navigating = npc.getNavigator().isNavigating(); boolean navigating = npc.getNavigator().isNavigating();
if (!navigating && getBukkitEntity() != null if (!navigating && getBukkitEntity() != null
&& (npc.hasTrait(Gravity.class) && npc.getTrait(Gravity.class).hasGravity()) && (!npc.hasTrait(Gravity.class) || npc.getTrait(Gravity.class).hasGravity())
&& Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))) { && Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))) {
a(0, 0, 0); a(0, 0, 0);
} }

View File

@ -344,7 +344,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
W(); W();
boolean navigating = npc.getNavigator().isNavigating(); boolean navigating = npc.getNavigator().isNavigating();
if (!navigating && getBukkitEntity() != null if (!navigating && getBukkitEntity() != null
&& (npc.hasTrait(Gravity.class) && npc.getTrait(Gravity.class).hasGravity()) && (!npc.hasTrait(Gravity.class) || npc.getTrait(Gravity.class).hasGravity())
&& Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))) { && Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))) {
a(0, 0, 0); a(0, 0, 0);
} }

View File

@ -348,7 +348,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
entityBaseTick(); entityBaseTick();
boolean navigating = npc.getNavigator().isNavigating(); boolean navigating = npc.getNavigator().isNavigating();
if (!navigating && getBukkitEntity() != null if (!navigating && getBukkitEntity() != null
&& (npc.hasTrait(Gravity.class) && npc.getTrait(Gravity.class).hasGravity()) && (!npc.hasTrait(Gravity.class) || npc.getTrait(Gravity.class).hasGravity())
&& Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))) { && Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))) {
e(new Vec3D(0, 0, 0)); e(new Vec3D(0, 0, 0));
} }

View File

@ -348,7 +348,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
entityBaseTick(); entityBaseTick();
boolean navigating = npc.getNavigator().isNavigating(); boolean navigating = npc.getNavigator().isNavigating();
if (!navigating && getBukkitEntity() != null if (!navigating && getBukkitEntity() != null
&& (npc.hasTrait(Gravity.class) && npc.getTrait(Gravity.class).hasGravity()) && (!npc.hasTrait(Gravity.class) || npc.getTrait(Gravity.class).hasGravity())
&& Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))) { && Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))) {
e(new Vec3D(0, 0, 0)); e(new Vec3D(0, 0, 0));
} }

View File

@ -379,7 +379,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
entityBaseTick(); entityBaseTick();
boolean navigating = npc.getNavigator().isNavigating(); boolean navigating = npc.getNavigator().isNavigating();
if (!navigating && getBukkitEntity() != null if (!navigating && getBukkitEntity() != null
&& (npc.hasTrait(Gravity.class) && npc.getTrait(Gravity.class).hasGravity()) && (!npc.hasTrait(Gravity.class) || npc.getTrait(Gravity.class).hasGravity())
&& Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))) { && Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))) {
f(new Vec3D(0, 0, 0)); f(new Vec3D(0, 0, 0));
} }

View File

@ -292,7 +292,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
} }
boolean navigating = npc.getNavigator().isNavigating(); boolean navigating = npc.getNavigator().isNavigating();
if (!navigating && getBukkitEntity() != null if (!navigating && getBukkitEntity() != null
&& (npc.hasTrait(Gravity.class) && npc.getTrait(Gravity.class).hasGravity()) && (!npc.hasTrait(Gravity.class) || npc.getTrait(Gravity.class).hasGravity())
&& Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))) { && Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))) {
g(0, 0); g(0, 0);
} }