public void updateWantedGoods() {
        List<GoodsType> goodsTypes = new ArrayList<GoodsType>(getSpecification().getGoodsTypeList());
        Collections.sort(goodsTypes, wantedGoodsComparator);
        int wantedIndex = 0;
        for (GoodsType goodsType : goodsTypes) {
            // The natives do not trade military or non-storable goods.
            if (goodsType.isMilitaryGoods() || !goodsType.isStorable())
                continue;
            if (getNormalGoodsPriceToBuy(goodsType, GoodsContainer.CARGO_SIZE)
                <= GoodsContainer.CARGO_SIZE * TRADE_MINIMUM_PRICE
                || wantedIndex >= wantedGoods.length) break;
            wantedGoods[wantedIndex] = goodsType;
            wantedIndex++;
        }
        for (; wantedIndex < wantedGoods.length; wantedIndex++) {
            wantedGoods[wantedIndex] = null;
        }
    }