Skip to content

Commit

Permalink
[MouseItemWidget] Now possible to destroy items by throwing them in c…
Browse files Browse the repository at this point in the history
…reative inventory.
  • Loading branch information
Unarelith committed Jul 18, 2020
1 parent 98d84e9 commit 521bf85
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/client/gui/MouseItemWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ void MouseItemWidget::leftClickBehaviour() {
swapItems(*currentItemWidget, m_currentInventoryWidget->isReadOnly());
else if (getStack().amount() == 0 && currentItemWidget->stack().amount() != 0)
setStack(currentItemWidget->stack().item().stringID(), currentItemWidget->stack().item().maxStackSize());
else
setStack(BLOCK_AIR, 0);

m_currentInventoryWidget->sendUpdatePacket();
}
Expand Down

0 comments on commit 521bf85

Please sign in to comment.