add shift click to move a whole stack to trade window
This commit is contained in:
@@ -197,6 +197,8 @@ public class TradeScreen extends AbstractContainerScreen<TradeScreen.TradeMenu>
|
|||||||
if (hoveredSlot instanceof GhostInventorySlot ghostInventorySlot) {
|
if (hoveredSlot instanceof GhostInventorySlot ghostInventorySlot) {
|
||||||
if (button == 1) {
|
if (button == 1) {
|
||||||
openContextMenu(mouseX, mouseY, TradeAction.ADD_ITEM, ghostInventorySlot.inventoryIndex(), hoveredSlot.getItem(), "Trade");
|
openContextMenu(mouseX, mouseY, TradeAction.ADD_ITEM, ghostInventorySlot.inventoryIndex(), hoveredSlot.getItem(), "Trade");
|
||||||
|
} else if (hasShiftDown()) {
|
||||||
|
sendAction(TradeAction.ADD_ITEM, ghostInventorySlot.inventoryIndex(), hoveredSlot.getItem().getCount());
|
||||||
} else {
|
} else {
|
||||||
sendAction(TradeAction.ADD_ITEM, ghostInventorySlot.inventoryIndex(), 1);
|
sendAction(TradeAction.ADD_ITEM, ghostInventorySlot.inventoryIndex(), 1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user