Package net.minecraft.data
Class HashCache
java.lang.Object
net.minecraft.data.HashCache
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) class
(package private) static final record
(package private) static final record
static interface
static final record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Path
private final Map
<String, HashCache.ProviderCache> private static final String
private final int
(package private) static final org.slf4j.Logger
private final Map
<String, HashCache.ProviderCache> private final Path
private final String
private int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyUpdate
(HashCache.UpdateResult updateResult) generateUpdate
(String provider, HashCache.UpdateFunction updateFunction) private Path
getProviderCachePath
(String provider) void
private static HashCache.ProviderCache
boolean
shouldRunInThisVersion
(String provider)
-
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 rootDir, Collection<String> providers, WorldVersion version) throws IOException - Throws:
IOException
-
-
Method Details
-
getProviderCachePath
-
readCache
-
shouldRunInThisVersion
-
generateUpdate
public CompletableFuture<HashCache.UpdateResult> generateUpdate(String provider, HashCache.UpdateFunction updateFunction) -
applyUpdate
-
purgeStaleAndWrite
- Throws:
IOException
-