From 331a3287714956df9b03bc836e0138acd0e0f867 Mon Sep 17 00:00:00 2001 From: Luck Date: Mon, 2 Oct 2023 19:28:19 +0100 Subject: [PATCH] Upgrade Fabric to MC 1.20.2 --- fabric/build.gradle | 8 ++++---- .../luckperms/fabric/FabricSenderFactory.java | 3 ++- .../listeners/FabricConnectionListener.java | 2 +- .../fabric/mixin/ServerPlayerEntityMixin.java | 19 ------------------- .../luckperms/fabric/model/MixinUser.java | 2 -- gradle/libs.versions.toml | 2 +- 6 files changed, 8 insertions(+), 28 deletions(-) diff --git a/fabric/build.gradle b/fabric/build.gradle index 36e7c5f60..9503c2d9f 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -13,9 +13,9 @@ repositories { dependencies { // https://modmuss50.me/fabric.html - minecraft 'com.mojang:minecraft:1.20.1' - mappings 'net.fabricmc:yarn:1.20.1+build.2:v2' - modImplementation 'net.fabricmc:fabric-loader:0.14.21' + minecraft 'com.mojang:minecraft:1.20.2' + mappings 'net.fabricmc:yarn:1.20.2+build.2:v2' + modImplementation 'net.fabricmc:fabric-loader:0.14.22' Set apiModules = [ 'fabric-api-base', @@ -25,7 +25,7 @@ dependencies { ] apiModules.forEach { - modImplementation(fabricApi.module(it, '0.83.1+1.20.1')) + modImplementation(fabricApi.module(it, '0.89.3+1.20.2')) } include(modImplementation('me.lucko:fabric-permissions-api:0.2-SNAPSHOT')) diff --git a/fabric/src/main/java/me/lucko/luckperms/fabric/FabricSenderFactory.java b/fabric/src/main/java/me/lucko/luckperms/fabric/FabricSenderFactory.java index 57538da83..6f0884516 100644 --- a/fabric/src/main/java/me/lucko/luckperms/fabric/FabricSenderFactory.java +++ b/fabric/src/main/java/me/lucko/luckperms/fabric/FabricSenderFactory.java @@ -77,7 +77,8 @@ public class FabricSenderFactory extends SenderFactory luckperms$queryOptions; - // Cache player locale - private Locale luckperms$locale; - // Used by PlayerChangeWorldCallback hook below. @Shadow public abstract ServerWorld getServerWorld(); @@ -89,11 +82,6 @@ public abstract class ServerPlayerEntityMixin implements MixinUser { return this.luckperms$queryOptions; } - @Override - public Locale getCachedLocale() { - return this.luckperms$locale; - } - @Override public void initializePermissions(User user) { this.luckperms$user = user; @@ -172,13 +160,6 @@ public abstract class ServerPlayerEntityMixin implements MixinUser { this.luckperms$user = oldMixin.getLuckPermsUser(); this.luckperms$queryOptions = oldMixin.getQueryOptionsCache(); this.luckperms$queryOptions.invalidate(); - this.luckperms$locale = oldMixin.getCachedLocale(); - } - - @Inject(at = @At("HEAD"), method = "setClientSettings") - private void luckperms_setClientSettings(ClientSettingsC2SPacket information, CallbackInfo ci) { - String language = information.language(); - this.luckperms$locale = TranslationManager.parseLocale(language); } @Inject(at = @At("TAIL"), method = "worldChanged") diff --git a/fabric/src/main/java/me/lucko/luckperms/fabric/model/MixinUser.java b/fabric/src/main/java/me/lucko/luckperms/fabric/model/MixinUser.java index 291ebfb55..37b309b2b 100644 --- a/fabric/src/main/java/me/lucko/luckperms/fabric/model/MixinUser.java +++ b/fabric/src/main/java/me/lucko/luckperms/fabric/model/MixinUser.java @@ -52,8 +52,6 @@ public interface MixinUser { */ QueryOptionsCache getQueryOptionsCache(FabricContextManager contextManager); - Locale getCachedLocale(); - /** * Initialises permissions for this player using the given {@link User}. * diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 097413772..ed5029514 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,7 +2,7 @@ shadow = "8.1.1" blossom = "1.3.1" forgegradle = "[6.0,6.2)" -loom = "1.2-SNAPSHOT" +loom = "1.3-SNAPSHOT" licenser = "0.6.1" [plugins]