Пример #1
0
 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()));
 }
Пример #2
0
 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);
   }
 }
Пример #3
0
 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);
   }
 }
Пример #4
0
 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()));
 }
Пример #5
0
 public void closeCurrentInventory() {
   if (currentInventory != null) {
     out0DCloseWindow.sendMessage(currentInventory.getWindowId());
     currentInventory = null;
   }
 }
Пример #6
0
 private void endLeftMouseDrag() {
   System.out.println("END LEFT MOUSE DRAG");
   out0EClickWindow.sendMessageForceEmpty(
       currentInventory.getWindowId(), (short) -999, (byte) 2, (byte) 5);
 }