mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-16 12:21:25 +01:00
Widen navigating definition
This commit is contained in:
parent
cda8aceb5d
commit
73689cf9c2
@ -306,9 +306,8 @@ public class WanderWaypointProvider
|
||||
public void onSpawn(NPC npc) {
|
||||
this.npc = npc;
|
||||
if (currentGoal == null) {
|
||||
currentGoal = WanderGoal.builder(npc).xrange(xrange).yrange(yrange).fallback(this).tree(this)
|
||||
currentGoal = WanderGoal.builder(npc).xrange(xrange).yrange(yrange).fallback(this).tree(this).delay(delay)
|
||||
.worldguardRegion(getWorldGuardRegion()).build();
|
||||
currentGoal.setDelay(delay);
|
||||
}
|
||||
Iterator<GoalEntry> itr = npc.getDefaultGoalController().iterator();
|
||||
while (itr.hasNext()) {
|
||||
|
@ -290,7 +290,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
||||
return;
|
||||
}
|
||||
super.U();
|
||||
boolean navigating = npc.getNavigator().isNavigating();
|
||||
boolean navigating = npc.getNavigator().isNavigating() || controllerMove.a();
|
||||
if (!navigating && getBukkitEntity() != null
|
||||
&& (!npc.hasTrait(Gravity.class) || npc.getOrAddTrait(Gravity.class).hasGravity())
|
||||
&& Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))
|
||||
|
@ -122,7 +122,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
||||
}
|
||||
Bukkit.getServer().getPluginManager().unsubscribeFromPermission("bukkit.broadcast.user", bukkitEntity);
|
||||
|
||||
boolean navigating = npc.getNavigator().isNavigating();
|
||||
boolean navigating = npc.getNavigator().isNavigating() || controllerMove.a();
|
||||
updatePackets(navigating);
|
||||
|
||||
npc.update();
|
||||
|
@ -135,7 +135,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
||||
}
|
||||
Bukkit.getServer().getPluginManager().unsubscribeFromPermission("bukkit.broadcast.user", bukkitEntity);
|
||||
|
||||
boolean navigating = npc.getNavigator().isNavigating();
|
||||
boolean navigating = npc.getNavigator().isNavigating() || controllerMove.b();
|
||||
updatePackets(navigating);
|
||||
|
||||
npc.update();
|
||||
|
@ -355,7 +355,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
||||
return;
|
||||
}
|
||||
W();
|
||||
boolean navigating = npc.getNavigator().isNavigating();
|
||||
boolean navigating = npc.getNavigator().isNavigating() || controllerMove.b();
|
||||
if (!navigating && getBukkitEntity() != null
|
||||
&& (!npc.hasTrait(Gravity.class) || npc.getOrAddTrait(Gravity.class).hasGravity())
|
||||
&& Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))
|
||||
|
@ -359,7 +359,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
||||
return;
|
||||
}
|
||||
entityBaseTick();
|
||||
boolean navigating = npc.getNavigator().isNavigating();
|
||||
boolean navigating = npc.getNavigator().isNavigating() || controllerMove.b();
|
||||
if (!navigating && getBukkitEntity() != null
|
||||
&& (!npc.hasTrait(Gravity.class) || npc.getOrAddTrait(Gravity.class).hasGravity())
|
||||
&& Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))
|
||||
|
@ -359,7 +359,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
||||
return;
|
||||
}
|
||||
entityBaseTick();
|
||||
boolean navigating = npc.getNavigator().isNavigating();
|
||||
boolean navigating = npc.getNavigator().isNavigating() || controllerMove.b();
|
||||
if (!navigating && getBukkitEntity() != null
|
||||
&& (!npc.hasTrait(Gravity.class) || npc.getOrAddTrait(Gravity.class).hasGravity())
|
||||
&& Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))
|
||||
|
@ -389,7 +389,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
||||
return;
|
||||
}
|
||||
entityBaseTick();
|
||||
boolean navigating = npc.getNavigator().isNavigating();
|
||||
boolean navigating = npc.getNavigator().isNavigating() || controllerMove.b();
|
||||
if (!navigating && getBukkitEntity() != null
|
||||
&& (!npc.hasTrait(Gravity.class) || npc.getOrAddTrait(Gravity.class).hasGravity())
|
||||
&& Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))
|
||||
|
@ -169,7 +169,7 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable
|
||||
return;
|
||||
}
|
||||
super.baseTick();
|
||||
boolean navigating = npc.getNavigator().isNavigating();
|
||||
boolean navigating = npc.getNavigator().isNavigating() || controllerMove.hasWanted();
|
||||
if (!navigating && getBukkitEntity() != null
|
||||
&& (!npc.hasTrait(Gravity.class) || npc.getOrAddTrait(Gravity.class).hasGravity())
|
||||
&& Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))
|
||||
|
@ -170,7 +170,7 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable
|
||||
return;
|
||||
}
|
||||
super.baseTick();
|
||||
boolean navigating = npc.getNavigator().isNavigating();
|
||||
boolean navigating = npc.getNavigator().isNavigating() || controllerMove.hasWanted();
|
||||
if (!navigating && getBukkitEntity() != null
|
||||
&& (!npc.hasTrait(Gravity.class) || npc.getOrAddTrait(Gravity.class).hasGravity())
|
||||
&& Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))
|
||||
|
@ -173,7 +173,7 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable
|
||||
return;
|
||||
}
|
||||
super.baseTick();
|
||||
boolean navigating = npc.getNavigator().isNavigating();
|
||||
boolean navigating = npc.getNavigator().isNavigating() || controllerMove.hasWanted();
|
||||
if (!navigating && getBukkitEntity() != null
|
||||
&& (!npc.hasTrait(Gravity.class) || npc.getOrAddTrait(Gravity.class).hasGravity())
|
||||
&& Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))
|
||||
|
@ -291,7 +291,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
||||
}
|
||||
|
||||
super.K();
|
||||
boolean navigating = npc.getNavigator().isNavigating();
|
||||
boolean navigating = npc.getNavigator().isNavigating() || controllerMove.a();
|
||||
if (!navigating && getBukkitEntity() != null
|
||||
&& (!npc.hasTrait(Gravity.class) || npc.getOrAddTrait(Gravity.class).hasGravity())
|
||||
&& Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))
|
||||
|
Loading…
Reference in New Issue
Block a user