Skip to content

Commit

Permalink
Soil is passable
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Mar 8, 2014
1 parent 726f8f3 commit eeb5c7f
Showing 1 changed file with 2 additions and 7 deletions.
Expand Up @@ -15,7 +15,6 @@

import org.bukkit.Effect;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.util.Vector;

public class AStarNavigationStrategy extends AbstractPathStrategy {
Expand Down Expand Up @@ -77,16 +76,12 @@ public boolean update() {
double distance = xzDistance + dY * dY;
if (Setting.DEBUG_PATHFINDING.asBoolean()) {
npc.getEntity().getWorld()
.playEffect(vector.toLocation(npc.getEntity().getWorld()), Effect.ENDER_SIGNAL, 0);
.playEffect(vector.toLocation(npc.getEntity().getWorld()), Effect.ENDER_SIGNAL, 0);
}
if (distance > 0 && dY > 0 && dY < 1 && xzDistance <= 2.75) {
NMS.setShouldJump(npc.getEntity());
}
double destX = vector.getX(), destZ = vector.getZ();
if (npc.getEntity().getWorld().getBlockAt(vector.getBlockX(), vector.getBlockY(), vector.getBlockZ()).getType() == Material.LADDER) {
destX += 0.5;
destZ += 0.5;
}
double destX = vector.getX() + 0.5, destZ = vector.getZ() + 0.5;
NMS.setDestination(npc.getEntity(), destX, vector.getY(), destZ, params.speed());
params.run();
plan.run(npc);
Expand Down

0 comments on commit eeb5c7f

Please sign in to comment.