use of net.minecraft.server.v1_15_R1.PathPoint in project Citizens2 by CitizensDev.
the class PlayerNavigation method b.
@Override
public void b(BlockPosition var0) {
if (this.c == null || this.c.c() || this.c.e() == 0)
return;
PathPoint var1 = this.c.d();
Vec3D var2 = new Vec3D((var1.a + this.a.locX()) / 2.0D, (var1.b + this.a.locY()) / 2.0D, (var1.c + this.a.locZ()) / 2.0D);
if (var0.a(var2, (this.c.e() - this.c.f())))
j();
}
use of net.minecraft.server.v1_15_R1.PathPoint in project Citizens2 by CitizensDev.
the class PlayerPathfinder method a.
private float a(PathPoint var0, Set var1) {
float var2 = Float.MAX_VALUE;
float var5;
for (Iterator var4 = var1.iterator(); var4.hasNext(); var2 = Math.min(var5, var2)) {
PathDestination var6 = (PathDestination) var4.next();
var5 = var0.a(var6);
var6.a(var5, var0);
}
return var2;
}
use of net.minecraft.server.v1_15_R1.PathPoint in project Citizens2 by CitizensDev.
the class PlayerPathfinder method a.
public PathEntity a(ChunkCache var0, EntityHumanNPC var1, Set<BlockPosition> var2, float var3, int var4, float var5) {
this.a.a();
this.e.a(var0, var1);
PathPoint var6 = this.e.b();
Map<PathDestination, BlockPosition> var7 = var2.stream().collect(Collectors.toMap((var0x) -> {
return this.e.a((double) var0x.getX(), (double) var0x.getY(), (double) var0x.getZ());
}, Function.identity()));
PathEntity var8 = this.a(var6, var7, var3, var4, var5);
this.e.a();
return var8;
}
use of net.minecraft.server.v1_15_R1.PathPoint in project Citizens2 by CitizensDev.
the class PlayerPathfinder method a.
@Override
public PathEntity a(ChunkCache var0, EntityInsentient var1, Set<BlockPosition> var2, float var3, int var4, float var5) {
this.a.a();
this.e.a(var0, var1);
PathPoint var6 = this.e.b();
Map<PathDestination, BlockPosition> var7 = var2.stream().collect(Collectors.toMap((var0x) -> {
return this.e.a((double) var0x.getX(), (double) var0x.getY(), (double) var0x.getZ());
}, Function.identity()));
PathEntity var8 = this.a(var6, var7, var3, var4, var5);
this.e.a();
return var8;
}
use of net.minecraft.server.v1_15_R1.PathPoint in project Citizens2 by CitizensDev.
the class PlayerNavigation method b.
@Override
public void b(BlockPosition var0) {
if (this.c != null && !this.c.b() && this.c.e() != 0) {
PathPoint var1 = this.c.c();
Vec3D var2 = new Vec3D((var1.a + this.a.locX()) / 2.0D, (var1.b + this.a.locY()) / 2.0D, (var1.c + this.a.locZ()) / 2.0D);
if (var0.a(var2, this.c.e() - this.c.f())) {
this.j();
}
}
}
Aggregations