mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-12 08:27:37 +00:00
Add recipe index to recipe handler height (#768)
This commit is contained in:
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();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user