mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Merge remote-tracking branch 'origin/1.15' into 1.15
This commit is contained in:
commit
5fb18259d5
@ -206,10 +206,9 @@ public class BukkitGetBlocks_1_14 extends CharGetBlocks {
|
||||
if (this.sections == null) {
|
||||
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) {
|
||||
// this.sections[layer] = section;
|
||||
// }
|
||||
if (this.sections[layer] != section) {
|
||||
this.sections[layer] = section;
|
||||
}
|
||||
this.blocks[layer] = arr;
|
||||
}
|
||||
}
|
||||
@ -279,20 +278,18 @@ public class BukkitGetBlocks_1_14 extends CharGetBlocks {
|
||||
synchronized (this) {
|
||||
synchronized (lock) {
|
||||
lock.untilFree();
|
||||
ChunkSection getSection;
|
||||
if (this.nmsChunk != nmsChunk) {
|
||||
this.nmsChunk = nmsChunk;
|
||||
this.sections = null;
|
||||
this.reset();
|
||||
} else {
|
||||
getSection = this.getSections()[layer];
|
||||
if (getSection != existingSection) {
|
||||
} else if (existingSection != getSections()[layer]) {
|
||||
this.sections[layer] = existingSection;
|
||||
this.reset();
|
||||
} else if (!Arrays.equals(update(layer, new char[4096]), load(layer))) {
|
||||
this.reset(layer);
|
||||
} else if (lock.isModified()) {
|
||||
this.reset(layer);
|
||||
}
|
||||
}
|
||||
newSection = BukkitAdapter_1_14.newChunkSection(layer, this::load, setArr);
|
||||
if (!BukkitAdapter_1_14.setSectionAtomic(sections, existingSection, newSection, layer)) {
|
||||
System.out.println("Failed to set chunk section:" + X + "," + Z + " layer: " + layer);
|
||||
|
@ -214,10 +214,9 @@ public class BukkitGetBlocks_1_15 extends CharGetBlocks {
|
||||
if (this.sections == null) {
|
||||
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) {
|
||||
// this.sections[layer] = section;
|
||||
// }
|
||||
if (this.sections[layer] != section) {
|
||||
this.sections[layer] = section;
|
||||
}
|
||||
this.blocks[layer] = arr;
|
||||
}
|
||||
}
|
||||
@ -287,20 +286,18 @@ public class BukkitGetBlocks_1_15 extends CharGetBlocks {
|
||||
synchronized (this) {
|
||||
synchronized (lock) {
|
||||
lock.untilFree();
|
||||
ChunkSection getSection;
|
||||
if (this.nmsChunk != nmsChunk) {
|
||||
this.nmsChunk = nmsChunk;
|
||||
this.sections = null;
|
||||
this.reset();
|
||||
} else {
|
||||
getSection = this.getSections()[layer];
|
||||
if (getSection != existingSection) {
|
||||
} else if (existingSection != getSections()[layer]) {
|
||||
this.sections[layer] = existingSection;
|
||||
this.reset();
|
||||
} else if (!Arrays.equals(update(layer, new char[4096]), load(layer))) {
|
||||
this.reset(layer);
|
||||
} else if (lock.isModified()) {
|
||||
this.reset(layer);
|
||||
}
|
||||
}
|
||||
newSection = BukkitAdapter_1_15.newChunkSection(layer, this::load, setArr);
|
||||
if (!BukkitAdapter_1_15.setSectionAtomic(sections, existingSection, newSection, layer)) {
|
||||
System.out.println("Failed to set chunk section:" + X + "," + Z + " layer: " + layer);
|
||||
|
Loading…
Reference in New Issue
Block a user