From 21a33ebc76abdcf1f21fa7be9f4ad710915086db Mon Sep 17 00:00:00 2001 From: Sollace Date: Fri, 9 Feb 2024 19:25:44 +0000 Subject: [PATCH] Temp fix for an hdskins bug --- .../minelittlepony/client/hdskins/GuiSkinsMineLP.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/com/minelittlepony/client/hdskins/GuiSkinsMineLP.java b/src/main/java/com/minelittlepony/client/hdskins/GuiSkinsMineLP.java index 05d484cd..8924ad9f 100644 --- a/src/main/java/com/minelittlepony/client/hdskins/GuiSkinsMineLP.java +++ b/src/main/java/com/minelittlepony/client/hdskins/GuiSkinsMineLP.java @@ -6,6 +6,7 @@ import com.minelittlepony.client.MineLittlePony; import com.minelittlepony.common.client.gui.dimension.Bounds; import com.minelittlepony.common.client.gui.element.Button; import com.minelittlepony.common.client.gui.sprite.TextureSprite; +import com.minelittlepony.hdskins.client.HDSkins; import com.minelittlepony.hdskins.client.gui.DualCarouselWidget; import com.minelittlepony.hdskins.client.gui.GuiSkins; import com.minelittlepony.hdskins.server.SkinServerList; @@ -40,6 +41,16 @@ class GuiSkinsMineLP extends GuiSkins { }); } + @Override + public void init() { + // TODO: Known HDSkins bug only occurs when reloading with Ctrl+Alt+R + var equipment = HDSkins.getInstance().getDummyPlayerEquipmentList().getValues().toList(); + if (equipment.indexOf(previewer.getEquipment()) < 0) { + previewer.setEquipment(HDSkins.getInstance().getDummyPlayerEquipmentList().getDefault()); + } + super.init(); + } + @Override protected void initServerPreviewButtons(Bounds area) { if (!(parent instanceof GuiPonySettings)) {