mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2025-02-17 21:11:26 +01:00
Fix rollback
inspect + y-value byte overflow
This commit is contained in:
parent
5baa99ec80
commit
ce140a95c7
@ -111,8 +111,7 @@ public class MainUtil {
|
||||
}
|
||||
}
|
||||
|
||||
public static long traverse(Path path, final RunnableVal2<Path, BasicFileAttributes> onEach) {
|
||||
final AtomicLong size = new AtomicLong(0);
|
||||
public static void traverse(Path path, final RunnableVal2<Path, BasicFileAttributes> onEach) {
|
||||
try {
|
||||
Files.walkFileTree(path, new SimpleFileVisitor<Path>() {
|
||||
@Override public FileVisitResult
|
||||
@ -133,7 +132,6 @@ public class MainUtil {
|
||||
catch (IOException e) {
|
||||
throw new AssertionError ("walkFileTree will not throw IOException if the FileVisitor does not");
|
||||
}
|
||||
return size.get();
|
||||
}
|
||||
|
||||
public static File getFile(File base, String path) {
|
||||
|
@ -139,7 +139,9 @@ public class HistoryCommands {
|
||||
World world = player.getWorld();
|
||||
WorldVector origin = player.getPosition();
|
||||
Vector bot = origin.subtract(radius, radius, radius);
|
||||
bot.setY(Math.max(0, bot.getY()));
|
||||
Vector top = origin.add(radius, radius, radius);
|
||||
top.setY(Math.min(255, top.getY()));
|
||||
RollbackDatabase database = DBHandler.IMP.getDatabase(world);
|
||||
final AtomicInteger count = new AtomicInteger();
|
||||
database.getPotentialEdits(other, System.currentTimeMillis() - timeDiff, bot, top, new RunnableVal<DiskStorageHistory>() {
|
||||
|
@ -52,7 +52,7 @@ public class ToolCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = { "/inspect", "/i" },
|
||||
aliases = { "inspect", "i" },
|
||||
usage = "",
|
||||
desc = "Inspect edits within a radius",
|
||||
help =
|
||||
|
Loading…
Reference in New Issue
Block a user