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

This reverts commit 5ab8126
This commit is contained in:
Matthew Messinger 2018-09-03 15:52:35 -04:00
parent e8217aa9c0
commit d82af57b3c

View file

@ -295,8 +295,12 @@ public final class HDSkinManager implements IResourceManagerReloadListener {
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.
Minecraft.getMinecraft().getTextureManager().getTexture(resource);
ITextureObject ito = null;
while (ito == null) {
ito = Minecraft.getMinecraft().getTextureManager().getTexture(resource);
}
// grab the metadata object via reflection. Object is live.
Map<String, String> metadata = ProfileTextureUtil.getMetadata(texture);