use of net.minecraft.server.v1_15_R1.PathEntity in project Citizens2 by CitizensDev.
the class PlayerPathfinder method a.
private PathEntity a(PathPoint paramPathPoint1, PathPoint paramPathPoint2, float paramFloat) {
paramPathPoint1.e = 0.0F;
paramPathPoint1.f = paramPathPoint1.c(paramPathPoint2);
paramPathPoint1.g = paramPathPoint1.f;
this.a.a();
this.b.clear();
this.a.a(paramPathPoint1);
Object localObject1 = paramPathPoint1;
int i = 0;
while (!this.a.e()) {
i++;
if (i >= 200) {
break;
}
PathPoint localObject2 = this.a.c();
if (localObject2.equals(paramPathPoint2)) {
localObject1 = paramPathPoint2;
break;
}
if (localObject2.c(paramPathPoint2) < ((PathPoint) localObject1).c(paramPathPoint2)) {
localObject1 = localObject2;
}
localObject2.i = true;
int j = this.d.a(this.c, localObject2, paramPathPoint2, paramFloat);
for (int k = 0; k < j; k++) {
PathPoint localPathPoint = this.c[k];
float f1 = localObject2.c(localPathPoint);
localPathPoint.j = (localObject2.j + f1);
localPathPoint.k = (f1 + localPathPoint.l);
float f2 = localObject2.e + localPathPoint.k;
if ((localPathPoint.j < paramFloat) && ((!localPathPoint.a()) || (f2 < localPathPoint.e))) {
localPathPoint.h = (localObject2);
localPathPoint.e = f2;
localPathPoint.f = (localPathPoint.c(paramPathPoint2) + localPathPoint.l);
if (localPathPoint.a()) {
this.a.a(localPathPoint, localPathPoint.e + localPathPoint.f);
} else {
localPathPoint.g = (localPathPoint.e + localPathPoint.f);
this.a.a(localPathPoint);
}
}
}
}
if (localObject1 == paramPathPoint1) {
return null;
}
Object localObject2 = a(paramPathPoint1, (PathPoint) localObject1);
return (PathEntity) localObject2;
}
use of net.minecraft.server.v1_15_R1.PathEntity in project Citizens2 by CitizensDev.
the class PlayerPathfinder method a.
private PathEntity a(PathPoint paramPathPoint1, PathPoint paramPathPoint2, float paramFloat) {
paramPathPoint1.e = 0.0F;
paramPathPoint1.f = paramPathPoint1.c(paramPathPoint2);
paramPathPoint1.g = paramPathPoint1.f;
this.a.a();
this.b.clear();
this.a.a(paramPathPoint1);
Object localObject1 = paramPathPoint1;
int i = 0;
while (!this.a.e()) {
i++;
if (i >= 200) {
break;
}
Object localObject2 = this.a.c();
if (((PathPoint) localObject2).equals(paramPathPoint2)) {
localObject1 = paramPathPoint2;
break;
}
if (((PathPoint) localObject2).c(paramPathPoint2) < ((PathPoint) localObject1).c(paramPathPoint2)) {
localObject1 = localObject2;
}
((PathPoint) localObject2).i = true;
int j = this.d.a(this.c, (PathPoint) localObject2, paramPathPoint2, paramFloat);
for (int k = 0; k < j; k++) {
PathPoint localPathPoint = this.c[k];
float f1 = ((PathPoint) localObject2).c(localPathPoint);
localPathPoint.j = (((PathPoint) localObject2).j + f1);
localPathPoint.k = (f1 + localPathPoint.l);
float f2 = ((PathPoint) localObject2).e + localPathPoint.k;
if ((localPathPoint.j < paramFloat) && ((!localPathPoint.a()) || (f2 < localPathPoint.e))) {
localPathPoint.h = ((PathPoint) localObject2);
localPathPoint.e = f2;
localPathPoint.f = (localPathPoint.c(paramPathPoint2) + localPathPoint.l);
if (localPathPoint.a()) {
this.a.a(localPathPoint, localPathPoint.e + localPathPoint.f);
} else {
localPathPoint.g = (localPathPoint.e + localPathPoint.f);
this.a.a(localPathPoint);
}
}
}
}
if (localObject1 == paramPathPoint1) {
return null;
}
Object localObject2 = a(paramPathPoint1, (PathPoint) localObject1);
return (PathEntity) localObject2;
}
use of net.minecraft.server.v1_15_R1.PathEntity in project Citizens2 by CitizensDev.
the class PlayerPathfinder method a.
private PathEntity a(IBlockAccess paramIBlockAccess, EntityInsentient paramEntityInsentient, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat) {
this.a.a();
this.d.a(paramIBlockAccess, paramEntityInsentient);
PathPoint localPathPoint1 = this.d.b();
PathPoint localPathPoint2 = this.d.a(paramDouble1, paramDouble2, paramDouble3);
PathEntity localPathEntity = a(localPathPoint1, localPathPoint2, paramFloat);
this.d.a();
return localPathEntity;
}
use of net.minecraft.server.v1_15_R1.PathEntity in project Citizens2 by CitizensDev.
the class PlayerPathfinder method a.
private PathEntity a(IBlockAccess paramIBlockAccess, EntityHumanNPC paramEntityInsentient, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat) {
this.a.a();
this.d.a(paramIBlockAccess, paramEntityInsentient);
PathPoint localPathPoint1 = this.d.b();
PathPoint localPathPoint2 = this.d.a(paramDouble1, paramDouble2, paramDouble3);
PathEntity localPathEntity = a(localPathPoint1, localPathPoint2, paramFloat);
this.d.a();
return localPathEntity;
}
use of net.minecraft.server.v1_15_R1.PathEntity 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.d.a();
this.c.a(var0, var1);
PathPoint var6 = this.c.b();
Map var7 = var2.stream().collect(Collectors.toMap((var0x) -> {
return this.c.a((double) var0x.getX(), (double) var0x.getY(), (double) var0x.getZ());
}, Function.identity()));
PathEntity var8 = this.a(var6, var7, var3, var4, var5);
this.c.a();
return var8;
}
Aggregations