From 7cf008bb62046fba32fa1d0f6d6ece4bf0b003a0 Mon Sep 17 00:00:00 2001 From: EnZaXD <60033407+FlorianMichael@users.noreply.github.com> Date: Tue, 24 Oct 2023 01:56:29 +0200 Subject: [PATCH] Delete unused config option and add missing documentation (#3500) --- .../api/configuration/ViaVersionConfig.java | 12 ++++++++++-- .../viaversion/configuration/AbstractViaConfig.java | 7 ------- .../src/main/resources/assets/viaversion/config.yml | 8 -------- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/api/src/main/java/com/viaversion/viaversion/api/configuration/ViaVersionConfig.java b/api/src/main/java/com/viaversion/viaversion/api/configuration/ViaVersionConfig.java index 9f9293115..0b9d60c7e 100644 --- a/api/src/main/java/com/viaversion/viaversion/api/configuration/ViaVersionConfig.java +++ b/api/src/main/java/com/viaversion/viaversion/api/configuration/ViaVersionConfig.java @@ -450,9 +450,17 @@ public interface ViaVersionConfig extends Config { */ WorldIdentifiers get1_16WorldNamesMap(); + /** + * Caches light until chunks are unloaded to allow subsequent chunk update packets as opposed to instantly uncaching when the first chunk data is sent. + * + * @return true if enabled + */ boolean cache1_17Light(); - @Nullable String chatTypeFormat(String translationKey); - + /** + * Force-update 1.19.4+ player's inventory when they try to swap armor in a pre-occupied slot. + * + * @return true if enabled + */ boolean isArmorToggleFix(); } diff --git a/common/src/main/java/com/viaversion/viaversion/configuration/AbstractViaConfig.java b/common/src/main/java/com/viaversion/viaversion/configuration/AbstractViaConfig.java index b6fa90c14..1b7f7a384 100644 --- a/common/src/main/java/com/viaversion/viaversion/configuration/AbstractViaConfig.java +++ b/common/src/main/java/com/viaversion/viaversion/configuration/AbstractViaConfig.java @@ -89,7 +89,6 @@ public abstract class AbstractViaConfig extends Config implements ViaVersionConf private JsonElement resourcePack1_17PromptMessage; private WorldIdentifiers map1_16WorldNames; private boolean cache1_17Light; - private Map chatTypeFormats; protected AbstractViaConfig(final File configFile) { super(configFile); @@ -158,7 +157,6 @@ public abstract class AbstractViaConfig extends Config implements ViaVersionConf worlds.getOrDefault("nether", WorldIdentifiers.NETHER_DEFAULT), worlds.getOrDefault("end", WorldIdentifiers.END_DEFAULT)); cache1_17Light = getBoolean("cache-1_17-light", true); - chatTypeFormats = get("chat-types-1_19", Map.class, new HashMap()); } private BlockedProtocolVersions loadBlockedProtocolVersions() { @@ -528,11 +526,6 @@ public abstract class AbstractViaConfig extends Config implements ViaVersionConf return cache1_17Light; } - @Override - public @Nullable String chatTypeFormat(final String translationKey) { - return chatTypeFormats.get(translationKey); - } - @Override public boolean isArmorToggleFix() { return false; diff --git a/common/src/main/resources/assets/viaversion/config.yml b/common/src/main/resources/assets/viaversion/config.yml index 9e2f599a4..1335fc102 100644 --- a/common/src/main/resources/assets/viaversion/config.yml +++ b/common/src/main/resources/assets/viaversion/config.yml @@ -167,14 +167,6 @@ resource-pack-1_17-prompt: '' # Only disable this if you know what you are doing. cache-1_17-light: true # -# 1.19 chat type formats used for 1.19.1+ clients. -chat-types-1_19: - chat.type.text: "<%s> %s" - chat.type.announcement: "[%s] %s" - commands.message.display.incoming: "%s whispers to you: %s" - chat.type.team.text: "%s <%s> %s" - chat.type.emote: "* %s %s" -# # Force-update 1.19.4+ player's inventory when they try to swap armor in a pre-occupied slot. armor-toggle-fix: true #