The result shouldn't be null, and if it is null you REALLY SHOULDN'T LOOP ON IT INDEFINITELY

This commit is contained in:
Sollace 2018-09-03 19:24:53 +02:00
parent 9956824861
commit 5ab8126b70

View file

@ -294,12 +294,8 @@ public final class HDSkinManager implements IResourceManagerReloadListener {
public void parseSkin(GameProfile profile, Type type, ResourceLocation resource, MinecraftProfileTexture texture) { public void parseSkin(GameProfile profile, Type type, ResourceLocation resource, MinecraftProfileTexture texture) {
// TODO: Infinite loop
// The texture needs to be loaded in order to be parsed. // The texture needs to be loaded in order to be parsed.
ITextureObject ito = null; Minecraft.getMinecraft().getTextureManager().getTexture(resource);
while (ito == null) {
ito = Minecraft.getMinecraft().getTextureManager().getTexture(resource);
}
// grab the metadata object via reflection. Object is live. // grab the metadata object via reflection. Object is live.
Map<String, String> metadata = ProfileTextureUtil.getMetadata(texture); Map<String, String> metadata = ProfileTextureUtil.getMetadata(texture);