Skip to content

Commit

Permalink
CHANGED: remove datagen artifacts, if they are empty
Browse files Browse the repository at this point in the history
  • Loading branch information
WinPlay02 committed Nov 14, 2023
1 parent 6df16c2 commit acf8217
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ meta, put the JSON files of these versions (e.g. 1_16_combat-0.json) into the
"extra-versions" directory
```

## Performance
- Windows filesystem implementation degrades performance very much (especially the commit step is affected by this)
- Windows defender will also intercept every file I/O, which causes additional slowdown

## Version Manifest Source
- The manifest provider source is changeable, `ManifestProvider` needs to be extended.
- By default, the version manifest information is fetched from [Mojang](https://piston-meta.mojang.com/mc/game/version_manifest_v2.json)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,13 @@ public StepResult run(PipelineCache pipelineCache, OrderedVersion mcVersion, Map
}
Path artifactsRootPath = pipelineCache.getForKey(Step.STEP_FETCH_ARTIFACTS);
Path artifactSnbtArchive = getDatagenSNBTArchive(artifactsRootPath);
if (Files.exists(artifactSnbtArchive) && Files.size(artifactSnbtArchive) <= 22 /* empty jar */) {
Files.delete(artifactSnbtArchive);
}
Path artifactReportsArchive = getDatagenReportsArchive(artifactsRootPath);
if (Files.exists(artifactReportsArchive) && Files.size(artifactReportsArchive) <= 22 /* empty jar */) {
Files.delete(artifactReportsArchive);
}
if ((!GitCraft.config.readableNbt || Files.exists(artifactSnbtArchive)) &&
(!GitCraft.config.loadDatagenRegistry || Files.exists(artifactReportsArchive))) {
return StepResult.UP_TO_DATE;
Expand Down

0 comments on commit acf8217

Please sign in to comment.