Skip to content

Commit

Permalink
Fix the underlying problem -- Bad X!
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchej123 committed Feb 5, 2020
1 parent 4375a91 commit 10c2326
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
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-5-GTNH
mod_version=2.0.0-beta-6-GTNH
6 changes: 5 additions & 1 deletion src/codechicken/nei/BookmarkPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ private boolean remove(ItemStack item) {
return false;
}

@Override
public int getX(GuiContainer gui) {
return 5;
}

@Override
public int getMarginLeft() {
Expand Down Expand Up @@ -162,7 +166,7 @@ public int getHightAdjustment() {
}

public int getWidth(GuiContainer gui) {
return LayoutManager.getLeftSize(gui) - x;
return LayoutManager.getLeftSize(gui) - ( (gui.xSize + gui.width) / 2 + 3 );

}

Expand Down
6 changes: 5 additions & 1 deletion src/codechicken/nei/ItemPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ public String getRenderLabel() {
};
}

public int getX(GuiContainer gui) {
return (gui.xSize + gui.width) / 2 + 3;
}

public int getMarginLeft() {
return x + (w % 18) / 2;
}
Expand Down Expand Up @@ -177,7 +181,7 @@ public void resize(GuiContainer gui) {
pageLabel.text = getLabelText();

y = prev.h + prev.y;
x = (gui.xSize + gui.width) / 2 + 3;
x = getX(gui);
w = getWidth(gui);
h = getHeight(gui);

Expand Down
11 changes: 0 additions & 11 deletions src/codechicken/nei/recipe/RecipeItemInputHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,6 @@ public boolean mouseClicked(GuiContainer gui, int mousex, int mousey, int button
if(stackover == null)
return false;

if(mousex < ItemPanels.bookmarkPanel.w) {
if (NEIClientConfig.canCheatItem(stackover))
NEIClientUtils.cheatItem(stackover, button, -1);
else {
if (button == 0)
return GuiCraftingRecipe.openRecipeGui("item", stackover.copy());
if (button == 1)
return GuiUsageRecipe.openRecipeGui("item", stackover.copy());
}
}

if (!(gui instanceof GuiRecipe))
return false;

Expand Down

0 comments on commit 10c2326

Please sign in to comment.