public org.bwapi.proxy.messages.TerrainMessages.BaseLocation buildPartial() {
        org.bwapi.proxy.messages.TerrainMessages.BaseLocation result = new org.bwapi.proxy.messages.TerrainMessages.BaseLocation(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.id_ = id_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        if (positionBuilder_ == null) {
          result.position_ = position_;
        } else {
          result.position_ = positionBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000004;
        }
        if (tilePositionBuilder_ == null) {
          result.tilePosition_ = tilePosition_;
        } else {
          result.tilePosition_ = tilePositionBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
          to_bitField0_ |= 0x00000008;
        }
        result.region_ = region_;
        if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
          to_bitField0_ |= 0x00000010;
        }
        result.numMinerals_ = numMinerals_;
        if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
          to_bitField0_ |= 0x00000020;
        }
        result.numGas_ = numGas_;
        if (mineralsBuilder_ == null) {
          if (((bitField0_ & 0x00000040) == 0x00000040)) {
            minerals_ = java.util.Collections.unmodifiableList(minerals_);
            bitField0_ = (bitField0_ & ~0x00000040);
          }
          result.minerals_ = minerals_;
        } else {
          result.minerals_ = mineralsBuilder_.build();
        }
        if (staticMineralsBuilder_ == null) {
          if (((bitField0_ & 0x00000080) == 0x00000080)) {
            staticMinerals_ = java.util.Collections.unmodifiableList(staticMinerals_);
            bitField0_ = (bitField0_ & ~0x00000080);
          }
          result.staticMinerals_ = staticMinerals_;
        } else {
          result.staticMinerals_ = staticMineralsBuilder_.build();
        }
        if (geysersBuilder_ == null) {
          if (((bitField0_ & 0x00000100) == 0x00000100)) {
            geysers_ = java.util.Collections.unmodifiableList(geysers_);
            bitField0_ = (bitField0_ & ~0x00000100);
          }
          result.geysers_ = geysers_;
        } else {
          result.geysers_ = geysersBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000200) == 0x00000200)) {
          to_bitField0_ |= 0x00000040;
        }
        result.island_ = island_;
        if (((from_bitField0_ & 0x00000400) == 0x00000400)) {
          to_bitField0_ |= 0x00000080;
        }
        result.mineralOnly_ = mineralOnly_;
        if (((from_bitField0_ & 0x00000800) == 0x00000800)) {
          to_bitField0_ |= 0x00000100;
        }
        result.startLocation_ = startLocation_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }