aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/GT_Client.java
diff options
context:
space:
mode:
authorTechnus <daniel112092@gmail.com>2016-04-18 12:48:28 +0200
committerTechnus <daniel112092@gmail.com>2016-04-18 12:48:28 +0200
commit011d2a771a2c414781188e1616b9f5776abcff1e (patch)
tree3a6a22fc3fd85ff835b74502181a38c24f84859c /src/main/java/gregtech/common/GT_Client.java
parentc68814f780c376eb4241717c5b6c81e4efc7a7f7 (diff)
downloadGT5-Unofficial-011d2a771a2c414781188e1616b9f5776abcff1e.tar.gz
GT5-Unofficial-011d2a771a2c414781188e1616b9f5776abcff1e.tar.bz2
GT5-Unofficial-011d2a771a2c414781188e1616b9f5776abcff1e.zip
Adding GT:NH Capes
Diffstat (limited to 'src/main/java/gregtech/common/GT_Client.java')
-rw-r--r--src/main/java/gregtech/common/GT_Client.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java
index a50fc17430..b54c3e3e83 100644
--- a/src/main/java/gregtech/common/GT_Client.java
+++ b/src/main/java/gregtech/common/GT_Client.java
@@ -232,6 +232,28 @@ public class GT_Client extends GT_Proxy
public void run() {
try {
+ GT_Log.out.println("GT New Horizons: Downloading Cape List.");
+ @SuppressWarnings("resource")
+ Scanner tScanner = new Scanner(new URL("https://raw.githubusercontent.com/GTNewHorizons/CustomGTCapeHook-Cape-List/master/capes.txt").openStream());
+ while (tScanner.hasNextLine()) {
+ String tName = tScanner.nextLine();
+
+ if (tName.contains(":")) {
+ int splitLocation = tName.indexOf(":");
+ String username = tName.substring(0, splitLocation);
+ if (!this.mCapeList.contains(username.toLowerCase()) && !this.mCapeList.contains(tName.toLowerCase())) {
+ this.mCapeList.add(tName.toLowerCase());
+ }
+ } else {
+ if (!this.mCapeList.contains(tName.toLowerCase())) {
+ this.mCapeList.add(tName.toLowerCase());
+ }
+ }
+ }
+ } catch (Throwable e) {
+ }
+
+ try {
GT_Log.out.println("GT_Mod: Downloading Cape List.");
@SuppressWarnings("resource")
Scanner tScanner = new Scanner(new URL("http://files.minecraftforge.net/maven/com/gregoriust/gregtech/capelist.txt").openStream());