private Path pathToXYZ(BlockPos pos) { ChunkCache chunkcache = cachePath(0, 8); Path pathentity = (new PathFinder(nodeProcessor).findPath(chunkcache, mountOrEntity(), pos, this.getPathSearchRange())); this.world.profiler.endSection(); return pathentity; }
private Path pathToEntity(Entity target) { ChunkCache chunkcache = cachePath(1, 16); Path pathentity = (new PathFinder(nodeProcessor).findPath(chunkcache, mountOrEntity(), target, this.getPathSearchRange())); this.world.profiler.endSection(); return pathentity; }
public Path getPathEntityToEntity(Entity entity, Entity targetEntity, float range) { int targX = MathHelper.floor(targetEntity.posX); int targY = MathHelper.floor(targetEntity.posY + 1.0D); int targZ = MathHelper.floor(targetEntity.posZ); PathFinder pf = new PathFinder(new WalkNodeProcessor()); return pf.findPath(entity.world, (EntityLiving) entity, new BlockPos(targX, targY, targZ), range); }
public Path getPathEntityToEntity(Entity entity, Entity targetEntity, float range) { int targX = MathHelper.floor(targetEntity.posX); int targY = MathHelper.floor(targetEntity.posY + 1.0D); int targZ = MathHelper.floor(targetEntity.posZ); PathFinder pf = new PathFinder(new WalkNodeProcessor()); return pf.findPath(targetEntity.getEntityWorld(), (EntityLiving) entity, new BlockPos(targX, targY, targZ), range); }