mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-30 06:33:56 +01:00
Soil is passable
This commit is contained in:
parent
27a7b4e416
commit
94418b0934
@ -15,7 +15,6 @@ import net.citizensnpcs.util.Util;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class AStarNavigationStrategy extends AbstractPathStrategy {
|
||||
@ -77,16 +76,12 @@ public class AStarNavigationStrategy extends AbstractPathStrategy {
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user