Package net.minecraft.data
Class HashCache
java.lang.Object
net.minecraft.data.HashCache
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class(package private) static final record(package private) static final recordstatic interfacestatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Pathprivate final Map<String, HashCache.ProviderCache> private static final Stringprivate final int(package private) static final org.slf4j.Loggerprivate final Map<String, HashCache.ProviderCache> private final Pathprivate final Stringprivate int -
Constructor Summary
ConstructorsConstructorDescriptionHashCache(Path pRootDir, Collection<String> pProviders, WorldVersion pVersion) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyUpdate(HashCache.UpdateResult pUpdateResult) generateUpdate(String pProvider, HashCache.UpdateFunction pUpdateFunction) private PathgetProviderCachePath(String pProvider) voidprivate static HashCache.ProviderCachebooleanshouldRunInThisVersion(String pProvider)
-
Field Details
-
LOGGER
static final org.slf4j.Logger LOGGER -
HEADER_MARKER
- See Also:
-
rootDir
-
cacheDir
-
versionId
-
caches
-
originalCaches
-
cachesToWrite
-
cachePaths
-
initialCount
private final int initialCount -
writes
private int writes
-
-
Constructor Details
-
HashCache
public HashCache(Path pRootDir, Collection<String> pProviders, WorldVersion pVersion) throws IOException - Throws:
IOException
-
-
Method Details
-
getProviderCachePath
-
readCache
-
shouldRunInThisVersion
-
generateUpdate
public CompletableFuture<HashCache.UpdateResult> generateUpdate(String pProvider, HashCache.UpdateFunction pUpdateFunction) -
applyUpdate
-
purgeStaleAndWrite
- Throws:
IOException
-