mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-10-08 03:47:56 +02: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) {
|
public static void traverse(Path path, final RunnableVal2<Path, BasicFileAttributes> onEach) {
|
||||||
final AtomicLong size = new AtomicLong(0);
|
|
||||||
try {
|
try {
|
||||||
Files.walkFileTree(path, new SimpleFileVisitor<Path>() {
|
Files.walkFileTree(path, new SimpleFileVisitor<Path>() {
|
||||||
@Override public FileVisitResult
|
@Override public FileVisitResult
|
||||||
@ -133,7 +132,6 @@ public class MainUtil {
|
|||||||
catch (IOException e) {
|
catch (IOException e) {
|
||||||
throw new AssertionError ("walkFileTree will not throw IOException if the FileVisitor does not");
|
throw new AssertionError ("walkFileTree will not throw IOException if the FileVisitor does not");
|
||||||
}
|
}
|
||||||
return size.get();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static File getFile(File base, String path) {
|
public static File getFile(File base, String path) {
|
||||||
|
@ -139,7 +139,9 @@ public class HistoryCommands {
|
|||||||
World world = player.getWorld();
|
World world = player.getWorld();
|
||||||
WorldVector origin = player.getPosition();
|
WorldVector origin = player.getPosition();
|
||||||
Vector bot = origin.subtract(radius, radius, radius);
|
Vector bot = origin.subtract(radius, radius, radius);
|
||||||
|
bot.setY(Math.max(0, bot.getY()));
|
||||||
Vector top = origin.add(radius, radius, radius);
|
Vector top = origin.add(radius, radius, radius);
|
||||||
|
top.setY(Math.min(255, top.getY()));
|
||||||
RollbackDatabase database = DBHandler.IMP.getDatabase(world);
|
RollbackDatabase database = DBHandler.IMP.getDatabase(world);
|
||||||
final AtomicInteger count = new AtomicInteger();
|
final AtomicInteger count = new AtomicInteger();
|
||||||
database.getPotentialEdits(other, System.currentTimeMillis() - timeDiff, bot, top, new RunnableVal<DiskStorageHistory>() {
|
database.getPotentialEdits(other, System.currentTimeMillis() - timeDiff, bot, top, new RunnableVal<DiskStorageHistory>() {
|
||||||
|
@ -52,7 +52,7 @@ public class ToolCommands {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
aliases = { "/inspect", "/i" },
|
aliases = { "inspect", "i" },
|
||||||
usage = "",
|
usage = "",
|
||||||
desc = "Inspect edits within a radius",
|
desc = "Inspect edits within a radius",
|
||||||
help =
|
help =
|
||||||
|
Loading…
Reference in New Issue
Block a user