Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-03 01:50:07 +01:00
Apply fda7d00747
to other versions so numpties that use old versions for no reason stop complaining too
Dieser Commit ist enthalten in:
Ursprung
508d595b8d
Commit
9869cf09c6
@ -206,10 +206,9 @@ public class BukkitGetBlocks_1_14 extends CharGetBlocks {
|
|||||||
if (this.sections == null) {
|
if (this.sections == null) {
|
||||||
this.sections = sections.clone();
|
this.sections = sections.clone();
|
||||||
}
|
}
|
||||||
//TODO: Understand why this causes #329, what the purpose of this is, and what may or may not break after commenting this out.
|
if (this.sections[layer] != section) {
|
||||||
// if (this.sections[layer] != section) {
|
this.sections[layer] = section;
|
||||||
// this.sections[layer] = section;
|
}
|
||||||
// }
|
|
||||||
this.blocks[layer] = arr;
|
this.blocks[layer] = arr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -279,19 +278,17 @@ public class BukkitGetBlocks_1_14 extends CharGetBlocks {
|
|||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
synchronized (lock) {
|
synchronized (lock) {
|
||||||
lock.untilFree();
|
lock.untilFree();
|
||||||
ChunkSection getSection;
|
|
||||||
if (this.nmsChunk != nmsChunk) {
|
if (this.nmsChunk != nmsChunk) {
|
||||||
this.nmsChunk = nmsChunk;
|
this.nmsChunk = nmsChunk;
|
||||||
this.sections = null;
|
this.sections = null;
|
||||||
this.reset();
|
this.reset();
|
||||||
} else {
|
} else if (existingSection != getSections()[layer]) {
|
||||||
getSection = this.getSections()[layer];
|
this.sections[layer] = existingSection;
|
||||||
if (getSection != existingSection) {
|
this.reset();
|
||||||
this.sections[layer] = existingSection;
|
} else if (!Arrays.equals(update(layer, new char[4096]), load(layer))) {
|
||||||
this.reset();
|
this.reset(layer);
|
||||||
} else if (lock.isModified()) {
|
} else if (lock.isModified()) {
|
||||||
this.reset(layer);
|
this.reset(layer);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
newSection = BukkitAdapter_1_14.newChunkSection(layer, this::load, setArr);
|
newSection = BukkitAdapter_1_14.newChunkSection(layer, this::load, setArr);
|
||||||
if (!BukkitAdapter_1_14.setSectionAtomic(sections, existingSection, newSection, layer)) {
|
if (!BukkitAdapter_1_14.setSectionAtomic(sections, existingSection, newSection, layer)) {
|
||||||
|
@ -214,10 +214,9 @@ public class BukkitGetBlocks_1_15 extends CharGetBlocks {
|
|||||||
if (this.sections == null) {
|
if (this.sections == null) {
|
||||||
this.sections = sections.clone();
|
this.sections = sections.clone();
|
||||||
}
|
}
|
||||||
//TODO: Understand why this causes #329, what the purpose of this is, and what may or may not break after commenting this out.
|
if (this.sections[layer] != section) {
|
||||||
// if (this.sections[layer] != section) {
|
this.sections[layer] = section;
|
||||||
// this.sections[layer] = section;
|
}
|
||||||
// }
|
|
||||||
this.blocks[layer] = arr;
|
this.blocks[layer] = arr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -287,19 +286,17 @@ public class BukkitGetBlocks_1_15 extends CharGetBlocks {
|
|||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
synchronized (lock) {
|
synchronized (lock) {
|
||||||
lock.untilFree();
|
lock.untilFree();
|
||||||
ChunkSection getSection;
|
|
||||||
if (this.nmsChunk != nmsChunk) {
|
if (this.nmsChunk != nmsChunk) {
|
||||||
this.nmsChunk = nmsChunk;
|
this.nmsChunk = nmsChunk;
|
||||||
this.sections = null;
|
this.sections = null;
|
||||||
this.reset();
|
this.reset();
|
||||||
} else {
|
} else if (existingSection != getSections()[layer]) {
|
||||||
getSection = this.getSections()[layer];
|
this.sections[layer] = existingSection;
|
||||||
if (getSection != existingSection) {
|
this.reset();
|
||||||
this.sections[layer] = existingSection;
|
} else if (!Arrays.equals(update(layer, new char[4096]), load(layer))) {
|
||||||
this.reset();
|
this.reset(layer);
|
||||||
} else if (lock.isModified()) {
|
} else if (lock.isModified()) {
|
||||||
this.reset(layer);
|
this.reset(layer);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
newSection = BukkitAdapter_1_15.newChunkSection(layer, this::load, setArr);
|
newSection = BukkitAdapter_1_15.newChunkSection(layer, this::load, setArr);
|
||||||
if (!BukkitAdapter_1_15.setSectionAtomic(sections, existingSection, newSection, layer)) {
|
if (!BukkitAdapter_1_15.setSectionAtomic(sections, existingSection, newSection, layer)) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren