Path fix
This commit is contained in:
parent
886be5bbc6
commit
e2192b2c4b
1 changed files with 40 additions and 35 deletions
|
@ -143,9 +143,14 @@ public class EntityDragonfly extends AnimalEntity implements Flutterer {
|
||||||
public void start() {
|
public void start() {
|
||||||
Vec3d vec3d = this.getRandomLocation();
|
Vec3d vec3d = this.getRandomLocation();
|
||||||
if (vec3d != null) {
|
if (vec3d != null) {
|
||||||
|
BlockPos pos = new BlockPos(vec3d);
|
||||||
|
if (!pos.equals(EntityDragonfly.this.getBlockPos())) {
|
||||||
Path path = EntityDragonfly.this.navigation.findPathTo(new BlockPos(vec3d), 1);
|
Path path = EntityDragonfly.this.navigation.findPathTo(new BlockPos(vec3d), 1);
|
||||||
|
if (path != null) {
|
||||||
EntityDragonfly.this.navigation.startMovingAlong(path, 1.0D);
|
EntityDragonfly.this.navigation.startMovingAlong(path, 1.0D);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
super.start();
|
super.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue