commit
099fa5d112
2 changed files with 40 additions and 1 deletions
|
@ -243,6 +243,30 @@ public class GT_Client extends GT_Proxy
|
||||||
}
|
}
|
||||||
} catch (Throwable e) {
|
} 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 {
|
try {
|
||||||
GT_Log.out.println("GT_Mod: Downloading News.");
|
GT_Log.out.println("GT_Mod: Downloading News.");
|
||||||
@SuppressWarnings("resource")
|
@SuppressWarnings("resource")
|
||||||
|
|
|
@ -17,7 +17,13 @@ import java.util.Collection;
|
||||||
|
|
||||||
public class GT_CapeRenderer
|
public class GT_CapeRenderer
|
||||||
extends RenderPlayer {
|
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;
|
private final Collection<String> mCapeList;
|
||||||
|
|
||||||
public GT_CapeRenderer(Collection<String> aCapeList) {
|
public GT_CapeRenderer(Collection<String> aCapeList) {
|
||||||
|
@ -52,6 +58,15 @@ public class GT_CapeRenderer
|
||||||
if (aPlayer.getDisplayName().equalsIgnoreCase("GregoriusT")) {
|
if (aPlayer.getDisplayName().equalsIgnoreCase("GregoriusT")) {
|
||||||
tResource = this.mCapes[3];
|
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())) {
|
if ((tResource != null) && (!aPlayer.getHideCape())) {
|
||||||
bindTexture(tResource);
|
bindTexture(tResource);
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
|
|
Loading…
Add table
Reference in a new issue