Skip to content

Commit

Permalink
Update to 1.21.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Patbox committed Oct 20, 2024
1 parent 3737590 commit 5e328f4
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}

- name: Upload GitHub release
uses: AButler/upload-release-assets@v2.0
uses: AButler/upload-release-assets@v3.0
with:
files: 'build/libs/*.jar;!build/libs/*-sources.jar;!build/libs/*-dev.jar'
repo-token: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ private int getTranslationKeyCount() {
}

@Override
public CompletableFuture<Void> reload(Synchronizer synchronizer, ResourceManager manager, Profiler prepareProfiler, Profiler applyProfiler, Executor prepareExecutor, Executor applyExecutor) {
public CompletableFuture<Void> reload(Synchronizer synchronizer, ResourceManager manager, Executor prepareExecutor, Executor applyExecutor) {
CompletableFuture<Multimap<String, Supplier<TranslationMap>>> future = CompletableFuture.supplyAsync(() -> {
this.reload();
return LanguageReader.collectDataPackTranslations(manager);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class LanguageMixin {
}

@Environment(EnvType.SERVER)
@ModifyVariable(method = "setInstance", at = @At("HEAD"))
@ModifyVariable(method = "setInstance", at = @At("HEAD"), argsOnly = true)
private static Language stapi$modifyLanguage(Language language) {
return new SystemDelegatedLanguage(language);
}
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.20.3-",
"fabricloader": ">=0.15.0",
"minecraft": ">=1.21.2-",
"fabricloader": ">=0.16.0",
"fabric-resource-loader-v0": "*"
},
"mixins": [
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/resources/server_translations_api.mixin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"required": true,
"minVersion": "0.8",
"package": "xyz.nucleoid.server.translations.mixin",
"compatibilityLevel": "JAVA_17",
"compatibilityLevel": "JAVA_21",
"mixins": [
"LanguageMixin",
"ServerPlayerEntityMixin",
Expand Down
18 changes: 9 additions & 9 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.6.+' apply false
id 'fabric-loom' version '1.7.+' apply false
id 'com.matthewprenger.cursegradle' version "1.4.0"
}

class Globals {
static def baseVersion = "2.3.1"
static def mcVersion = "1.21-pre2"
static def baseVersion = "2.4.0"
static def mcVersion = "1.21.2-rc1"
static def yarnVersion = "+build.1"
}

Expand All @@ -19,8 +19,8 @@ allprojects {
apply plugin: 'fabric-loom'

version = Globals.baseVersion + "+" + Globals.mcVersion
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21

group = "xyz.nucleoid"

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.15.7"
modImplementation "net.fabricmc:fabric-loader:0.16.7"

modImplementation include("xyz.nucleoid:packet-tweaker:0.5.1+24w03b")
modImplementation include("xyz.nucleoid:packet-tweaker:0.6.0-pre.1+1.21.2-pre3")

modImplementation "net.fabricmc.fabric-api:fabric-api:0.97.3+1.20.5"
modImplementation "net.fabricmc.fabric-api:fabric-api:0.106.0+1.21.2"
}

processResources {
Expand All @@ -70,7 +70,7 @@ allprojects {
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
options.release.set(17)
options.release.set(21)
}

java {
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-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
package fr.catcore.server.translations.mixin;

import net.minecraft.recipe.RecipeManager;
import net.minecraft.recipe.ServerRecipeManager;
import net.minecraft.text.Text;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.ModifyArg;

@Mixin(RecipeManager.class)
@Mixin(ServerRecipeManager.class)
public class MixinRecipeManager {

@ModifyArg(method = "apply(Ljava/util/Map;Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/util/profiler/Profiler;)V", at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;info(Ljava/lang/String;Ljava/lang/Object;)V", ordinal = 0, remap = false), index = 0)
@ModifyArg(method = "apply(Lnet/minecraft/recipe/PreparedRecipes;Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/util/profiler/Profiler;)V", at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;info(Ljava/lang/String;Ljava/lang/Object;)V", ordinal = 0, remap = false), index = 0)
private String translated_loaded(String string, Object p0) {
return Text.translatable("text.translated_server.loaded.recipe", p0).getString();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/server_translations.mixin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"required": true,
"minVersion": "0.8",
"package": "fr.catcore.server.translations.mixin",
"compatibilityLevel": "JAVA_16",
"compatibilityLevel": "JAVA_21",
"mixins": [
"MixinMinecraftDedicatedServer",
"MixinMinecraftServer",
Expand Down

0 comments on commit 5e328f4

Please sign in to comment.