private void updateStoredPieces() {
        LinkedList<Integer> storedIndex = world.getStoredIndex();
        int size = storedIndex.size();

        if (size >= 1) {
            if (nextPieceIndex[0] != storedIndex.get(0)) {
                nextPieceIndex[0] = storedIndex.get(0);
                storedPiece1.setImage(ImageUtil.resize(nextBlocks.get(storedIndex.get(0)), 64, 64));
            }
        } else {
            if (nextPieceIndex[0] != 9) {
                nextPieceIndex[0] = 9;
                storedPiece1.setImage(ImageUtil.resize(nextBlocks.get(9), 64, 64));
            }
        }

        if (size >= 2) {
            if (nextPieceIndex[1] != storedIndex.get(1)) {
                nextPieceIndex[1] = storedIndex.get(1);
                storedPiece2.setImage(ImageUtil.resize(nextBlocks.get(nextPieceIndex[1]), 64, 64));
            }
        } else {
            if (nextPieceIndex[1] != 9) {
                nextPieceIndex[1] = 9;
                storedPiece2.setImage(ImageUtil.resize(nextBlocks.get(9), 64, 64));
            }
        }

        if (size >= 3) {
            if (nextPieceIndex[2] != storedIndex.get(2)) {
                nextPieceIndex[2] = storedIndex.get(2);
                storedPiece3.setImage(ImageUtil.resize(nextBlocks.get(nextPieceIndex[2]), 64, 64));
            }
        } else {
            if (nextPieceIndex[2] != 9) {
                nextPieceIndex[2] = 9;
                storedPiece3.setImage(ImageUtil.resize(nextBlocks.get(9), 64, 64));
            }
        }
    }