1
0
mirror of https://github.com/cabaletta/baritone synced 2024-12-22 23:13:20 +00:00

fix nullpointerexception in cachedworld

This commit is contained in:
Leijurv 2018-10-07 16:57:04 -07:00
parent d1e62ef8f2
commit 65ce5ca752
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -142,7 +142,11 @@ public final class CachedWorld implements ICachedWorld, Helper {
public final void save() { public final void save() {
if (!Baritone.settings().chunkCaching.get()) { if (!Baritone.settings().chunkCaching.get()) {
System.out.println("Not saving to disk; chunk caching is disabled."); System.out.println("Not saving to disk; chunk caching is disabled.");
allRegions().forEach(CachedRegion::removeExpired); // even if we aren't saving to disk, still delete expired old chunks from RAM allRegions().forEach(region -> {
if (region != null) {
region.removeExpired();
}
}); // even if we aren't saving to disk, still delete expired old chunks from RAM
return; return;
} }
long start = System.nanoTime() / 1000000L; long start = System.nanoTime() / 1000000L;