Autoselect first tab when no tab is selected.
@@ -208,9 +208,13 @@ public class GuiCraftingMonitor extends GuiBase implements IResizableDisplay {
return getTabById(currentTab.get());
}
+ if (tasks.isEmpty()) {
return null;
}
+ return tasks.get(0);
+ }
+
@Nullable
private IGridTab getTabById(UUID id) {
return tasks.stream().filter(t -> ((CraftingMonitorTask) t).id.equals(id)).findFirst().orElse(null);
