Add recipe index to recipe handler height (#768)

This commit is contained in:
slprime authored and GitHub committed 2025-10-18 13:03:08 +02:00
1 parent 76db43c835
commit 2a3aabc073
3 files changed
+4 -4

No files matched your search

@@ -181,7 +181,7 @@ public class DebugHandlerWidget extends Widget implements IContainerInputHandler
@Override
public void draw(int mx, int my) {
this.field.setEnabled(handler.getRecipeHeight() <= 0);
this.field.setEnabled(handler.getRecipeHeight(0) <= 0);
super.draw(mx, my);
}
@@ -44,7 +44,7 @@ public interface IRecipeHandler {
return getRecipeName();
}
default int getRecipeHeight() {
default int getRecipeHeight(int recipe) {
return 0;
}
@@ -58,8 +58,8 @@ public class NEIRecipeWidget extends Widget {
this.w = Math.max(166, this.handlerInfo.getWidth());
if (this.showAsWidget || !this.handlerInfo.expandVertically()) {
this.h = this.handlerRef.handler.getRecipeHeight() > 0 ? this.handlerRef.handler.getRecipeHeight()
: this.handlerInfo.getHeight();
final int recipeHeight = this.handlerRef.handler.getRecipeHeight(this.handlerRef.recipeIndex);
this.h = recipeHeight > 0 ? recipeHeight : this.handlerInfo.getHeight();
this.h += this.handlerInfo.getYShift();
}