diff --git a/build.gradle b/build.gradle index e8722c37..2b27d1da 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { alias libs.plugins.fabric.loom - alias libs.plugins.legacy.looming + alias libs.plugins.ploceus id "maven-publish" } @@ -12,25 +12,13 @@ base { } repositories { - maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots" } maven { url "https://jitpack.io" } } -loom { - decompilers { - vineflower { - options.put("mark-corresponding-synthetics", "1") - options.put("ind", " ") - } - } - accessWidenerPath = file("src/main/resources/optifabric.accesswidener") -} - dependencies { minecraft libs.minecraft - mappings legacy.yarn(libs.versions.minecraft.get(), libs.versions.yarn.build.get()) + mappings variantOf(libs.feather.mappings) { classifier "v2" } modImplementation libs.fabric.loader - vineflowerDecompilerClasspath libs.vineflower include(modImplementation libs.fabric.asm.get()) include(implementation libs.zt.zip.get()) include(runtimeOnly libs.slf4j.api.get()) diff --git a/gradle.properties b/gradle.properties index 87fde7eb..0af67d74 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ org.gradle.jvmargs=-Xmx2G org.gradle.parallel=true mod_version=2.1.0 -target_version=1.6-1.7.10 +target_version=1.6-1.7.10-ornithe archives_name=optifabric maven_group=me.modmuss50 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index fe0c2af9..7bcd6336 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,21 +1,20 @@ [versions] minecraft = "1.7.10" -yarn_build = "533" +feather-mappings = "1.7.10+build.25" fabric-loader = "0.15.1" loom = "1.4-SNAPSHOT" -vineflower = "1.10.0-SNAPSHOT" fabric-asm = "v2.3.3" zt-zip = "1.16" slf4j-api = "2.0.9" [libraries] minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" } +feather-mappings = { module = "net.ornithemc:feather", version.ref = "feather-mappings" } fabric-loader = { module = "net.fabricmc:fabric-loader", version.ref = "fabric-loader" } -vineflower = { module = "org.vineflower:vineflower", version.ref = "vineflower" } fabric-asm = { module = "com.github.Minecraft-Java-Edition-Speedrunning:fabric-asm", version.ref = "fabric-asm" } zt-zip = { module = "org.zeroturnaround:zt-zip", version.ref = "zt-zip" } slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4j-api" } [plugins] fabric_loom = { id = "fabric-loom", version.ref = "loom" } -legacy_looming = { id = "legacy-looming", version.ref = "loom" } +ploceus = { id = "ploceus", version.ref = "loom" } diff --git a/settings.gradle b/settings.gradle index e98b71da..a28cfa67 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,7 +1,8 @@ pluginManagement { repositories { maven { url "https://maven.fabricmc.net" } - maven { url "https://repo.legacyfabric.net/repository/legacyfabric" } + maven { url "https://maven.ornithemc.net/releases" } + maven { url "https://maven.ornithemc.net/snapshots" } mavenCentral() gradlePluginPortal() mavenLocal() diff --git a/src/main/java/me/modmuss50/optifabric/mixin/TitleScreenMixin.java b/src/main/java/me/modmuss50/optifabric/mixin/TitleScreenMixin.java index 5750b076..37ad43cc 100644 --- a/src/main/java/me/modmuss50/optifabric/mixin/TitleScreenMixin.java +++ b/src/main/java/me/modmuss50/optifabric/mixin/TitleScreenMixin.java @@ -1,7 +1,7 @@ package me.modmuss50.optifabric.mixin; import me.modmuss50.optifabric.mod.*; -import net.minecraft.client.MinecraftClient; +import net.minecraft.client.Minecraft; import net.minecraft.client.gui.screen.*; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.*; @@ -16,6 +16,6 @@ private void init(CallbackInfo info) { @Inject(method = "render", at = @At("RETURN")) private void render(CallbackInfo ci) { - if (!Optifabric.hasError()) this.drawWithShadow(MinecraftClient.getInstance().textRenderer, OptifineVersion.version, 2, this.height - 20, 0xFFFFFFFF); + if (!Optifabric.hasError()) this.drawString(Minecraft.getInstance().textRenderer, OptifineVersion.version, 2, this.height - 20, 0xFFFFFFFF); } } diff --git a/src/main/resources/optifabric.accesswidener b/src/main/resources/optifabric.accesswidener index 81f4265f..b1db1043 100644 --- a/src/main/resources/optifabric.accesswidener +++ b/src/main/resources/optifabric.accesswidener @@ -1,5 +1,5 @@ accessWidener v2 named accessible field net/minecraft/client/gui/widget/ButtonWidget width I accessible field net/minecraft/client/gui/widget/ButtonWidget height I -accessible method net/minecraft/util/Language getInstance ()Lnet/minecraft/util/Language; +accessible method net/minecraft/locale/Language getInstance ()Lnet/minecraft/locale/Language; accessible method net/minecraft/block/Block setOpacity (I)Lnet/minecraft/block/Block;