private void findNextBlock(boolean dir) {
        blockIndex += dir ? 1 : -1;
        if (blockArr == null || blockIndex >= blockArr.length || blockIndex < 0) {
            Collection<Block> blockCollection = Blocks.BLOCKS.getItems();
            blockArr = blockCollection.toArray(new Block[blockCollection.size()]);
            blockIndex = dir ? 0 : blockArr.length - 1;
        }
        currBlock = blockArr[blockIndex];
        if (currBlock == Blocks.air) {
            findNextBlock(dir);
        }
        GuiCurrentBlock gui = Boxle.instance().getRenderEngine().getCurrentBlock();
        if (gui != null) {
            gui.setBlock(currBlock);
        }
    }