diff --git a/Common/src/main/java/customskinloader/loader/MojangAPILoader.java b/Common/src/main/java/customskinloader/loader/MojangAPILoader.java index 47a2e48..97c6ae3 100644 --- a/Common/src/main/java/customskinloader/loader/MojangAPILoader.java +++ b/Common/src/main/java/customskinloader/loader/MojangAPILoader.java @@ -163,8 +163,8 @@ public class MojangAPILoader implements ICustomSkinLoaderPlugin, ProfileLoader.I Gson gson = new GsonBuilder().registerTypeAdapter(UUID.class, new UUIDTypeAdapter()).registerTypeAdapter(PropertyMap.class, new PropertyMap.Serializer()).create(); MinecraftProfilePropertiesResponse propertiesResponce = gson.fromJson(responce.content, MinecraftProfilePropertiesResponse.class); - GameProfile newGameProfile = new GameProfile(TextureUtil.AuthlibField.MINECRAFTPROFILEPROPERTIESRESPONSE_ID.get(propertiesResponce), TextureUtil.AuthlibField.MINECRAFTPROFILEPROPERTIESRESPONSE_NAME.get(propertiesResponce)); - newGameProfile.getProperties().putAll(TextureUtil.AuthlibField.MINECRAFTPROFILEPROPERTIESRESPONSE_PROPERTIES.get(propertiesResponce)); + GameProfile newGameProfile = new GameProfile(TextureUtil.AuthlibField.MINECRAFT_PROFILE_PROPERTIES_RESPONSE_ID.get(propertiesResponce), TextureUtil.AuthlibField.MINECRAFT_PROFILE_PROPERTIES_RESPONSE_NAME.get(propertiesResponce)); + newGameProfile.getProperties().putAll(TextureUtil.AuthlibField.MINECRAFT_PROFILE_PROPERTIES_RESPONSE_PROPERTIES.get(propertiesResponce)); return newGameProfile; } @@ -185,10 +185,10 @@ public class MojangAPILoader implements ICustomSkinLoaderPlugin, ProfileLoader.I Gson gson = new GsonBuilder().registerTypeAdapter(UUID.class, new UUIDTypeAdapter()).create(); MinecraftTexturesPayload result = gson.fromJson(json, MinecraftTexturesPayload.class); - if (result == null || TextureUtil.AuthlibField.MINECRAFTTEXTURESPAYLOAD_TEXTURES.get(result) == null) { + if (result == null || TextureUtil.AuthlibField.MINECRAFT_TEXTURES_PAYLOAD_TEXTURES.get(result) == null) { return Maps.newHashMap(); } - return TextureUtil.AuthlibField.MINECRAFTTEXTURESPAYLOAD_TEXTURES.get(result); + return TextureUtil.AuthlibField.MINECRAFT_TEXTURES_PAYLOAD_TEXTURES.get(result); } @Override diff --git a/Common/src/main/java/customskinloader/utils/TextureUtil.java b/Common/src/main/java/customskinloader/utils/TextureUtil.java index 17b1d48..694bd28 100644 --- a/Common/src/main/java/customskinloader/utils/TextureUtil.java +++ b/Common/src/main/java/customskinloader/utils/TextureUtil.java @@ -2,10 +2,8 @@ package customskinloader.utils; import java.io.File; import java.lang.reflect.Field; -import java.util.Map; import java.util.UUID; -import com.mojang.authlib.minecraft.MinecraftProfileTexture; import com.mojang.authlib.properties.Property; import com.mojang.authlib.yggdrasil.response.MinecraftProfilePropertiesResponse; import com.mojang.authlib.yggdrasil.response.MinecraftTexturesPayload; @@ -43,10 +41,10 @@ public class TextureUtil { // resulting in changes to method names, so reflection is used here to be compatible with these changes. public enum AuthlibField { PROPERTY_VALUE_FIELD(Property.class, "value"), - MINECRAFTPROFILEPROPERTIESRESPONSE_ID(MinecraftProfilePropertiesResponse.class, "id"), - MINECRAFTPROFILEPROPERTIESRESPONSE_NAME(MinecraftProfilePropertiesResponse.class, "name"), - MINECRAFTPROFILEPROPERTIESRESPONSE_PROPERTIES(MinecraftProfilePropertiesResponse.class, "properties"), - MINECRAFTTEXTURESPAYLOAD_TEXTURES(MinecraftTexturesPayload.class, "textures"); + MINECRAFT_PROFILE_PROPERTIES_RESPONSE_ID(MinecraftProfilePropertiesResponse.class, "id"), + MINECRAFT_PROFILE_PROPERTIES_RESPONSE_NAME(MinecraftProfilePropertiesResponse.class, "name"), + MINECRAFT_PROFILE_PROPERTIES_RESPONSE_PROPERTIES(MinecraftProfilePropertiesResponse.class, "properties"), + MINECRAFT_TEXTURES_PAYLOAD_TEXTURES(MinecraftTexturesPayload.class, "textures"); private final Field field; diff --git a/Forge/Legacy/build.properties b/Forge/Legacy/build.properties index b2c5f18..9dd7dbf 100644 --- a/Forge/Legacy/build.properties +++ b/Forge/Legacy/build.properties @@ -1,6 +1,6 @@ minecraft_version=1.12.2 minecraft_full_versions=1.8,1.8.8,1.8.9,1.9,1.9.4,1.10,1.10.2,1.11,1.11.2,1.12,1.12.1,1.12.2,1.13.2,1.14.2,1.14.3,1.14.4,1.15,1.15.1,1.15.2,1.16.1,1.16.2,1.16.3,1.16.4,1.16.5 -java_full_versions=8,9,10,11,12,13,14,15,16,17,18 +java_full_versions=8,9,10,11,12,13,14,15,16,17,18,19,20,21 #forge gradle needs forge version forge_mc_version=1.12.2 forge_version=14.23.5.2768 diff --git a/build.properties b/build.properties index 6b73650..ecd7806 100644 --- a/build.properties +++ b/build.properties @@ -1,3 +1,3 @@ name=CustomSkinLoader group=customskinloader -version=14.18 +version=14.18.1