Moved mouse-related event handlers to InventorySelector, fixed TERRAINMAP_BLOCK_SIZE bug there.