Skip to content

Commit

Permalink
Fixed packmode bug causing scripts not to load at all in newly create…
Browse files Browse the repository at this point in the history
…d directories
  • Loading branch information
LatvianModder committed Oct 19, 2023
1 parent 04d5fb9 commit e358e6c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common/src/main/java/dev/latvian/mods/kubejs/KubeJS.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public static void loadScripts(ScriptPack pack, Path dir, String path) {
for (var file : Files.walk(dir, 10, FileVisitOption.FOLLOW_LINKS).filter(Files::isRegularFile).toList()) {
var fileName = dir.relativize(file).toString().replace(File.separatorChar, '/');

if (fileName.endsWith(".js")) {
if (fileName.endsWith(".js") || fileName.endsWith(".ts") && !fileName.endsWith(".d.ts")) {
pack.info.scripts.add(new ScriptFileInfo(pack.info, pathPrefix + fileName));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public Throwable preload(ScriptSource source) {
try {
priority = Integer.parseInt(getProperty("priority", "0"));
ignored = getProperty("ignored", "false").equals("true") || getProperty("ignore", "false").equals("true");
packMode = getProperty("packmode", "default");
packMode = getProperty("packmode", "");
requiredMods.addAll(getProperties("requires"));
} catch (Exception ex) {
return ex;
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mod_author=LatvianModder
curseforge_id=238086
modrinth_id=umyGl7zF
minecraft_version=1.19.2
rhino_version=1902.2.2-build.268
rhino_version=1902.2.2-build.280
architectury_version=6.5.82
fabric_loader_version=0.14.20
fabric_api_version=0.76.0+1.19.2
Expand Down

0 comments on commit e358e6c

Please sign in to comment.