Skip to content

Commit

Permalink
Switched to java 17 lts
Browse files Browse the repository at this point in the history
  • Loading branch information
thecoder-001 committed Dec 8, 2021
1 parent 8e2346a commit 731048a
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions MineColab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/thecoder-001/MineColab/blob/master/MineColab.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
"<a href=\"https://colab.research.google.com/github/thecoder-001/MineColab/blob/1.18-support/MineColab.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
Expand Down Expand Up @@ -58,16 +58,16 @@
"\n",
"# Update the package lists\n",
"!sudo apt update &>/dev/null && echo \"apt cache successfully updated\" || echo \"apt cache update failed, you might receive stale packages\"\n",
"# Install OpenJDK 16\n",
"!wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -\n",
"!sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ &>/dev/null || echo \"Failed to add repo. Still can be ignored if openjdk16 gets installed.\"\n",
"!sudo apt-get install adoptopenjdk-16-openj9 &>/dev/null && echo \"Yay! Openjdk16 has been successfully installed.\" || echo \"Failed to install OpenJdk16.\"\n",
"# Install OpenJDK 17\n",
"# !wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -\n",
"# !sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ &>/dev/null || echo \"Failed to add repo. Still can be ignored if openjdk17 gets installed.\"\n",
"!sudo apt-get install openjdk-17-jre-headless &>/dev/null && echo \"Yay! Openjdk17 has been successfully installed.\" || echo \"Failed to install OpenJdk17.\"\n",
"#Perform java version check\n",
"java_ver = !java -version 2>&1 | awk -F[\\\"\\.] -v OFS=. 'NR==1{print $2}'\n",
"if java_ver[0] == \"16\" :\n",
" print(\"Openjdk16 is working correctly, you are good to go.\")\n",
"if java_ver[0] == \"17\" :\n",
" print(\"Openjdk17 is working correctly, you are good to go.\")\n",
"else:\n",
" print(\"Openjdk16 doesn't seems to be installed or isn't working, falling back to java\", java_ver[0], \". You might experience reduced performance. Minecraft 1.17 and above might fail to launch.\")\n",
" print(\"Openjdk17 doesn't seems to be installed or isn't working, falling back to java\", java_ver[0], \". You might experience reduced performance. Minecraft 1.17 and above might fail to launch.\")\n",
"\n",
"# Mount Google Drive\n",
"from google.colab import drive\n",
Expand Down Expand Up @@ -160,6 +160,7 @@
"source": [
"# Replace \"1.17\" with your desired server version.\n",
"# Available versions:\n",
"# - 1.18 <!> Paper still in experimental\n",
"# - 1.17.1\n",
"# - 1.17\n",
"# - 1.16.4\n",
Expand All @@ -173,11 +174,15 @@
"# - 1.9.4\n",
"# - 1.8.8\n",
"# Newer versions might work too, however this isn't guaranteed.\n",
"version = '1.17'\n",
"version = '1.17.1'\n",
"\n",
"#Chose server type. Currently available versions: fabric, paper\n",
"server_type = 'paper'\n",
"\n",
"# Print experimental build warning\n",
"if version == '1.18' and server_type == 'paper':\n",
" print(\"<!> Paper 1.18 builds are still experimental. Make regular Backups!\")\n",
"\n",
"from google.colab import drive\n",
"import requests\n",
"import json\n",
Expand Down

0 comments on commit 731048a

Please sign in to comment.