Merge pull request #200 from Astrashh/astrash/tesf-anywhere

Remove script sub-directory requirement
This commit is contained in:
dfsek 2021-05-22 15:20:16 -07:00 committed by GitHub
commit 444324e7c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -205,7 +205,7 @@ public class ConfigPack implements LoaderRegistrar {
varScope.create(var.getKey(), var.getValue());
}
loader.open("structures/data", ".tesf").thenEntries(entries -> {
loader.open("", ".tesf").thenEntries(entries -> {
for(Map.Entry<String, InputStream> entry : entries) {
try(InputStream stream = entry.getValue()) {
StructureScript structureScript = new StructureScript(stream, main, getRegistry(StructureScript.class), getRegistry(LootTable.class), (Registry<FunctionBuilder<?>>) (Object) getRegistry(FunctionBuilder.class));