Fix tooltip padding + merge JEI history from JEI-Utilities by vfyjxf#181
Fix tooltip padding + merge JEI history from JEI-Utilities by vfyjxf#181tttsaurus wants to merge 7 commits intoCleanroomMC:cleanroomfrom
Conversation
| } else if (copy instanceof FluidStack) { | ||
| ((FluidStack) copy).amount = 1000; | ||
| } | ||
| return copy; |
There was a problem hiding this comment.
is there anything that can be done for other types of ingredients - ie mekanism gas or thaumic jei aspects?
| GL11.glVertex2i(x, y); | ||
| GL11.glVertex2i(x + width, y); | ||
| GL11.glVertex2i(x + width, y + height); | ||
| GL11.glVertex2i(x, y + height); |
There was a problem hiding this comment.
do we need to have a box? it seems like we could just use a horizontal line above the history section to separate it from the bookmarks (or ingredients)
|
|
||
| Rectangle firstRect = guiHistoryIngredientSlots.getAllGuiIngredientSlots().get(0).getArea(); | ||
|
|
||
| drawSpillingArea( |
There was a problem hiding this comment.
should this also have an if (guiHistoryIngredientSlots.isEmpty()) return;? we dont need to display the border for a box that isnt used.
|
|
||
| private static final List<IngredientGridHistoryProvider> GLOBAL_HISTORY_CONTAINER = new ArrayList<>(); | ||
|
|
||
| public static final int USE_ROWS = 2; |
There was a problem hiding this comment.
how reasonable would having this as a config be? perhaps it could be edited in-game via dragging the border up/downwards.
| firstRect.height * USE_ROWS, | ||
| BACKGROUND_COLOR); | ||
|
|
||
| guiHistoryIngredientSlots.render(minecraft); |
There was a problem hiding this comment.
currently, if you hover an ingredient in the history it doesnt have a highlighted background.
adding the mouseX and mouseY params + this solves that
IngredientRenderer hoveredHistory = guiHistoryIngredientSlots.getHovered(mouseX, mouseY);
if (hoveredHistory != null) {
hoveredHistory.drawHighlight();
}| this.enabled = enabled; | ||
| this.guiHistoryIngredientSlots = new IngredientListBatchRenderer(); | ||
|
|
||
| GLOBAL_HISTORY_CONTAINER.add(this); |
There was a problem hiding this comment.
instead of doing this, perhaps use Internal to set/get bookmark handler? there really should only be one, and i think it would make sense to expose this in that way. would look something like having JeiStarter#load have Internal.setHistory(new IngredientGridHistoryProvider()).
Fix Padding
JEI History
Concerns:
Firstly,
I post an event in
RecipesGui#showto notify enabled history providers, which looks pretty inelegant. JEI-Utilities does ASM on this.Secondly, in order to notify all history providers
I created a static field to record all history providers, which looks rough too, but accessing history providers via a
Internal.getRuntime()...chain doesn't look good either.