Skip to content

Commit

Permalink
Disable gui item toss for silk bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
vadis365 committed Jan 20, 2023
1 parent 8cce8c1 commit 12cc74b
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,21 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) {
super.drawScreen(mouseX, mouseY, partialTicks);
this.renderHoveredToolTip(mouseX, mouseY);
}

@Override
protected void mouseReleased(int mouseX, int mouseY, int state) {
if (mouseX < this.guiLeft || mouseX > this.guiLeft + this.ySize)
return;
else if (mouseY < this.guiTop || mouseY > this.guiTop + this.xSize)
return;
else
super.mouseReleased(mouseX, mouseY, state);
}

@Override
protected void keyTyped(char key, int event){
if (event == 1 || event == this.mc.gameSettings.keyBindInventory.getKeyCode())
this.mc.player.closeScreen();
this.checkHotbarKeys(key);
}
}

0 comments on commit 12cc74b

Please sign in to comment.