mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 08:14:23 +01:00
This is never going to be null. We have to check for the missing sprite instead. -_-
This commit is contained in:
parent
9d481d90a0
commit
1911a6dde8
2 changed files with 4 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
package com.minelittlepony.client.hdskins.gui;
|
||||
|
||||
import net.minecraft.client.texture.MissingSprite;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
import com.minelittlepony.client.MineLittlePony;
|
||||
|
@ -36,7 +37,7 @@ class PonyPreview extends PlayerPreview {
|
|||
protected DummyPlayer ponify(DummyPlayer human, DummyPlayer pony) {
|
||||
Identifier loc = human.getTextures().get(Type.SKIN).getId();
|
||||
|
||||
if (loc == null || Pony.getBufferedImage(loc) == null) {
|
||||
if (loc == null || Pony.getBufferedImage(loc) == MissingSprite.getMissingSpriteTexture().getImage()) {
|
||||
return pony;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ import net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener;
|
|||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.network.AbstractClientPlayerEntity;
|
||||
import net.minecraft.client.network.PlayerListEntry;
|
||||
import net.minecraft.client.texture.MissingSprite;
|
||||
import net.minecraft.client.util.DefaultSkinHelper;
|
||||
import net.minecraft.resource.Resource;
|
||||
import net.minecraft.resource.ResourceManager;
|
||||
|
@ -98,7 +99,7 @@ public class PonyManager implements IPonyManager, IdentifiableResourceReloadList
|
|||
Identifier skin = playerInfo.getSkinTexture();
|
||||
UUID uuid = playerInfo.getProfile().getId();
|
||||
|
||||
if (Pony.getBufferedImage(skin) == null) {
|
||||
if (Pony.getBufferedImage(skin) == MissingSprite.getMissingSpriteTexture().getImage()) {
|
||||
return getDefaultPony(uuid);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue