Class HashCache
java.lang.Object
net.minecraft.data.HashCache
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static final recordprivate static final recordstatic interfacestatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Pathprivate final Map<String, HashCache.ProviderCache> private static final Stringprivate final intprivate static final org.slf4j.Loggerprivate final Map<String, HashCache.ProviderCache> private final Pathprivate final Stringprivate int -
Constructor Summary
ConstructorsConstructorDescriptionHashCache(Path rootDir, Collection<String> providerIds, WorldVersion version) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyUpdate(HashCache.UpdateResult result) generateUpdate(String providerId, HashCache.UpdateFunction function) private PathgetProviderCachePath(String provider) voidprivate static HashCache.ProviderCachebooleanshouldRunInThisVersion(String providerId)
-
Field Details
-
LOGGER
private 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> providerIds, WorldVersion version) throws IOException - Throws:
IOException
-
-
Method Details
-
getProviderCachePath
-
readCache
-
shouldRunInThisVersion
-
generateUpdate
public CompletableFuture<HashCache.UpdateResult> generateUpdate(String providerId, HashCache.UpdateFunction function) -
applyUpdate
-
purgeStaleAndWrite
- Throws:
IOException
-