3.2.2 version push, fixes capes not loading bug
This commit is contained in:
parent
53980dd831
commit
78f663158c
|
@ -18,7 +18,7 @@ apply plugin: 'net.minecraftforge.gradle.forge'
|
||||||
|
|
||||||
apply plugin: "com.github.johnrengelman.shadow"
|
apply plugin: "com.github.johnrengelman.shadow"
|
||||||
|
|
||||||
version = "3.2.1"
|
version = "3.2.2"
|
||||||
group = "me.rigamortis"
|
group = "me.rigamortis"
|
||||||
archivesBaseName = "seppuku"
|
archivesBaseName = "seppuku"
|
||||||
def buildmode = "IDE"
|
def buildmode = "IDE"
|
||||||
|
|
|
@ -12,7 +12,7 @@ import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||||
@Mod(modid = "seppukumod", name = "Seppuku", version = SeppukuMod.VERSION)
|
@Mod(modid = "seppukumod", name = "Seppuku", version = SeppukuMod.VERSION)
|
||||||
public final class SeppukuMod {
|
public final class SeppukuMod {
|
||||||
|
|
||||||
public static final String VERSION = "3.2.1";
|
public static final String VERSION = "3.2.2";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Our mods entry point
|
* Our mods entry point
|
||||||
|
|
|
@ -7,14 +7,14 @@ import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.entity.AbstractClientPlayer;
|
import net.minecraft.client.entity.AbstractClientPlayer;
|
||||||
import net.minecraft.client.renderer.texture.DynamicTexture;
|
import net.minecraft.client.renderer.texture.DynamicTexture;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
import org.apache.commons.io.IOUtils;
|
||||||
import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.InputStreamReader;
|
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -49,30 +49,24 @@ public final class CapeManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void downloadCapeUsers() {
|
public void downloadCapeUsers() {
|
||||||
// Thread t = new Thread(new Runnable() {
|
|
||||||
// public void run() {
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// t.start();
|
|
||||||
try {
|
try {
|
||||||
URL url = new URL("https://seppuku.pw/capes/");
|
URL url = new URL("https://seppuku.pw/capes/");
|
||||||
HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();
|
HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();
|
||||||
httpURLConnection.addRequestProperty("User-Agent", "Mozilla/4.76");
|
httpURLConnection.addRequestProperty("User-Agent", "Mozilla/4.76");
|
||||||
final BufferedReader reader = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream()));
|
final List<String> lines = IOUtils.readLines(httpURLConnection.getInputStream(), StandardCharsets.UTF_8);
|
||||||
String line;
|
lines.stream().filter(line -> line.contains(";")).forEach(line -> {
|
||||||
while ((line = reader.readLine()) != null) {
|
final String[] split = line.split(";");
|
||||||
if (!line.startsWith("<pre>") && !line.startsWith("</pre>") && line.length() > 1) {
|
if (split.length > 1) {
|
||||||
final String[] split = line.split(";");
|
|
||||||
if (split[0] != null && split[1] != null) {
|
if (split[0] != null && split[1] != null) {
|
||||||
if (split[1].toLowerCase().endsWith("png")) {
|
if (split[1].toLowerCase().endsWith("png")) {
|
||||||
|
System.out.println("uuid:" + split[0]);
|
||||||
this.capeUserList.add(new CapeUser(split[0], split[1]));
|
this.capeUserList.add(new CapeUser(split[0], split[1]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
reader.close();
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
//e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue