packDirectory -> rootPath

This commit is contained in:
Astrash
2023-11-25 15:07:45 +11:00
parent 5c7441241c
commit 4ba71e9c27
7 changed files with 20 additions and 20 deletions

View File

@@ -29,7 +29,7 @@ record ImageCache(LoadingCache<String, Image> cache) implements Properties {
if(!pack.getContext().has(ImageCache.class)) {
var cacheBuilder = Caffeine.newBuilder();
if(config.unloadOnTimeout()) cacheBuilder.expireAfterAccess(config.getCacheTimeout(), TimeUnit.SECONDS);
images = new ImageCache(cacheBuilder.build(s -> loadImage(s, pack.getPackDirectory())));
images = new ImageCache(cacheBuilder.build(s -> loadImage(s, pack.getRootPath())));
pack.getContext().put(images);
} else images = pack.getContext().get(ImageCache.class);