public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              onChanged();
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                onChanged();
                return this;
              }
              break;
            }
            case 8: {
              bitField0_ |= 0x00000001;
              tag_ = input.readInt64();
              break;
            }
            case 18: {
              org.box2d.proto.Box2D.PbVec2.Builder subBuilder = org.box2d.proto.Box2D.PbVec2.newBuilder();
              if (hasGravity()) {
                subBuilder.mergeFrom(getGravity());
              }
              input.readMessage(subBuilder, extensionRegistry);
              setGravity(subBuilder.buildPartial());
              break;
            }
            case 24: {
              bitField0_ |= 0x00000004;
              allowSleep_ = input.readBool();
              break;
            }
            case 32: {
              bitField0_ |= 0x00000008;
              autoClearForces_ = input.readBool();
              break;
            }
            case 40: {
              bitField0_ |= 0x00000010;
              warmStarting_ = input.readBool();
              break;
            }
            case 48: {
              bitField0_ |= 0x00000020;
              continuousPhysics_ = input.readBool();
              break;
            }
            case 56: {
              bitField0_ |= 0x00000040;
              subStepping_ = input.readBool();
              break;
            }
            case 162: {
              org.box2d.proto.Box2D.PbBody.Builder subBuilder = org.box2d.proto.Box2D.PbBody.newBuilder();
              input.readMessage(subBuilder, extensionRegistry);
              addBodies(subBuilder.buildPartial());
              break;
            }
            case 170: {
              org.box2d.proto.Box2D.PbJoint.Builder subBuilder = org.box2d.proto.Box2D.PbJoint.newBuilder();
              input.readMessage(subBuilder, extensionRegistry);
              addJoints(subBuilder.buildPartial());
              break;
            }
          }
        }
      }