This commit is contained in:
Leijurv 2018-08-21 12:22:45 -07:00
parent 800078a75c
commit 5bc8adc777
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -107,6 +107,7 @@ public final class CachedRegion implements ICachedChunkAccess {
if (!Files.exists(path)) if (!Files.exists(path))
Files.createDirectories(path); Files.createDirectories(path);
System.out.println("Saving region " + x + "," + z + " to disk");
Path regionFile = getRegionFile(path, this.x, this.z); Path regionFile = getRegionFile(path, this.x, this.z);
if (!Files.exists(regionFile)) if (!Files.exists(regionFile))
Files.createFile(regionFile); Files.createFile(regionFile);
@ -139,6 +140,8 @@ public final class CachedRegion implements ICachedChunkAccess {
if (!Files.exists(regionFile)) if (!Files.exists(regionFile))
return; return;
System.out.println("Loading region " + x + "," + z + " from disk");
byte[] decompressed; byte[] decompressed;
try (FileInputStream in = new FileInputStream(regionFile.toFile())) { try (FileInputStream in = new FileInputStream(regionFile.toFile())) {
decompressed = GZIPUtils.decompress(in); decompressed = GZIPUtils.decompress(in);