Skip to content

Commit bc2212a

Browse files
committed
fix compile derp
1 parent 4a6167e commit bc2212a

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/main/java/com/ldtteam/blockui/mod/ClientEventSubscriber.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import com.mojang.blaze3d.platform.InputConstants;
1313
import net.minecraft.client.Minecraft;
1414
import net.minecraft.client.gui.screens.Screen;
15-
import net.minecraft.client.resources.PlayerSkin;
1615
import net.minecraft.network.chat.Component;
1716
import net.minecraft.resources.ResourceLocation;
1817
import net.minecraftforge.client.event.InputEvent.MouseScrollingEvent;
@@ -65,12 +64,11 @@ public static void onClientTickEvent(final ClientTickEvent event)
6564
window.addChild(createTestGuiButton(0, "General All-in-one", new ResourceLocation(BlockUI.MOD_ID, "gui/test.xml"), parent -> {
6665
parent.findPaneOfTypeByID("missing_out_of_jar", Image.class).setImage(OutOfJarResourceLocation.ofMinecraftFolder(BlockUI.MOD_ID, "missing_out_of_jar.png"), false);
6766
parent.findPaneOfTypeByID("working_out_of_jar", Image.class).setImage(OutOfJarResourceLocation.of(BlockUI.MOD_ID, Path.of("../../src/test/resources/button.png")), false);
68-
OutOfJarResourceLocation.ofMinecraftSkin(Minecraft.getInstance(), Minecraft.getInstance().getGameProfile(), null)
69-
.thenAccept(resLoc -> parent.findPaneOfTypeByID("player_skin", Image.class).setImage(resLoc, false));
70-
OutOfJarResourceLocation.ofMinecraftSkin(Minecraft.getInstance(), Minecraft.getInstance().getGameProfile(), PlayerSkin::capeTexture)
71-
.thenAccept(resLoc -> {if (resLoc!=null){parent.findPaneOfTypeByID("player_cape", Image.class).setImage(resLoc, false);}});
72-
OutOfJarResourceLocation.ofMinecraftSkin(Minecraft.getInstance(), Minecraft.getInstance().getGameProfile(), PlayerSkin::elytraTexture)
73-
.thenAccept(resLoc -> {if (resLoc!=null){parent.findPaneOfTypeByID("player_elytra", Image.class).setImage(resLoc, false);}});
67+
final ResourceLocation resourceLocation = OutOfJarResourceLocation.ofMinecraftSkin(Minecraft.getInstance(), Minecraft.getInstance().getUser().getGameProfile(), null);
68+
if (resourceLocation != null)
69+
{
70+
parent.findPaneOfTypeByID("player_skin", Image.class).setImage(resourceLocation, false);
71+
}
7472
}));
7573
window.addChild(createTestGuiButton(1, "Tooltip Positioning", new ResourceLocation(BlockUI.MOD_ID, "gui/test2.xml")));
7674
window.addChild(createTestGuiButton(2, "ItemIcon To BlockState", new ResourceLocation(BlockUI.MOD_ID, "gui/test3.xml"), BlockStateTestGui::setup));

0 commit comments

Comments
 (0)