Fix clicking on items in the bookmark panel. Thanks @monatann for contributing

This commit is contained in:
Jason Mitchell committed 2020-02-02 09:50:22 -08:00
1 parent abd1b38870
commit bb40acc7a3
2 files changed
+13 -1

No files matched your search

@@ -35,6 +35,18 @@ public class RecipeItemInputHandler implements IContainerInputHandler
public boolean mouseClicked(GuiContainer gui, int mousex, int mousey, int button)
{
ItemStack stackover = GuiContainerManager.getStackMouseOver(gui);
if(mousex < ItemPanels.bookmarkPanel.w && stackover != null) {
boolean cheat = NEIClientConfig.canCheatItem(stackover);
if(button == 0 && !cheat)
return GuiCraftingRecipe.openRecipeGui("item", stackover.copy());
if(button == 1 && !cheat)
return GuiUsageRecipe.openRecipeGui("item", stackover.copy());
NEIClientUtils.cheatItem(stackover, button, -1);
}
if(stackover == null || !(gui instanceof GuiRecipe))
return false;