This commit is contained in:
Aleksey 2020-11-21 01:27:06 +03:00
commit 7192df49d1

View file

@ -144,12 +144,13 @@ public class EntityDragonfly extends AnimalEntity implements Flutterer {
Vec3d vec3d = this.getRandomLocation(); Vec3d vec3d = this.getRandomLocation();
if (vec3d != null) { if (vec3d != null) {
BlockPos pos = new BlockPos(vec3d); BlockPos pos = new BlockPos(vec3d);
if (!pos.equals(EntityDragonfly.this.getBlockPos())) { try {
Path path = EntityDragonfly.this.navigation.findPathTo(new BlockPos(vec3d), 1); Path path = EntityDragonfly.this.navigation.findPathTo(pos, 1);
if (path != null) { if (path != null) {
EntityDragonfly.this.navigation.startMovingAlong(path, 1.0D); EntityDragonfly.this.navigation.startMovingAlong(path, 1.0D);
} }
} }
catch (Exception e) {}
} }
super.start(); super.start();
} }