Skip to content

Commit

Permalink
Update to 1.20.3-rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
Patbox committed Dec 1, 2023
1 parent 90420ae commit 662d803
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -14,14 +15,14 @@
@Mixin(TranslatableTextContent.class)
public abstract class TranslatableTextContentMixin {

@Redirect(
@ModifyExpressionValue(
method = "<clinit>",
at = @At(value = "INVOKE",
target = "Lcom/mojang/serialization/codecs/RecordCodecBuilder;mapCodec(Ljava/util/function/Function;)Lcom/mojang/serialization/MapCodec;"
)
)
private static MapCodec<TranslatableTextContent> stapi$addTranslationFallback(Function<RecordCodecBuilder.Instance<TranslatableTextContent>, ? extends App<RecordCodecBuilder.Mu<TranslatableTextContent>, TranslatableTextContent>> builder) {
return RecordCodecBuilder.mapCodec(builder).xmap(Function.identity(), (content) -> {
private static MapCodec<TranslatableTextContent> stapi$addTranslationFallback(MapCodec<TranslatableTextContent> original) {
return original.xmap(Function.identity(), (content) -> {
if (content.getFallback() == null) {
var target = LocalizationTarget.forPacket();
if (target != null) {
Expand Down
4 changes: 2 additions & 2 deletions api/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 662d803

Please sign in to comment.