for (int i = 0; i < 30; ++i) {
BodyDef bd = new BodyDef();
bd.type = BodyType.DYNAMIC;
bd.position.set(0.5f + i, y);
Body body = getWorld().createBody(bd);
body.createFixture(fd);
Vec2 anchor = new Vec2(i, y);
jd.initialize(prevBody, body, anchor);
getWorld().createJoint(jd);