mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-09 17:26:07 +00:00
Fix minor loading issue
This commit is contained in:
@@ -114,9 +114,7 @@ public class ConfigPack {
|
||||
throw new FileMissingException("No pack.yml file found in " + folder.getAbsolutePath(), e);
|
||||
}
|
||||
|
||||
load(new FolderLoader(folder.toPath()));
|
||||
|
||||
LangUtil.log("config-pack.loaded", Level.INFO, template.getID(), String.valueOf((System.nanoTime() - l) / 1000000D), template.getAuthor(), template.getVersion());
|
||||
load(new FolderLoader(folder.toPath()), l);
|
||||
}
|
||||
|
||||
public ConfigPack(ZipFile file) throws ConfigException {
|
||||
@@ -137,11 +135,10 @@ public class ConfigPack {
|
||||
|
||||
selfLoader.load(template, stream);
|
||||
|
||||
load(new ZIPLoader(file));
|
||||
LangUtil.log("config-pack.loaded", Level.INFO, template.getID(), String.valueOf((System.nanoTime() - l) / 1000000D));
|
||||
load(new ZIPLoader(file), l);
|
||||
}
|
||||
|
||||
private void load(Loader loader) throws ConfigException {
|
||||
private void load(Loader loader, long start) throws ConfigException {
|
||||
for(Map.Entry<String, Double> var : template.getVariables().entrySet()) {
|
||||
varScope.create(var.getKey()).setValue(var.getValue());
|
||||
}
|
||||
@@ -164,6 +161,8 @@ public class ConfigPack {
|
||||
}
|
||||
}
|
||||
template.getStructureLocatables().forEach((type, name) -> structureMap.put(Objects.requireNonNull(type), Objects.requireNonNull(structureRegistry.get(name))));
|
||||
|
||||
LangUtil.log("config-pack.loaded", Level.INFO, template.getID(), String.valueOf((System.nanoTime() - start) / 1000000D), template.getAuthor(), template.getVersion());
|
||||
}
|
||||
|
||||
private <C extends AbstractableTemplate, O> void buildAll(TerraFactory<C, O> factory, TerraRegistry<O> registry, List<C> configTemplates) throws LoadException {
|
||||
|
||||
Reference in New Issue
Block a user