diff --git a/README.md b/README.md index f27d4d7d2..87256b95e 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ The code you contribute will be open-sourced under the GPLv3 license. If you pre ### 🌍 Translations 1. Clone this repository. 2. Create a new language file in: `/common-files/src/main/resources/translations` -3. Once done, submit a **pull request** for review. We appreciate your contributions! +3. Once done, submit a **pull request** to **dev** branch for review. We appreciate your contributions! ## Differences Between Versions | Version | Official Support | Max Players | Dev Builds | @@ -76,7 +76,7 @@ repositories { ``` ```kotlin dependencies { - compileOnly("net.momirealms:craft-engine-core:0.0.56") - compileOnly("net.momirealms:craft-engine-bukkit:0.0.56") + compileOnly("net.momirealms:craft-engine-core:0.0.57") + compileOnly("net.momirealms:craft-engine-bukkit:0.0.57") } ``` \ No newline at end of file diff --git a/common-files/src/main/resources/config.yml b/common-files/src/main/resources/config.yml index ff32139d4..da3f8d719 100644 --- a/common-files/src/main/resources/config.yml +++ b/common-files/src/main/resources/config.yml @@ -52,8 +52,7 @@ resource-pack: - "@vanilla_textures" bypass-models: - "@vanilla_models" - bypass-sounds: - - "@vanilla_sounds" + bypass-sounds: [] bypass-equipments: [] # Validate if there are any errors in the resource pack, such as missing textures or models validate: diff --git a/core/src/main/java/net/momirealms/craftengine/core/util/MiscUtils.java b/core/src/main/java/net/momirealms/craftengine/core/util/MiscUtils.java index 3cafd6416..1aeb6d3f9 100644 --- a/core/src/main/java/net/momirealms/craftengine/core/util/MiscUtils.java +++ b/core/src/main/java/net/momirealms/craftengine/core/util/MiscUtils.java @@ -104,22 +104,27 @@ public class MiscUtils { public static void deepMergeMaps(Map baseMap, Map mapToMerge) { for (Map.Entry entry : mapToMerge.entrySet()) { String key = entry.getKey(); - Object value = entry.getValue(); - if (baseMap.containsKey(key)) { - Object existingValue = baseMap.get(key); - if (existingValue instanceof Map && value instanceof Map) { - Map existingMap = (Map) existingValue; - Map newMap = (Map) value; - deepMergeMaps(existingMap, newMap); - } else if (existingValue instanceof List && value instanceof List) { - List existingList = (List) existingValue; - List newList = (List) value; - existingList.addAll(newList); + if (!key.isEmpty() && key.charAt(0) == '$') { + Object value = entry.getValue(); + baseMap.put(key.substring(1), value); + } else { + Object value = entry.getValue(); + if (baseMap.containsKey(key)) { + Object existingValue = baseMap.get(key); + if (existingValue instanceof Map && value instanceof Map) { + Map existingMap = (Map) existingValue; + Map newMap = (Map) value; + deepMergeMaps(existingMap, newMap); + } else if (existingValue instanceof List && value instanceof List) { + List existingList = (List) existingValue; + List newList = (List) value; + existingList.addAll(newList); + } else { + baseMap.put(key, value); + } } else { baseMap.put(key, value); } - } else { - baseMap.put(key, value); } } }