mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-12-29 12:37:53 +01:00
Fixes #430
This commit is contained in:
parent
84af1bf65a
commit
d1682d6938
@ -206,13 +206,13 @@ public class Settings extends Config {
|
|||||||
public boolean SMALL_EDITS = false;
|
public boolean SMALL_EDITS = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Comment("This relates to how FAWE places chunks")
|
||||||
public static class QUEUE {
|
public static class QUEUE {
|
||||||
@Create
|
@Create
|
||||||
public static PROGRESS PROGRESS;
|
public static PROGRESS PROGRESS;
|
||||||
@Comment({
|
@Comment({
|
||||||
"If no blocks from completed edits are queued, and if the global queue has more available ",
|
"If you are changing more than this many chunks",
|
||||||
"chunks to place from still-processing edits than the target size setting, it will begin",
|
"it can start start placing before all the changes are calculated"
|
||||||
"placing available blocks from edits still in the preprocessing stage."
|
|
||||||
})
|
})
|
||||||
public int TARGET_SIZE = 64;
|
public int TARGET_SIZE = 64;
|
||||||
@Comment({
|
@Comment({
|
||||||
@ -221,15 +221,16 @@ public class Settings extends Config {
|
|||||||
public int PARALLEL_THREADS = Math.max(1, Runtime.getRuntime().availableProcessors());
|
public int PARALLEL_THREADS = Math.max(1, Runtime.getRuntime().availableProcessors());
|
||||||
@Comment({
|
@Comment({
|
||||||
"The time in milliseconds that the global queue can be idle before it is forced to start",
|
"The time in milliseconds that the global queue can be idle before it is forced to start",
|
||||||
"on edits which are still in the preprocessing stage."
|
"on edits which are still in the processing stage."
|
||||||
})
|
})
|
||||||
public int MAX_WAIT_MS = 1000;
|
public int MAX_WAIT_MS = 1000;
|
||||||
|
|
||||||
@Comment({
|
@Comment({
|
||||||
"Increase or decrease queue intensity (0 = balance of performance / stability)",
|
"Increase or decrease queue intensity (ms):",
|
||||||
"Should not need to change this. Increasing it (positive value) too high ",
|
" 0 = balance of performance / stability",
|
||||||
"will probably cause the server to freeze, and decreasing it (negative value)",
|
" -10 = Allocate 10ms less for chunk placement",
|
||||||
"may reduce load on the server but should not be necessary."
|
"Too high will can cause lag spikes",
|
||||||
|
"Too low will reduce load and result in slower changes",
|
||||||
})
|
})
|
||||||
public int EXTRA_TIME_MS = 0;
|
public int EXTRA_TIME_MS = 0;
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ import com.sk89q.jnbt.ListTag;
|
|||||||
import com.sk89q.jnbt.StringTag;
|
import com.sk89q.jnbt.StringTag;
|
||||||
import com.sk89q.jnbt.Tag;
|
import com.sk89q.jnbt.Tag;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
@ -249,7 +250,9 @@ public class ForgeChunk_All extends CharFaweChunk<Chunk, ForgeQueue_All> {
|
|||||||
}
|
}
|
||||||
sections[j] = section = new ExtendedBlockStorage(j << 4, !getParent().getWorld().provider.hasNoSky);
|
sections[j] = section = new ExtendedBlockStorage(j << 4, !getParent().getWorld().provider.hasNoSky);
|
||||||
section.setBlockLSBArray(newIdArray);
|
section.setBlockLSBArray(newIdArray);
|
||||||
|
if (newDataArray != null) {
|
||||||
section.setBlockMetadataArray(newDataArray);
|
section.setBlockMetadataArray(newDataArray);
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
} else if (count >= 4096) {
|
} else if (count >= 4096) {
|
||||||
if (count == countAir) {
|
if (count == countAir) {
|
||||||
@ -257,7 +260,12 @@ public class ForgeChunk_All extends CharFaweChunk<Chunk, ForgeQueue_All> {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
section.setBlockLSBArray(newIdArray);
|
section.setBlockLSBArray(newIdArray);
|
||||||
|
if (newDataArray != null) {
|
||||||
section.setBlockMetadataArray(newDataArray);
|
section.setBlockMetadataArray(newDataArray);
|
||||||
|
} else {
|
||||||
|
NibbleArray nibble = section.getBlockMSBArray();
|
||||||
|
Arrays.fill(nibble.data, (byte) 0);
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
byte[] currentIdArray = section.getBlockLSBArray();
|
byte[] currentIdArray = section.getBlockLSBArray();
|
||||||
|
Loading…
Reference in New Issue
Block a user