mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 00:37:52 +00:00
24 lines
1.4 KiB
Diff
24 lines
1.4 KiB
Diff
--- a/net/minecraft/data/HashCache.java
|
|
+++ b/net/minecraft/data/HashCache.java
|
|
@@ -92,6 +_,7 @@
|
|
MutableInt mutableint = new MutableInt();
|
|
this.f_236083_.forEach((p_236100_, p_236101_) -> {
|
|
Path path = this.m_236109_(p_236100_);
|
|
+ if (!p_236101_.f_236114_.equals(p_236101_.f_236113_) || !Files.exists(path))//Forge: Only rewrite the cache file if it changed or is missing
|
|
p_236101_.f_236114_.m_236142_(this.f_236079_, path, DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(LocalDateTime.now()) + "\t" + p_236100_.m_6055_());
|
|
mutableint.add(p_236101_.f_236115_);
|
|
});
|
|
@@ -231,10 +_,10 @@
|
|
bufferedwriter.write(p_236145_);
|
|
bufferedwriter.newLine();
|
|
|
|
- for(Map.Entry<Path, HashCode> entry : this.f_236127_.entrySet()) {
|
|
+ for(Map.Entry<Path, HashCode> entry : this.f_236127_.entrySet().stream().sorted(Map.Entry.comparingByKey()).toList()) {
|
|
bufferedwriter.write(entry.getValue().toString());
|
|
bufferedwriter.write(32);
|
|
- bufferedwriter.write(p_236143_.relativize(entry.getKey()).toString());
|
|
+ bufferedwriter.write(p_236143_.relativize(entry.getKey()).toString().replace("\\", "/")); // Forge: Standardize file paths.
|
|
bufferedwriter.newLine();
|
|
}
|
|
} catch (Throwable throwable1) {
|