diff --git a/src/main/java/dev/yurisuika/raised/client/gui/screens/RaisedScreen.java b/src/main/java/dev/yurisuika/raised/client/gui/screens/RaisedScreen.java index f958f0d7..df857207 100644 --- a/src/main/java/dev/yurisuika/raised/client/gui/screens/RaisedScreen.java +++ b/src/main/java/dev/yurisuika/raised/client/gui/screens/RaisedScreen.java @@ -1,6 +1,5 @@ package dev.yurisuika.raised.client.gui.screens; -import com.mojang.authlib.GameProfile; import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.serialization.Codec; import dev.yurisuika.raised.client.RaisedOptions; @@ -28,11 +27,9 @@ import net.minecraft.util.CommonColors; import net.minecraft.util.Mth; import net.minecraft.world.effect.MobEffects; -import net.minecraft.world.entity.player.PlayerModelPart; import net.minecraft.world.item.Items; import java.util.Arrays; -import java.util.UUID; public class RaisedScreen extends Screen { @@ -287,17 +284,12 @@ public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partia guiGraphics.setColor(1.0F, 1.0F, 1.0F, 1.0F); } case PLAYERS -> { - UUID uuidPlayer = minecraft.getGameProfile().getId(); - UUID uuidNotch = UUID.fromString("069a79f4-44e9-4726-a5be-fca90e38aaf5"); - GameProfile profilePlayer = minecraft.getMinecraftSessionService().fetchProfile(uuidPlayer, false).profile(); - GameProfile profileNotch = minecraft.getMinecraftSessionService().fetchProfile(uuidNotch, false).profile(); - guiGraphics.fill(-91 + 1, offset - 1 - 10 - 9, -91 + 1 + 144, offset - 1, Integer.MIN_VALUE); guiGraphics.fill(-91 + 1 + 1, offset - 1 - 9 - 9, -91 + 1 + 144, offset - 1 - 1 - 9, minecraft.options.getBackgroundColor(553648127)); guiGraphics.fill(-91 + 1 + 1, offset - 1 - 9, -91 + 1 + 144, offset - 1 - 1, minecraft.options.getBackgroundColor(553648127)); - PlayerFaceRenderer.draw(guiGraphics, minecraft.getSkinManager().getInsecureSkin(profilePlayer).texture(), -91 + 1 + 1, offset - 1 - 9 - 9, 8, minecraft.level.getPlayerByUUID(uuidPlayer).isModelPartShown(PlayerModelPart.HAT), "Dinnerbone".equals(profilePlayer.getName()) || "Grumm".equals(profilePlayer.getName())); - PlayerFaceRenderer.draw(guiGraphics, minecraft.getSkinManager().getInsecureSkin(profileNotch).texture(), -91 + 1 + 1, offset - 1 - 9, 8, true, false); + PlayerFaceRenderer.draw(guiGraphics, ResourceLocation.tryParse("textures/entity/player/wide/steve.png"), -91 + 1 + 1, offset - 1 - 9 - 9, 8, true, false); + PlayerFaceRenderer.draw(guiGraphics, ResourceLocation.tryParse("textures/entity/player/slim/alex.png"), -91 + 1 + 1, offset - 1 - 9, 8, true, false); guiGraphics.drawString(font, translatableX, -91 + 1 + 10, offset - 1 - 9 - 9, CommonColors.WHITE); guiGraphics.drawString(font, translatableY, -91 + 1 + 10, offset - 1 - 9, CommonColors.WHITE); diff --git a/src/main/java/dev/yurisuika/raised/util/config/Config.java b/src/main/java/dev/yurisuika/raised/util/config/Config.java index a297609c..60585d91 100644 --- a/src/main/java/dev/yurisuika/raised/util/config/Config.java +++ b/src/main/java/dev/yurisuika/raised/util/config/Config.java @@ -7,6 +7,7 @@ import java.io.File; import java.io.FileWriter; +import java.nio.charset.StandardCharsets; import java.nio.file.Files; public class Config { @@ -25,7 +26,7 @@ public static void setOptions(Options options) { public static void saveConfig() { try { - FileWriter fileWriter = new FileWriter(file); + FileWriter fileWriter = new FileWriter(file, StandardCharsets.UTF_8); fileWriter.write(gson.toJson(getOptions())); fileWriter.close(); } catch (Exception e) {