Skip to content

Commit

Permalink
Fix clicking on items in the bookmark panel. Thanks @monatann for con…
Browse files Browse the repository at this point in the history
…tributing
  • Loading branch information
mitchej123 committed Feb 2, 2020
1 parent abd1b38 commit bb40acc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ mc_version=1.7.10
forge_version=10.13.4.1614-1.7.10
ccl_version=1.1.3.138
ccc_version=1.0.7.+
mod_version=2.0.0-beta-3-GTNH
mod_version=2.0.0-beta-4-GTNH
12 changes: 12 additions & 0 deletions src/codechicken/nei/recipe/RecipeItemInputHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ public boolean lastKeyTyped(GuiContainer gui, char keyChar, int keyCode)
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;

Expand Down

0 comments on commit bb40acc

Please sign in to comment.