use of net.minecraft.server.v1_8_R3.ChunkCache in project Citizens2 by CitizensDev.
the class PlayerNavigation method a.
@Override
public PathEntity a(BlockPosition paramBlockPosition) {
if (!b()) {
return null;
}
float f1 = i();
this.c.methodProfiler.a("pathfind");
BlockPosition localBlockPosition = new BlockPosition(this.b);
int k = (int) (f1 + 8.0F);
ChunkCache localChunkCache = new ChunkCache(this.c, localBlockPosition.a(-k, -k, -k), localBlockPosition.a(k, k, k), 0);
PathEntity localPathEntity = this.j.a(localChunkCache, this.b, paramBlockPosition, f1);
this.c.methodProfiler.b();
return localPathEntity;
}
use of net.minecraft.server.v1_8_R3.ChunkCache in project Citizens2 by CitizensDev.
the class PlayerNavigation method a2.
public PathEntity a2(Entity paramEntity) {
if (!b()) {
return null;
}
BlockPosition localBlockPosition1 = new BlockPosition(paramEntity);
if ((this.c != null) && (!this.c.b()) && (localBlockPosition1.equals(this.q))) {
return this.c;
}
this.q = localBlockPosition1;
float f1 = h();
this.b.methodProfiler.a("pathfind");
BlockPosition localBlockPosition2 = new BlockPosition(this.a).up();
int i1 = (int) (f1 + 16.0F);
ChunkCache localChunkCache = new ChunkCache(this.b, localBlockPosition2.a(-i1, -i1, -i1), localBlockPosition2.a(i1, i1, i1), 0);
PathEntity localPathEntity = this.r.a(localChunkCache, this.a, paramEntity, f1);
this.b.methodProfiler.b();
return localPathEntity;
}
Aggregations