Skip to content

Commit effee06

Browse files
committed
HashStore#addKnown for known hashes of keys
1 parent 2225f0f commit effee06

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

hash-utils/src/main/java/net/minecraftforge/util/hash/HashStore.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ public boolean exists() {
110110
return this.target != null && this.target.exists();
111111
}
112112

113+
public HashStore addKnown(String key, String data) {
114+
if (!data.isEmpty())
115+
newHashes.put(Objects.requireNonNull(key), data);
116+
return this;
117+
}
118+
113119
public HashStore add(String key, String data) {
114120
if (!data.isEmpty())
115121
newHashes.put(Objects.requireNonNull(key), HASH.hash(data));

0 commit comments

Comments
 (0)