Skip to content

Instantly share code, notes, and snippets.

@riking
Created April 15, 2013 04:16
Show Gist options
  • Save riking/5385670 to your computer and use it in GitHub Desktop.
Save riking/5385670 to your computer and use it in GitHub Desktop.
public enum InventoryAction {
/**
* left / right: cursor / current are different
*/
SWAP,
/**
* right: cursor not empty, current is same material or empty and not full
* rightdrag: only one slot
*/
PLACE_ONE,
/**
* left: current is empty, cursor is not
* leftdrag: only one slot
*/
PLACE_STACK,
/**
* left: current is same material
* leftdrag: more than 1 slot
* rightdrag: more than 1 slot
*/
PLACE_SOME,
/**
* right: cursor is empty, current is not
*/
PICKUP_HALF,
/**
* left: cursor is empty, current is not
*/
PICKUP_STACK,
/**
* middle: current not empty
*/
COPY_STACK,
MOVE_TO_HOTBAR_LEFT,
MOVE_TO_HOTBAR_RIGHT,
MOVE_TO_INVENTORY_TOP,
MOVE_TO_INVENTORY_BOTTOM,
/**
* double click: cursor is not full and others exist
*/
COLLECT,
/**
* left: current and cursor empty
* right: current and cursor empty
* right: current is same material and full
* left: current is same material and full
* number_key: current and hotbar empty
* number_key: from other inventory and entire inventory full
* middle: current empty
* q: current empty
* ctrlq: current empty
* leftdrag:
* double click: cursor is full
* double click: none with same material exist
*/
NO_OP,
/**
* q: current not empty
*/
DROP_ONE,
/**
* ctrlq: current not empty
*/
DROP_STACK,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment