public boolean shouldResetDrag ( int button ) { if ( ! isDraggingItemStack ( ) ) return false ; if ( dragType == DRAG_TYPE_SPREAD ) return button == 1 && draggedSlots . size ( ) > 1 ; if ( dragType == DRAG_TYPE_ONE ) return button == 0 && draggedSlots . size ( ) > 1 ; return dragType != DRAG_TYPE_PICKUP ; }
Checks if the dragging should be reset based on the mouse button clicked .