You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			50 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Bash
		
	
			
		
		
	
	
			50 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Bash
		
	
#!/bin/bash
 | 
						|
 | 
						|
DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")"
 | 
						|
 | 
						|
function error {
 | 
						|
  echo -e "\\e[91m$1\\e[39m"
 | 
						|
  exit 1
 | 
						|
}
 | 
						|
 | 
						|
#use the error function often!
 | 
						|
#If a certain command is necessary for installation to continue, then add this to the end of it:
 | 
						|
# || error 'reason'
 | 
						|
#example below:
 | 
						|
 | 
						|
echo 'WARNING: This install script is only compatiable with 32-bit OSes for the time being. Please press [Enter] to continue.'
 | 
						|
read -p
 | 
						|
 | 
						|
#Download java and launcher
 | 
						|
mkdir ~/Minecraft && cd ~/Minecraft && wget https://www.dropbox.com/s/2602i5d0h4kteex/setupMC.sh && chmod +x setupMC.sh && ./setupMC.sh || error 'Failed to install the launcher!'
 | 
						|
 | 
						|
#Move launcher to /usr/share/
 | 
						|
sudo mkdir /usr/share/minecraftjava && sudo mv launcher.jar /usr/share/minecraftjava/launcher.jar
 | 
						|
 | 
						|
#Create desktop shortcut
 | 
						|
cd ~/.local/share/applications/
 | 
						|
wget https://raw.githubusercontent.com/mobilegmYT/pi-apps-resources/main/Minecraft/minecraft.desktop
 | 
						|
chmod +x minecraft.desktop
 | 
						|
cd
 | 
						|
 | 
						|
mkdir -p ~/.minecraft
 | 
						|
echo '{
 | 
						|
  "profiles": {
 | 
						|
    "(Default)": {
 | 
						|
      "name": "(Default)",
 | 
						|
      "javaArgs": "-Dorg.lwjgl.librarypath=/home/pi/lwjgl3arm32 -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M"
 | 
						|
    }
 | 
						|
  },
 | 
						|
  "selectedProfile": "(Default)",
 | 
						|
  "clientToken": "c4a6f915-4d47-47bf-a8f4-746090e7e576",
 | 
						|
  "authenticationDatabase": {},
 | 
						|
  "launcherVersion": {
 | 
						|
    "name": "1.6.93",
 | 
						|
    "format": 21,
 | 
						|
    "profilesFormat": 1
 | 
						|
  }
 | 
						|
}' > /home/pi/.minecraft/launcher_profiles.json
 | 
						|
 | 
						|
echo 'Installation is now done! You can open the launcher by going to Menu > Games > Minecraft Launcher'
 | 
						|
echo 'NOTE: You can only play versions 1.13 and higher with your current config. To use lower versions, please follow the instructions at https://www.noxxtech.tk/minecraft-install#h.fpnon3xvmuoz'
 |