From baad4dc85b2aff212f6f9d8a086eefae8bc26ce1 Mon Sep 17 00:00:00 2001 From: Des Herriott Date: Thu, 31 Oct 2024 15:15:54 +0000 Subject: [PATCH] fix: no canEdit() check needed in SyncTranslationMessageToClient This is coming from server, just accept the translation update! --- .../ftb/mods/ftbquests/net/SyncTranslationMessageToClient.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/src/main/java/dev/ftb/mods/ftbquests/net/SyncTranslationMessageToClient.java b/common/src/main/java/dev/ftb/mods/ftbquests/net/SyncTranslationMessageToClient.java index afbe3f55..0babb84c 100644 --- a/common/src/main/java/dev/ftb/mods/ftbquests/net/SyncTranslationMessageToClient.java +++ b/common/src/main/java/dev/ftb/mods/ftbquests/net/SyncTranslationMessageToClient.java @@ -7,7 +7,6 @@ import dev.ftb.mods.ftbquests.client.ClientQuestFile; import dev.ftb.mods.ftbquests.quest.QuestObjectBase; import dev.ftb.mods.ftbquests.quest.translation.TranslationKey; -import dev.ftb.mods.ftbquests.util.NetUtils; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.codec.ByteBufCodecs; import net.minecraft.network.codec.StreamCodec; @@ -52,7 +51,7 @@ public Type type() { public static void handle(SyncTranslationMessageToClient message, NetworkManager.PacketContext context) { context.queue(() -> { ClientQuestFile file = ClientQuestFile.INSTANCE; - if (file.isValid() && NetUtils.canEdit(context)) { + if (file.isValid()) { QuestObjectBase object = file.getBase(message.id); if (object != null) { message.val.ifLeft(str -> file.getTranslationManager().addTranslation(object, message.locale, message.subKey, str))