public static void addInventory(Container inventory, int i, int x, int y, int columns, int rows, SlotFactory slotFactory, Consumer<Slot> slotConsumer) {
        for (int r = 0; r < rows; r++) {
            for (int c = 0; c < columns; c++) {
                slotConsumer.accept(slotFactory.createSlot(inventory, i + (r * columns + c), x + c * 18, y + r * 18));
            }
        }
    }
Creates a grid of slots for a container with standard spacing.

@param inventory The inventory backing the slots
@param i Inventory index of the first slot
@param x X position of the top left slot
@param y Y position of the top left slot
@param columns Number of columns in the grid
@param rows Number of rows in the grid
@param slotFactory Factory for creating the slots
@param slotConsumer Consumer for the slots (typically Container.addSlot(...))
core/src/main/java/mrtjp/projectred/lib/InventoryLib.java