mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-25 22:07:59 +01:00
No
This commit is contained in:
parent
db4d9132e5
commit
9956824861
1 changed files with 12 additions and 14 deletions
|
@ -271,25 +271,22 @@ public final class HDSkinManager implements IResourceManagerReloadListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void reloadSkins() {
|
public void reloadSkins() {
|
||||||
|
Stream<NetworkPlayerInfo> playerList = Stream.empty();
|
||||||
|
|
||||||
Minecraft mc = Minecraft.getMinecraft();
|
Minecraft mc = Minecraft.getMinecraft();
|
||||||
|
if (mc.world != null) {
|
||||||
NetHandlerPlayClient playClient = mc.getConnection();
|
playerList = mc.world.playerEntities.stream()
|
||||||
|
|
||||||
Stream<NetworkPlayerInfo> playerList = playClient == null ?
|
|
||||||
Stream.empty() :
|
|
||||||
playClient.getPlayerInfoMap().stream();
|
|
||||||
|
|
||||||
Stream<NetworkPlayerInfo> world = mc.world == null ?
|
|
||||||
Stream.empty() :
|
|
||||||
mc.world.playerEntities.stream()
|
|
||||||
.filter(AbstractClientPlayer.class::isInstance)
|
.filter(AbstractClientPlayer.class::isInstance)
|
||||||
.map(AbstractClientPlayer.class::cast)
|
.map(AbstractClientPlayer.class::cast)
|
||||||
.map(PlayerUtil::getInfo);
|
.map(PlayerUtil::getInfo);
|
||||||
|
}
|
||||||
|
|
||||||
Stream.concat(playerList, world)
|
NetHandlerPlayClient playClient = mc.getConnection();
|
||||||
.filter(Objects::nonNull)
|
if (playClient != null) {
|
||||||
.distinct()
|
playerList = Stream.concat(playerList, playClient.getPlayerInfoMap().stream());
|
||||||
|
}
|
||||||
|
|
||||||
|
playerList.filter(Objects::nonNull).distinct()
|
||||||
.forEach(this::clearNetworkSkin);
|
.forEach(this::clearNetworkSkin);
|
||||||
|
|
||||||
clearListeners.removeIf(this::onSkinCacheCleared);
|
clearListeners.removeIf(this::onSkinCacheCleared);
|
||||||
|
@ -297,6 +294,7 @@ 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;
|
ITextureObject ito = null;
|
||||||
while (ito == null) {
|
while (ito == null) {
|
||||||
|
|
Loading…
Reference in a new issue