Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-05 02:50:05 +01:00
Also synchronise when loading sections forcefully
Dieser Commit ist enthalten in:
Ursprung
8836d1d75c
Commit
d015e6b270
@ -816,17 +816,12 @@ public class BukkitGetBlocks_1_15_2 extends CharGetBlocks implements BukkitGetBl
|
||||
}
|
||||
|
||||
public ChunkSection[] getSections(boolean force) {
|
||||
if (force && forceLoadSections) {
|
||||
ChunkSection[] sections = getChunk().getSections();
|
||||
ChunkSection[] copy = new ChunkSection[sections.length];
|
||||
System.arraycopy(sections, 0, copy, 0, sections.length);
|
||||
return copy;
|
||||
}
|
||||
force &= forceLoadSections;
|
||||
ChunkSection[] tmp = sections;
|
||||
if (tmp == null) {
|
||||
if (tmp == null || force) {
|
||||
synchronized (this) {
|
||||
tmp = sections;
|
||||
if (tmp == null) {
|
||||
if (tmp == null || force) {
|
||||
ChunkSection[] chunkSections = getChunk().getSections();
|
||||
tmp = new ChunkSection[chunkSections.length];
|
||||
System.arraycopy(chunkSections, 0, tmp, 0, chunkSections.length);
|
||||
|
@ -817,17 +817,12 @@ public class BukkitGetBlocks_1_16_1 extends CharGetBlocks implements BukkitGetBl
|
||||
}
|
||||
|
||||
public ChunkSection[] getSections(boolean force) {
|
||||
if (force && forceLoadSections) {
|
||||
ChunkSection[] sections = getChunk().getSections();
|
||||
ChunkSection[] copy = new ChunkSection[sections.length];
|
||||
System.arraycopy(sections, 0, copy, 0, sections.length);
|
||||
return copy;
|
||||
}
|
||||
force &= forceLoadSections;
|
||||
ChunkSection[] tmp = sections;
|
||||
if (tmp == null) {
|
||||
if (tmp == null || force) {
|
||||
synchronized (this) {
|
||||
tmp = sections;
|
||||
if (tmp == null) {
|
||||
if (tmp == null || force) {
|
||||
ChunkSection[] chunkSections = getChunk().getSections();
|
||||
tmp = new ChunkSection[chunkSections.length];
|
||||
System.arraycopy(chunkSections, 0, tmp, 0, chunkSections.length);
|
||||
|
@ -820,17 +820,12 @@ public class BukkitGetBlocks_1_16_2 extends CharGetBlocks implements BukkitGetBl
|
||||
}
|
||||
|
||||
public ChunkSection[] getSections(boolean force) {
|
||||
if (force && forceLoadSections) {
|
||||
ChunkSection[] sections = getChunk().getSections();
|
||||
ChunkSection[] copy = new ChunkSection[sections.length];
|
||||
System.arraycopy(sections, 0, copy, 0, sections.length);
|
||||
return copy;
|
||||
}
|
||||
force &= forceLoadSections;
|
||||
ChunkSection[] tmp = sections;
|
||||
if (tmp == null) {
|
||||
if (tmp == null || force) {
|
||||
synchronized (this) {
|
||||
tmp = sections;
|
||||
if (tmp == null) {
|
||||
if (tmp == null || force) {
|
||||
ChunkSection[] chunkSections = getChunk().getSections();
|
||||
tmp = new ChunkSection[chunkSections.length];
|
||||
System.arraycopy(chunkSections, 0, tmp, 0, chunkSections.length);
|
||||
|
@ -820,17 +820,12 @@ public class BukkitGetBlocks_1_16_5 extends CharGetBlocks implements BukkitGetBl
|
||||
}
|
||||
|
||||
public ChunkSection[] getSections(boolean force) {
|
||||
if (force && forceLoadSections) {
|
||||
ChunkSection[] sections = getChunk().getSections();
|
||||
ChunkSection[] copy = new ChunkSection[sections.length];
|
||||
System.arraycopy(sections, 0, copy, 0, sections.length);
|
||||
return copy;
|
||||
}
|
||||
force &= forceLoadSections;
|
||||
ChunkSection[] tmp = sections;
|
||||
if (tmp == null) {
|
||||
if (tmp == null || force) {
|
||||
synchronized (this) {
|
||||
tmp = sections;
|
||||
if (tmp == null) {
|
||||
if (tmp == null || force) {
|
||||
ChunkSection[] chunkSections = getChunk().getSections();
|
||||
tmp = new ChunkSection[chunkSections.length];
|
||||
System.arraycopy(chunkSections, 0, tmp, 0, chunkSections.length);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren