Minecraft data is still stored in ~/.minecraft when using Minecraft Launcher 2.0.1005. Note that this affects both the Minecraft Launcher and the actual game.
In order to fix this bug, both the Minecraft Launcher and the Minecraft game should adhere to the XDG Base Directory Specification. In particular, it should use the proper user directories. A nice overview can be found here
Similar specifications exist for OS X and Windows.
I am not a C++ / Java developer, but I can't believe a library similar to Python's appdirs does not exist. That should make this fairly simple to implement this.
Minecraft data is still stored in ~/.minecraft when using Minecraft Launcher 2.0.1005. Note that this affects both the Minecraft Launcher and the actual game.
In order to fix this bug, both the Minecraft Launcher and the Minecraft game should adhere to the XDG Base Directory Specification. In particular, it should use the proper user directories. A nice overview can be found here
Based on a quick glance in https://minecraft.gamepedia.com/.minecraft I believe the contents of the ~/.minecraft should be moved like this:
Current location
Correct location
Notes
~/.minecraft/assets/
$XDG_CACHE_HOME/minecraft/assets/
~/.minecraft/libraries/
$XDG_CACHE_HOME/minecraft/libraries/
~/.minecraft/logs/
$XDG_CACHE_HOME/minecraft/logs/
~/.minecraft/resourcepacks/
$XDG_DATA_HOME/minecraft/resourcepacks/
~/.minecraft/saves/
$XDG_DATA_HOME/minecraft/saves/
~/.minecraft/screenshots/
$XDG_PICTURES_DIR/minecraft/screenshots/
Based on https://www.freedesktop.org/wiki/Software/xdg-user-dirs/ instead
~/.minecraft/versions/
$XDG_DATA_HOME/minecraft/versions/
~/.minecraft/launcher_log.txt
$XDG_CACHE_HOME/minecraft/launcher_log.txt
~/.minecraft/launcher_profiles.json
$XDG_CONFIG_HOME/minecraft/launcher_profiles.json
~/.minecraft/options.txt
$XDG_CONFIG_HOME/minecraft/options.txt
~/.minecraft/servers.dat
$XDG_DATA_HOME/minecraft/servers.dat
~/.minecraft/realm_persistence.json
$XDG_DATA_HOME/minecraft/realm_persistence.json
~/.minecraft/textures_#.png
$XDG_DATA_HOME/minecraft/textures_#.png
~/.minecraft/usercache.json
$XDG_CACHE_HOME/minecraft/usercache.json
Similar specifications exist for OS X and Windows.
I am not a C++ / Java developer, but I can't believe a library similar to Python's appdirs does not exist. That should make this fairly simple to implement this.