Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-24 18:10:08 +01:00
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).
Dieser Commit ist enthalten in:
Ursprung
efb7650d6f
Commit
6f7927bc5a
@ -1307,14 +1307,16 @@ public class EditSession implements Extent, AutoCloseable {
|
||||
checkNotNull(origin);
|
||||
checkArgument(radius >= 0, "radius >= 0 required");
|
||||
|
||||
Mask waterloggedMask = null;
|
||||
if (waterlogged) {
|
||||
Map<String, String> stateMap = new HashMap<>();
|
||||
stateMap.put("waterlogged", "true");
|
||||
waterloggedMask = new BlockStateMask(this, stateMap, true);
|
||||
}
|
||||
MaskIntersection mask = new MaskIntersection(
|
||||
new BoundedHeightMask(0, getWorld().getMaxY()),
|
||||
new RegionMask(new EllipsoidRegion(null, origin, Vector3.at(radius, radius, radius))),
|
||||
waterlogged ? new MaskUnion(
|
||||
getWorld().createLiquidMask(),
|
||||
new BlockStateMask(this, new HashMap<String, String>() {{
|
||||
put("waterlogged", "true");
|
||||
}}, true))
|
||||
waterlogged ? new MaskUnion(getWorld().createLiquidMask(), waterloggedMask)
|
||||
: getWorld().createLiquidMask());
|
||||
|
||||
BlockReplace replace;
|
||||
|
@ -133,7 +133,9 @@ public class SnapshotUtilCommands {
|
||||
|
||||
if (restore.hadTotalFailure()) {
|
||||
String error = restore.getLastErrorMessage();
|
||||
if (error != null) {
|
||||
if (!restore.getMissingChunks().isEmpty()) {
|
||||
player.printError("Chunks were not present in snapshot.");
|
||||
} else if (error != null) {
|
||||
player.printError("Errors prevented any blocks from being restored.");
|
||||
player.printError("Last error: " + error);
|
||||
} else {
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren