Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,14 @@ private static void gatherInfo(InfoParserPackage info, EntityPlayer player) {
if (mc.inGameHasFocus) {
info.copyFromPlayer(player);
} else {
var jei = ModSupport.JEI.isLoaded();
if (mc.currentScreen instanceof GuiContainer container) {
var slot = container.getSlotUnderMouse();
if (slot != null) {
info.setStack(slot.getStack());
} else if (jei && info.getStack().isEmpty()) {
// check sidebars of normal guis
info.setStack(getJeiStack());
}
} else if (jei && getJeiRecipesObject() != null) {
// have to check this separately for if IRecipesGui is open, since its GuiScreen not GuiContainer
}
// if we haven't found anything, check jei
if (ModSupport.JEI.isLoaded() && info.getStack().isEmpty()) {
info.setStack(getJeiStack());
}
}
Expand Down