From 2aa3374de88be6ea3de6d61ba0e6bbc23cda42b6 Mon Sep 17 00:00:00 2001 From: CaelTheColher <16297430+CaelTheColher@users.noreply.github.com> Date: Sun, 11 Jun 2023 12:56:26 -0300 Subject: [PATCH] 1.20 --- .../kotlin/me/cael/capes/menu/MainMenu.kt | 11 +++++----- .../kotlin/me/cael/capes/menu/SelectorMenu.kt | 5 +++-- fabric/src/main/resources/fabric.mod.json | 4 ++-- forge/src/main/resources/META-INF/mods.toml | 7 +++---- gradle.properties | 21 +++++++++---------- 5 files changed, 23 insertions(+), 25 deletions(-) diff --git a/common/src/main/kotlin/me/cael/capes/menu/MainMenu.kt b/common/src/main/kotlin/me/cael/capes/menu/MainMenu.kt index adc21f1..10c2184 100644 --- a/common/src/main/kotlin/me/cael/capes/menu/MainMenu.kt +++ b/common/src/main/kotlin/me/cael/capes/menu/MainMenu.kt @@ -1,11 +1,10 @@ package me.cael.capes.menu -import net.minecraft.client.gui.DrawableHelper +import net.minecraft.client.gui.DrawContext import net.minecraft.client.gui.screen.Screen import net.minecraft.client.gui.screen.option.GameOptionsScreen import net.minecraft.client.gui.widget.ButtonWidget import net.minecraft.client.option.GameOptions -import net.minecraft.client.util.math.MatrixStack import net.minecraft.text.Text open class MainMenu(parent: Screen, gameOptions: GameOptions) : GameOptionsScreen(parent, gameOptions, Text.translatable("options.capes.title")) { @@ -32,9 +31,9 @@ open class MainMenu(parent: Screen, gameOptions: GameOptions) : GameOptionsScree } - override fun render(matrices: MatrixStack, mouseX: Int, mouseY: Int, delta: Float) { - this.renderBackground(matrices) - DrawableHelper.drawCenteredText(matrices, textRenderer, title, width / 2, 20, 16777215) - super.render(matrices, mouseX, mouseY, delta) + override fun render(context: DrawContext, mouseX: Int, mouseY: Int, delta: Float) { + this.renderBackground(context) + context.drawCenteredTextWithShadow(textRenderer, title, width / 2, 20, 16777215) + super.render(context, mouseX, mouseY, delta) } } \ No newline at end of file diff --git a/common/src/main/kotlin/me/cael/capes/menu/SelectorMenu.kt b/common/src/main/kotlin/me/cael/capes/menu/SelectorMenu.kt index 07d1d88..34930ce 100644 --- a/common/src/main/kotlin/me/cael/capes/menu/SelectorMenu.kt +++ b/common/src/main/kotlin/me/cael/capes/menu/SelectorMenu.kt @@ -6,6 +6,7 @@ import me.cael.capes.mixins.AccessorPlayerListEntry import me.cael.capes.render.DisplayPlayerEntityRenderer import me.cael.capes.render.PlaceholderEntity import net.minecraft.client.MinecraftClient +import net.minecraft.client.gui.DrawContext import net.minecraft.client.gui.screen.Screen import net.minecraft.client.gui.widget.ButtonWidget import net.minecraft.client.option.GameOptions @@ -53,8 +54,8 @@ class SelectorMenu(parent: Screen, gameOptions: GameOptions) : MainMenu(parent, } - override fun render(matrices: MatrixStack, mouseX: Int, mouseY: Int, delta: Float) { - super.render(matrices, mouseX, mouseY, delta) + override fun render(context: DrawContext, mouseX: Int, mouseY: Int, delta: Float) { + super.render(context, mouseX, mouseY, delta) val playerX : Int = width/2 val playerY = 215 diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index 7aa75c2..eae62fd 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -37,10 +37,10 @@ "capes-common.mixins.json" ], "depends": { - "fabricloader": ">=0.14.6", + "fabricloader": ">=0.14.21", "fabric": "*", "fabric-language-kotlin": "*", - "minecraft": "1.19.3", + "minecraft": ">=1.20", "java": ">=17" } } diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml index 8c9f176..505f19c 100644 --- a/forge/src/main/resources/META-INF/mods.toml +++ b/forge/src/main/resources/META-INF/mods.toml @@ -1,5 +1,5 @@ modLoader = "kotlinforforge" -loaderVersion = "[3,)" +loaderVersion = "[4,)" issueTrackerURL = "https://github.com/CaelTheColher/Capes/issues" license = "LGPL 2.1" @@ -11,18 +11,17 @@ authors = "Cael" description = ''' A mod that lets you use capes from Optifine, LabyMod, Cosmetica, Wynntils, Capes++, and the MinecraftCapes Mod. ''' -logoFile = "assets/capes/icon.png" [[dependencies.capes]] modId = "forge" mandatory = true -versionRange = "[44,)" +versionRange = "[46,)" ordering = "NONE" side = "BOTH" [[dependencies.capes]] modId = "minecraft" mandatory = true -versionRange = "[1.19.3,)" +versionRange = "[1.20,)" ordering = "NONE" side = "BOTH" diff --git a/gradle.properties b/gradle.properties index 533b38f..3ef9ea0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,24 +1,23 @@ org.gradle.jvmargs=-Xmx8G -minecraft_version=1.19.3 -yarn_mappings=1.19.3+build.3 +minecraft_version=1.20 +yarn_mappings=1.20+build.1 enabled_platforms=fabric,forge archives_base_name=capes -mod_version=1.5.2+1.19.3 +mod_version=1.5.2+1.20 maven_group=me.capes -fabric_loader_version=0.14.11 -fabric_api_version=0.69.1+1.19.3 +fabric_loader_version=0.14.21 +fabric_api_version=0.83.0+1.20 -forge_version=1.19.3-44.1.8 +forge_version=1.20-46.0.1 # Other APIs -fabric_kotlin_version=1.8.7+kotlin.1.7.22 -forge_kotlin_version=4.+ -omega_config_version=1.2.3-1.18.1 -modmenu_version=5.0.0-alpha.4 -mixinextras_version=0.2.0-beta.1 +fabric_kotlin_version=1.9.4+kotlin.1.8.21 +forge_kotlin_version=4.3.0 +modmenu_version=7.+ +mixinextras_version=0.2.+ # Publishing curseforge_id=408481