mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-03-30 05:05:20 -05:00
Add the Minecraft version as a cache input to the download assets task.
This fixes an issue where the assets index would not be generated when the minecraft version changes without the assets changing.
This commit is contained in:
@@ -55,6 +55,9 @@ public abstract class DownloadAssetsTask extends AbstractLoomTask {
|
||||
@Input
|
||||
public abstract Property<Integer> getDownloadThreads();
|
||||
|
||||
@Input
|
||||
public abstract Property<String> getMinecraftVersion();
|
||||
|
||||
@OutputDirectory
|
||||
public abstract RegularFileProperty getAssetsDirectory();
|
||||
|
||||
@@ -69,6 +72,8 @@ public abstract class DownloadAssetsTask extends AbstractLoomTask {
|
||||
getAssetsDirectory().set(assetsDir);
|
||||
getAssetsHash().set(versionInfo.assetIndex().sha1());
|
||||
getDownloadThreads().convention(Runtime.getRuntime().availableProcessors());
|
||||
getMinecraftVersion().set(versionInfo.id());
|
||||
getMinecraftVersion().finalizeValue();
|
||||
|
||||
if (versionInfo.assets().equals("legacy")) {
|
||||
getLegacyResourcesDirectory().set(new File(assetsDir, "/legacy/" + versionInfo.id()));
|
||||
|
||||
Reference in New Issue
Block a user