|
12 | 12 | import com.mojang.blaze3d.platform.InputConstants;
|
13 | 13 | import net.minecraft.client.Minecraft;
|
14 | 14 | import net.minecraft.client.gui.screens.Screen;
|
15 |
| -import net.minecraft.client.resources.PlayerSkin; |
16 | 15 | import net.minecraft.network.chat.Component;
|
17 | 16 | import net.minecraft.resources.ResourceLocation;
|
18 | 17 | import net.minecraftforge.client.event.InputEvent.MouseScrollingEvent;
|
@@ -65,12 +64,11 @@ public static void onClientTickEvent(final ClientTickEvent event)
|
65 | 64 | window.addChild(createTestGuiButton(0, "General All-in-one", new ResourceLocation(BlockUI.MOD_ID, "gui/test.xml"), parent -> {
|
66 | 65 | parent.findPaneOfTypeByID("missing_out_of_jar", Image.class).setImage(OutOfJarResourceLocation.ofMinecraftFolder(BlockUI.MOD_ID, "missing_out_of_jar.png"), false);
|
67 | 66 | 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 | + } |
74 | 72 | }));
|
75 | 73 | window.addChild(createTestGuiButton(1, "Tooltip Positioning", new ResourceLocation(BlockUI.MOD_ID, "gui/test2.xml")));
|
76 | 74 | window.addChild(createTestGuiButton(2, "ItemIcon To BlockState", new ResourceLocation(BlockUI.MOD_ID, "gui/test3.xml"), BlockStateTestGui::setup));
|
|
0 commit comments