diff --git a/common/src/main/kotlin/me/cael/capes/CapeConfig.kt b/common/src/main/kotlin/me/cael/capes/CapeConfig.kt index 25bcade..f7edd5e 100644 --- a/common/src/main/kotlin/me/cael/capes/CapeConfig.kt +++ b/common/src/main/kotlin/me/cael/capes/CapeConfig.kt @@ -13,6 +13,7 @@ class CapeConfig { var enableMinecraftCapesMod = false var enableCosmetica = false var enableCloaksPlus = false + var enableSkinMC = false var enableElytraTexture = true fun save() { diff --git a/common/src/main/kotlin/me/cael/capes/CapeType.kt b/common/src/main/kotlin/me/cael/capes/CapeType.kt index bbe96ca..85ec185 100644 --- a/common/src/main/kotlin/me/cael/capes/CapeType.kt +++ b/common/src/main/kotlin/me/cael/capes/CapeType.kt @@ -5,7 +5,7 @@ import net.minecraft.screen.ScreenTexts import net.minecraft.text.Text enum class CapeType(val stylized: String) { - MINECRAFT("Minecraft"), OPTIFINE("OptiFine"), LABYMOD("LabyMod"), WYNNTILS("Wynntils"), MINECRAFTCAPES("MinecraftCapes"), COSMETICA("Cosmetica"), CLOAKSPLUS("Cloaks+"); + MINECRAFT("Minecraft"), OPTIFINE("OptiFine"), LABYMOD("LabyMod"), WYNNTILS("Wynntils"), MINECRAFTCAPES("MinecraftCapes"), COSMETICA("Cosmetica"), CLOAKSPLUS("Cloaks+"), SKINMC("SkinMC"); fun cycle() = when(this) { MINECRAFT -> OPTIFINE @@ -14,7 +14,8 @@ enum class CapeType(val stylized: String) { WYNNTILS -> COSMETICA COSMETICA -> MINECRAFTCAPES MINECRAFTCAPES -> CLOAKSPLUS - CLOAKSPLUS -> MINECRAFT + CLOAKSPLUS -> SKINMC + SKINMC -> MINECRAFT } fun getURL(profile: GameProfile): String? { @@ -26,6 +27,7 @@ enum class CapeType(val stylized: String) { COSMETICA -> if(config.enableCosmetica) "https://api.cosmetica.cc/get/cloak?username=${profile.name}&uuid=${profile.id}¬hirdparty" else null MINECRAFTCAPES -> if(config.enableMinecraftCapesMod) "https://api.minecraftcapes.net/profile/${profile.id.toString().replace("-", "")}" else null CLOAKSPLUS -> if(config.enableCloaksPlus) "http://161.35.130.99/capes/${profile.name}.png" else null + SKINMC -> if(config.enableSkinMC) "https://skinmc.net/api/v1/skinmcCape/${profile.id}" else null MINECRAFT -> null } } diff --git a/common/src/main/kotlin/me/cael/capes/menu/ToggleMenu.kt b/common/src/main/kotlin/me/cael/capes/menu/ToggleMenu.kt index 4b7b115..29f038d 100644 --- a/common/src/main/kotlin/me/cael/capes/menu/ToggleMenu.kt +++ b/common/src/main/kotlin/me/cael/capes/menu/ToggleMenu.kt @@ -51,15 +51,21 @@ class ToggleMenu(parent: Screen, gameOptions: GameOptions) : MainMenu(parent, ga it.message = CapeType.CLOAKSPLUS.getToggleText(config.enableCloaksPlus) }.position(width / 2 - 155 + 160, height / 7 + 3 * 24).size(150, 20).build()) + addDrawableChild(ButtonWidget.builder(CapeType.SKINMC.getToggleText(config.enableSkinMC)) { + config.enableSkinMC = !config.enableSkinMC + config.save() + it.message = CapeType.SKINMC.getToggleText(config.enableSkinMC) + }.position(width / 2 - 155, height / 7 + 4 * 24).size(150, 20).build()) + addDrawableChild(ButtonWidget.builder(elytraMessage(config.enableElytraTexture)) { config.enableElytraTexture = !config.enableElytraTexture config.save() it.message = elytraMessage(config.enableElytraTexture) - }.position((width/2) - (200 / 2), height / 7 + 4 * 24).size(200, 20).build()) + }.position((width/2) - (200 / 2), height / 7 + 5 * 24).size(200, 20).build()) addDrawableChild(ButtonWidget.builder(ScreenTexts.DONE) { client!!.setScreen(parent) - }.position((width/2) - (200 / 2), height / 7 + 5 * 24).size(200, 20).build()) + }.position((width/2) - (200 / 2), height / 7 + 6 * 24).size(200, 20).build()) } diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index 4783e71..f212237 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -4,7 +4,7 @@ "version": "${version}", "name": "Capes", - "description": "A mod that lets you use capes from Optifine, LabyMod, Cosmetica, Wynntils, Capes++, and the MinecraftCapes Mod.", + "description": "A mod that lets you use capes from Optifine, LabyMod, Cosmetica, Wynntils, Capes++, SkinMC, and the MinecraftCapes Mod.", "authors": [ "Cael" ],