From 7a55e028af31b96f83762fd3c3a9b24d07266474 Mon Sep 17 00:00:00 2001 From: "Josiah (Gaming32) Glosson" Date: Tue, 5 Dec 2023 19:41:42 -0600 Subject: [PATCH] Try a few 1.20.3 fixes --- .../io/github/gaming32/worldhost/WorldHostComponents.java | 2 +- .../io/github/gaming32/worldhost/versions/Components.java | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/io/github/gaming32/worldhost/WorldHostComponents.java b/src/main/java/io/github/gaming32/worldhost/WorldHostComponents.java index 8aa2780..1d4069b 100644 --- a/src/main/java/io/github/gaming32/worldhost/WorldHostComponents.java +++ b/src/main/java/io/github/gaming32/worldhost/WorldHostComponents.java @@ -6,5 +6,5 @@ public class WorldHostComponents { public static final Component FRIENDS = Components.translatable("world-host.friends"); public static final Component SERVERS = Components.translatable("world-host.servers"); - public static final Component PLAY_TEXT = Component.translatable("world-host.play_world"); + public static final Component PLAY_TEXT = Components.translatable("world-host.play_world"); } diff --git a/src/main/java/io/github/gaming32/worldhost/versions/Components.java b/src/main/java/io/github/gaming32/worldhost/versions/Components.java index fa5a054..33c2b4b 100644 --- a/src/main/java/io/github/gaming32/worldhost/versions/Components.java +++ b/src/main/java/io/github/gaming32/worldhost/versions/Components.java @@ -32,8 +32,10 @@ public static MutableComponent translatable(@Translatable(foldMethod = true) Str } public static MutableComponent translatable(@Translatable(foldMethod = true) String key, Object... args) { - //#if MC >= 1.19.1 - return Component.translatable(key, args); + //#if MC >= 1.20.3 + return Component.translatableEscape(key, args); + //#elseif MC >= 1.19.1 + //$$return Component.translatable(key, args); //#else //$$ return new TranslatableComponent(key, args); //#endif