mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-24 21:54:33 +01:00
Fix crash when calling the recipe tree builder with one input
This commit is contained in:
parent
af7e19ae69
commit
188210f020
1 changed files with 1 additions and 1 deletions
|
@ -84,7 +84,7 @@ class IngredientTree implements SpellbookRecipe.CraftingTreeBuilder {
|
||||||
int colWidth = 22;
|
int colWidth = 22;
|
||||||
int rowHeight = 20;
|
int rowHeight = 20;
|
||||||
|
|
||||||
int cols = width / colWidth - 1;
|
int cols = Math.max(1, width / colWidth - 1);
|
||||||
int rows = Math.max(1, (int)Math.ceil((float)entries.size() / cols));
|
int rows = Math.max(1, (int)Math.ceil((float)entries.size() / cols));
|
||||||
|
|
||||||
int totalHeight = rowHeight * rows;
|
int totalHeight = rowHeight * rows;
|
||||||
|
|
Loading…
Reference in a new issue