diff options
author | Dream-Master <dream-master@gmx.net> | 2016-06-22 21:39:29 +0200 |
---|---|---|
committer | Dream-Master <dream-master@gmx.net> | 2016-06-22 21:39:29 +0200 |
commit | 6f4c04fcacb2af75e2d3b53281c53af446b65950 (patch) | |
tree | 01f85befbe8c9854479ae3b98c747c8e0f37e276 /src/main/java/gregtech/common | |
parent | 83ea6c146f4f39c3d88c050dd345f8f58803887b (diff) | |
download | GT5-Unofficial-6f4c04fcacb2af75e2d3b53281c53af446b65950.tar.gz GT5-Unofficial-6f4c04fcacb2af75e2d3b53281c53af446b65950.tar.bz2 GT5-Unofficial-6f4c04fcacb2af75e2d3b53281c53af446b65950.zip |
099fa5d112616b54af0faa0f0608af938fb8cf84 [099fa5d]
Diffstat (limited to 'src/main/java/gregtech/common')
-rw-r--r-- | src/main/java/gregtech/common/GT_Client.java | 20 | ||||
-rw-r--r-- | src/main/java/gregtech/common/render/GT_CapeRenderer.java | 18 |
2 files changed, 37 insertions, 1 deletions
diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java index a50fc17430..d92c5922a1 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -244,6 +244,26 @@ public class GT_Client extends GT_Proxy } catch (Throwable e) { } 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 News."); @SuppressWarnings("resource") Scanner tScanner = new Scanner(new URL("http://files.minecraftforge.net/maven/com/gregoriust/gregtech/message.txt").openStream()); diff --git a/src/main/java/gregtech/common/render/GT_CapeRenderer.java b/src/main/java/gregtech/common/render/GT_CapeRenderer.java index 50e553446b..be95d7fb04 100644 --- a/src/main/java/gregtech/common/render/GT_CapeRenderer.java +++ b/src/main/java/gregtech/common/render/GT_CapeRenderer.java @@ -17,7 +17,13 @@ import java.util.Collection; public class GT_CapeRenderer extends RenderPlayer { - private final ResourceLocation[] mCapes = {new ResourceLocation("gregtech:textures/BrainTechCape.png"), new ResourceLocation("gregtech:textures/GregTechCape.png"), new ResourceLocation("gregtech:textures/MrBrainCape.png"), new ResourceLocation("gregtech:textures/GregoriusCape.png")}; + private final ResourceLocation[] mCapes = { new ResourceLocation("gregtech:textures/BrainTechCape.png"), + new ResourceLocation("gregtech:textures/GregTechCape.png"), + new ResourceLocation("gregtech:textures/MrBrainCape.png"), + new ResourceLocation("gregtech:textures/GregoriusCape.png"), + new ResourceLocation("gregtech:textures/DonorCape.png"), + new ResourceLocation("gregtech:textures/DevCape.png"), + new ResourceLocation("gregtech:textures/TecCape.png")}; private final Collection<String> mCapeList; public GT_CapeRenderer(Collection<String> aCapeList) { @@ -52,6 +58,16 @@ public class GT_CapeRenderer if (aPlayer.getDisplayName().equalsIgnoreCase("GregoriusT")) { tResource = this.mCapes[3]; } + if (this.mCapeList.contains(aPlayer.getDisplayName().toLowerCase()+":capedonor")) { + tResource = this.mCapes[4]; + } + if (this.mCapeList.contains(aPlayer.getDisplayName().toLowerCase()+":capedev")) { + tResource = this.mCapes[5]; + } + if (this.mCapeList.contains(aPlayer.getDisplayName().toLowerCase()+":capetec")) { + tResource = this.mCapes[6]; + } + if ((tResource != null) && (!aPlayer.getHideCape())) { bindTexture(tResource); GL11.glPushMatrix(); |