if (cardDimension != null) {
Rectangle rectangle = new Rectangle(cardDimension.frameWidth, cardDimension.frameHeight);
Dimension dimension = new Dimension(cardDimension.frameWidth, cardDimension.frameHeight);
List<CardView> sortedCards = new ArrayList<>(booster.values());
Collections.sort(sortedCards, new CardViewRarityComparator());
for (CardView card: sortedCards) {
MageCard cardImg = Plugins.getInstance().getMageCard(card, bigCard, dimension, null, true);
cardImg.addMouseListener(this);
add(cardImg);
cardImg.update(card);