Skip to content

Commit

Permalink
3.2.2 version push, fixes capes not loading bug
Browse files Browse the repository at this point in the history
  • Loading branch information
uoil committed Sep 26, 2023
1 parent 53980dd commit 78f6631
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ apply plugin: 'net.minecraftforge.gradle.forge'

apply plugin: "com.github.johnrengelman.shadow"

version = "3.2.1"
version = "3.2.2"
group = "me.rigamortis"
archivesBaseName = "seppuku"
def buildmode = "IDE"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@Mod(modid = "seppukumod", name = "Seppuku", version = SeppukuMod.VERSION)
public final class SeppukuMod {

public static final String VERSION = "3.2.1";
public static final String VERSION = "3.2.2";

/**
* Our mods entry point
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.renderer.texture.DynamicTexture;
import net.minecraft.util.ResourceLocation;
import org.apache.commons.io.IOUtils;
import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -49,30 +49,24 @@ public void displayCape(EventCapeLocation event) {
}

public void downloadCapeUsers() {
// Thread t = new Thread(new Runnable() {
// public void run() {
// }
// });
// t.start();
try {
URL url = new URL("https://seppuku.pw/capes/");
HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();
httpURLConnection.addRequestProperty("User-Agent", "Mozilla/4.76");
final BufferedReader reader = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream()));
String line;
while ((line = reader.readLine()) != null) {
if (!line.startsWith("<pre>") && !line.startsWith("</pre>") && line.length() > 1) {
final String[] split = line.split(";");
final List<String> lines = IOUtils.readLines(httpURLConnection.getInputStream(), StandardCharsets.UTF_8);
lines.stream().filter(line -> line.contains(";")).forEach(line -> {
final String[] split = line.split(";");
if (split.length > 1) {
if (split[0] != null && split[1] != null) {
if (split[1].toLowerCase().endsWith("png")) {
System.out.println("uuid:" + split[0]);
this.capeUserList.add(new CapeUser(split[0], split[1]));
}
}
}
}
reader.close();
});
} catch (Exception e) {
//e.printStackTrace();
e.printStackTrace();
}
}

Expand Down

0 comments on commit 78f6631

Please sign in to comment.