Skip poi folders for snapshot restores.

New to 1.14, Mojang stores .mca files which don't contain chunks in the
poi folder.

Note: we explicitly filter *out* the poi folder, instead of filtering
*to* the regions folder, since old versions of minecraft had regions
directly in the world folder (instead of a regions subfolder).
This commit is contained in:
wizjany
2019-06-12 21:51:22 -04:00
parent efb7650d6f
commit 6f7927bc5a
4 changed files with 12 additions and 6 deletions

View File

@ -101,6 +101,7 @@ public class TrueZipMcRegionChunkStore extends McRegionChunkStore {
// Check for file
if (pattern.matcher(testEntry.getName()).matches()) {
folder = testEntry.getName().substring(0, testEntry.getName().lastIndexOf('/'));
if (folder.endsWith("poi")) continue;
name = folder + "/" + name;
break;
}

View File

@ -87,6 +87,7 @@ public class ZippedMcRegionChunkStore extends McRegionChunkStore {
if (testEntry.getName().startsWith(worldName + "/")) {
if (pattern.matcher(testEntry.getName()).matches()) { // does entry end in .mca
folder = testEntry.getName().substring(0, testEntry.getName().lastIndexOf('/'));
if (folder.endsWith("poi")) continue;
name = folder + "/" + name;
break;
}