diff --git a/api/src/main/java/xyz/nucleoid/server/translations/mixin/packet/TranslatableTextContentMixin.java b/api/src/main/java/xyz/nucleoid/server/translations/mixin/packet/TranslatableTextContentMixin.java index c94d4a6..6051364 100644 --- a/api/src/main/java/xyz/nucleoid/server/translations/mixin/packet/TranslatableTextContentMixin.java +++ b/api/src/main/java/xyz/nucleoid/server/translations/mixin/packet/TranslatableTextContentMixin.java @@ -1,5 +1,6 @@ package xyz.nucleoid.server.translations.mixin.packet; +import com.llamalad7.mixinextras.injector.ModifyExpressionValue; import com.mojang.datafixers.kinds.App; import com.mojang.serialization.MapCodec; import com.mojang.serialization.codecs.RecordCodecBuilder; @@ -14,14 +15,14 @@ @Mixin(TranslatableTextContent.class) public abstract class TranslatableTextContentMixin { - @Redirect( + @ModifyExpressionValue( method = "", at = @At(value = "INVOKE", target = "Lcom/mojang/serialization/codecs/RecordCodecBuilder;mapCodec(Ljava/util/function/Function;)Lcom/mojang/serialization/MapCodec;" ) ) - private static MapCodec stapi$addTranslationFallback(Function, ? extends App, TranslatableTextContent>> builder) { - return RecordCodecBuilder.mapCodec(builder).xmap(Function.identity(), (content) -> { + private static MapCodec stapi$addTranslationFallback(MapCodec original) { + return original.xmap(Function.identity(), (content) -> { if (content.getFallback() == null) { var target = LocalizationTarget.forPacket(); if (target != null) { diff --git a/api/src/main/resources/fabric.mod.json b/api/src/main/resources/fabric.mod.json index 7c60961..0d44621 100644 --- a/api/src/main/resources/fabric.mod.json +++ b/api/src/main/resources/fabric.mod.json @@ -19,8 +19,8 @@ ] }, "depends": { - "minecraft": ">=1.19.4-", - "fabricloader": ">=0.14.14", + "minecraft": ">=1.20.3-", + "fabricloader": ">=0.15.0", "fabric-resource-loader-v0": "*" }, "mixins": [ diff --git a/build.gradle b/build.gradle index dd64158..8215009 100644 --- a/build.gradle +++ b/build.gradle @@ -3,13 +3,13 @@ plugins { id 'eclipse' id 'idea' id 'maven-publish' - id 'fabric-loom' version '1.0.+' apply false + id 'fabric-loom' version '1.4.+' apply false id 'com.matthewprenger.cursegradle' version "1.4.0" } class Globals { - static def baseVersion = "2.1.1" - static def mcVersion = "1.20.3-pre4" + static def baseVersion = "2.2.0" + static def mcVersion = "1.20.3-rc1" static def yarnVersion = "+build.2" } @@ -49,11 +49,11 @@ allprojects { dependencies { minecraft "com.mojang:minecraft:$Globals.mcVersion" mappings "net.fabricmc:yarn:${Globals.mcVersion}${Globals.yarnVersion}:v2" - modImplementation "net.fabricmc:fabric-loader:0.14.23" + modImplementation "net.fabricmc:fabric-loader:0.15.0" modImplementation include("xyz.nucleoid:packet-tweaker:0.5.0+1.20.2-rc1") - modImplementation "net.fabricmc.fabric-api:fabric-api:0.90.1+1.20.3" + modImplementation "net.fabricmc.fabric-api:fabric-api:0.91.1+1.20.3" } processResources { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 41dfb87..e411586 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists