mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-06-26 14:44:50 +02:00
Update replace code to newer API
parent
88fb8ada5d
commit
f2aaf84610
|
@ -66,13 +66,11 @@ EditSession editSession = new EditSessionBuilder(world)
|
|||
String worldName = "world";
|
||||
File root = new File(worldName + File.separator + "region");
|
||||
MCAQueue queue = new MCAQueue(worldName, root, true);
|
||||
final LongAdder changes = new LongAdder();
|
||||
queue.filterWorld(new MCAFilter() {
|
||||
MCAFilterCounter counter = queue.filterWorld(new MCAFilterCounter() {
|
||||
@Override
|
||||
public void applyBlock(int x, int y, int z, BaseBlock block) {
|
||||
public void applyBlock(int x, int y, int z, BaseBlock block, MutableLong ignore) {
|
||||
if (block.getId() == 5) { // Change the id if it's 5
|
||||
block.setId(7);
|
||||
changes.add(1);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user