mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-20 04:09:45 +00:00
Optimize permutations (#761)
Co-authored-by: Martin Robertz <[email protected]>
This commit is contained in:
1 parent
40e53eea7a
commit
76db43c835
18 files changed
+170
-133
No files matched your search
@@ -351,8 +351,7 @@ public abstract class GuiRecipe<H extends IRecipeHandler> extends GuiContainer i
|
||||
if (!cacheKey.equals(this.recipePageCacheKey)) {
|
||||
this.recipePageCacheKey = cacheKey;
|
||||
|
||||
final boolean recipeGrow = this.handlerInfo.getUseCustomScroll()
|
||||
&& this.handlerInfo.getMaxRecipesPerPage() <= 1;
|
||||
final boolean expandVertically = this.handlerInfo.expandVertically();
|
||||
final List<Widget> widgets = new ArrayList<>();
|
||||
int shiftY = 0;
|
||||
|
||||
@@ -361,7 +360,7 @@ public abstract class GuiRecipe<H extends IRecipeHandler> extends GuiContainer i
|
||||
.getRecipeWidget();
|
||||
widget.setLocation(Math.max(0, (this.container.w - widget.w) / 2), shiftY);
|
||||
|
||||
if (recipeGrow) {
|
||||
if (expandVertically) {
|
||||
widget.h = Math.min(
|
||||
this.handlerInfo.getHeight() + this.handlerInfo.getYShift(),
|
||||
this.container.getVisibleHeight());
|
||||
|
||||
Reference in new issue
Block a user