From 299bf0dae8c4093b1416b3d75b38a4bfa23746cd Mon Sep 17 00:00:00 2001 From: dfsek Date: Tue, 20 Jul 2021 21:05:01 -0700 Subject: [PATCH] Only sort configs with type key --- .../java/com/dfsek/terra/config/pack/ConfigPackImpl.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/common/implementation/src/main/java/com/dfsek/terra/config/pack/ConfigPackImpl.java b/common/implementation/src/main/java/com/dfsek/terra/config/pack/ConfigPackImpl.java index 39a28eeef..dba98e565 100644 --- a/common/implementation/src/main/java/com/dfsek/terra/config/pack/ConfigPackImpl.java +++ b/common/implementation/src/main/java/com/dfsek/terra/config/pack/ConfigPackImpl.java @@ -246,9 +246,11 @@ public class ConfigPackImpl implements ConfigPack { Map, List> configs = new HashMap<>(); for(Configuration configuration : configurations.values()) { // Sort the configs - ProtoConfig config = new ProtoConfig(); - selfLoader.load(config, configuration); - configs.computeIfAbsent(config.getType(), configType -> new ArrayList<>()).add(configuration); + if(configuration.contains("type")) { // Only sort configs with type key + ProtoConfig config = new ProtoConfig(); + selfLoader.load(config, configuration); + configs.computeIfAbsent(config.getType(), configType -> new ArrayList<>()).add(configuration); + } } for(ConfigType configType : configTypeRegistry.entries()) { // Load the configs