temp fix for undo

also fix inspect brush using wrong ids
This commit is contained in:
Jesse Boyd 2019-11-18 07:23:48 +00:00
parent 0087a0d6ab
commit 4c32949210
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
5 changed files with 7 additions and 4 deletions

View File

@ -90,7 +90,7 @@ public class InspectBrush extends BrushTool implements DoubleActionTraceTool {
int index = value.getIndex();
long age = System.currentTimeMillis() - value.getBDFile().lastModified();
String ageFormatted = MainUtil.secToTime(age / 1000);
BBC.TOOL_INSPECT_INFO.send(player, name, BlockState.getFromInternalId(from).getAsString(), BlockState.getFromInternalId(to).getAsString(), ageFormatted);
BBC.TOOL_INSPECT_INFO.send(player, name, BlockState.getFromOrdinal(from).getAsString(), BlockState.getFromOrdinal(to).getAsString(), ageFormatted);
count.incrementAndGet();
return;
}

View File

@ -145,6 +145,7 @@ public abstract class FaweChangeSet implements ChangeSet, IBatchProcessor, Close
@Override
public synchronized IChunkSet processSet(IChunk chunk, IChunkGet get, IChunkSet set) {
System.out.println("Add chunk " + chunk.getX() + "," + chunk.getZ() + " | " + set.getBitMask());
int bx = chunk.getX() << 4;
int bz = chunk.getZ() << 4;

View File

@ -328,7 +328,6 @@ public class EditSessionBuilder {
queue = parallel.getExtent();
extent = parallel;
} else {
System.out.println("FAWE is in single threaded mode (performance reduced)");
extent = queue = Fawe.get().getQueueHandler().getQueue(world);
}
} else {

View File

@ -26,6 +26,7 @@ import static com.sk89q.worldedit.regions.Regions.maximumBlockY;
import static com.sk89q.worldedit.regions.Regions.minimumBlockY;
import com.boydti.fawe.FaweCache;
import com.boydti.fawe.beta.Filter;
import com.boydti.fawe.config.BBC;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.object.FaweLimit;
@ -204,7 +205,7 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
private final MutableBlockVector3 mutablebv = new MutableBlockVector3();
private int changes = 0;
private int changes = -1;
private final BlockBag blockBag;
private final int maxY;

View File

@ -473,7 +473,9 @@ public class LocalSession implements TextureHolder {
return;
}
// Don't store anything if no changes were made
if (editSession.size() == 0) return;
if (editSession.size() == 0) {
return;
}
FaweChangeSet changeSet = (FaweChangeSet) editSession.getChangeSet();
if (changeSet.isEmpty()) {