3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-03 01:50:07 +01:00

Possible fix for #331

- Should ensure the server doesn't tick the chunksection while we're editing it
- Basically using the old issue with FAWE breaking block ticking by setting this to zero :)
Dieser Commit ist enthalten in:
dordsor21 2020-05-09 16:23:38 +01:00
Ursprung 8f60544aad
Commit b1f1c0f4f0
3 geänderte Dateien mit 12 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -262,6 +262,10 @@ public class BukkitGetBlocks_1_14 extends CharGetBlocks {
char[] setArr = set.load(layer); char[] setArr = set.load(layer);
ChunkSection newSection; ChunkSection newSection;
ChunkSection existingSection = sections[layer]; ChunkSection existingSection = sections[layer];
//ensure that the server doesn't try to tick the chunksection while we're editing it.
BukkitAdapter_1_14.fieldTickingBlockCount.set(existingSection, (short) 0);
if (existingSection == null) { if (existingSection == null) {
newSection = BukkitAdapter_1_14.newChunkSection(layer, setArr); newSection = BukkitAdapter_1_14.newChunkSection(layer, setArr);
if (BukkitAdapter_1_14.setSectionAtomic(sections, null, newSection, layer)) { if (BukkitAdapter_1_14.setSectionAtomic(sections, null, newSection, layer)) {

Datei anzeigen

@ -270,6 +270,10 @@ public class BukkitGetBlocks_1_15 extends CharGetBlocks {
char[] setArr = set.load(layer); char[] setArr = set.load(layer);
ChunkSection newSection; ChunkSection newSection;
ChunkSection existingSection = sections[layer]; ChunkSection existingSection = sections[layer];
//ensure that the server doesn't try to tick the chunksection while we're editing it.
BukkitAdapter_1_15.fieldTickingBlockCount.set(existingSection, (short) 0);
if (existingSection == null) { if (existingSection == null) {
newSection = BukkitAdapter_1_15.newChunkSection(layer, setArr); newSection = BukkitAdapter_1_15.newChunkSection(layer, setArr);
if (BukkitAdapter_1_15.setSectionAtomic(sections, null, newSection, layer)) { if (BukkitAdapter_1_15.setSectionAtomic(sections, null, newSection, layer)) {

Datei anzeigen

@ -282,6 +282,10 @@ public class BukkitGetBlocks_1_15_2 extends CharGetBlocks {
char[] setArr = set.load(layer); char[] setArr = set.load(layer);
ChunkSection newSection; ChunkSection newSection;
ChunkSection existingSection = sections[layer]; ChunkSection existingSection = sections[layer];
//ensure that the server doesn't try to tick the chunksection while we're editing it.
BukkitAdapter_1_15_2.fieldTickingBlockCount.set(existingSection, (short) 0);
if (existingSection == null) { if (existingSection == null) {
newSection = BukkitAdapter_1_15_2.newChunkSection(layer, setArr); newSection = BukkitAdapter_1_15_2.newChunkSection(layer, setArr);
if (BukkitAdapter_1_15_2.setSectionAtomic(sections, null, newSection, layer)) { if (BukkitAdapter_1_15_2.setSectionAtomic(sections, null, newSection, layer)) {