public void rightClickWindow(short slot) { Slot slotData = currentInventory.getSlot(slot); // System.out.println("WINID: " + currentInventory.getWindowId() + " SLOTDATA: ID: " + // slotData.getId()); if (slotData != null) { System.out.println("NOT EMPTY RIGHT CLICK"); out0EClickWindow.sendMessage( currentInventory.getWindowId(), slot, (byte) 1, (byte) 0, slotData); } else { System.out.println("EMPTY RIGHT CLICK"); out0EClickWindow.sendMessageForceEmpty( currentInventory.getWindowId(), slot, (byte) 1, (byte) 0); } // in32ConfirmTransaction.newClick(new Out0EClickWindowInfo(currentInventory.getWindowId(), // slot, slotData, out0EClickWindow.getActionNumber())); }
public void dropItemAt(int index) { Slot slot = currentInventory.getSlot((short) index); if (slot != null) { out0EClickWindow.sendMessageForceEmpty( currentInventory.getWindowId(), (short) index, (byte) 1, (byte) 4); currentInventory.setSlotEmpty(index); } }
public void shiftClick(short slot) { Slot slotData = currentInventory.getSlot(slot); if (slotData != null) { System.out.println("SHIFT CLICK"); out0EClickWindow.sendMessage( currentInventory.getWindowId(), slot, (byte) 1, (byte) 1, slotData); } }
private void leftClickWindowForceEmpty(short slot) { System.out.println("FORCED EMPTY LEFT CLICK"); // Slot slotData = currentInventory.getSlot(slot); // System.out.println("WINID: " + currentInventory.getWindowId() + " SLOTDATA: ID: " + // slotData.getId()); out0EClickWindow.sendMessageForceEmpty( currentInventory.getWindowId(), slot, (byte) 0, (byte) 0); // in32ConfirmTransaction.newClick(new Out0EClickWindowInfo(currentInventory.getWindowId(), // slot, slotData, out0EClickWindow.getActionNumber())); }
public void closeCurrentInventory() { if (currentInventory != null) { out0DCloseWindow.sendMessage(currentInventory.getWindowId()); currentInventory = null; } }
private void endLeftMouseDrag() { System.out.println("END LEFT MOUSE DRAG"); out0EClickWindow.sendMessageForceEmpty( currentInventory.getWindowId(), (short) -999, (byte) 2, (byte) 5); }