Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-26 19:02:36 +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) {
|
public ChunkSection[] getSections(boolean force) {
|
||||||
if (force && forceLoadSections) {
|
force &= forceLoadSections;
|
||||||
ChunkSection[] sections = getChunk().getSections();
|
|
||||||
ChunkSection[] copy = new ChunkSection[sections.length];
|
|
||||||
System.arraycopy(sections, 0, copy, 0, sections.length);
|
|
||||||
return copy;
|
|
||||||
}
|
|
||||||
ChunkSection[] tmp = sections;
|
ChunkSection[] tmp = sections;
|
||||||
if (tmp == null) {
|
if (tmp == null || force) {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
tmp = sections;
|
tmp = sections;
|
||||||
if (tmp == null) {
|
if (tmp == null || force) {
|
||||||
ChunkSection[] chunkSections = getChunk().getSections();
|
ChunkSection[] chunkSections = getChunk().getSections();
|
||||||
tmp = new ChunkSection[chunkSections.length];
|
tmp = new ChunkSection[chunkSections.length];
|
||||||
System.arraycopy(chunkSections, 0, tmp, 0, 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) {
|
public ChunkSection[] getSections(boolean force) {
|
||||||
if (force && forceLoadSections) {
|
force &= forceLoadSections;
|
||||||
ChunkSection[] sections = getChunk().getSections();
|
|
||||||
ChunkSection[] copy = new ChunkSection[sections.length];
|
|
||||||
System.arraycopy(sections, 0, copy, 0, sections.length);
|
|
||||||
return copy;
|
|
||||||
}
|
|
||||||
ChunkSection[] tmp = sections;
|
ChunkSection[] tmp = sections;
|
||||||
if (tmp == null) {
|
if (tmp == null || force) {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
tmp = sections;
|
tmp = sections;
|
||||||
if (tmp == null) {
|
if (tmp == null || force) {
|
||||||
ChunkSection[] chunkSections = getChunk().getSections();
|
ChunkSection[] chunkSections = getChunk().getSections();
|
||||||
tmp = new ChunkSection[chunkSections.length];
|
tmp = new ChunkSection[chunkSections.length];
|
||||||
System.arraycopy(chunkSections, 0, tmp, 0, 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) {
|
public ChunkSection[] getSections(boolean force) {
|
||||||
if (force && forceLoadSections) {
|
force &= forceLoadSections;
|
||||||
ChunkSection[] sections = getChunk().getSections();
|
|
||||||
ChunkSection[] copy = new ChunkSection[sections.length];
|
|
||||||
System.arraycopy(sections, 0, copy, 0, sections.length);
|
|
||||||
return copy;
|
|
||||||
}
|
|
||||||
ChunkSection[] tmp = sections;
|
ChunkSection[] tmp = sections;
|
||||||
if (tmp == null) {
|
if (tmp == null || force) {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
tmp = sections;
|
tmp = sections;
|
||||||
if (tmp == null) {
|
if (tmp == null || force) {
|
||||||
ChunkSection[] chunkSections = getChunk().getSections();
|
ChunkSection[] chunkSections = getChunk().getSections();
|
||||||
tmp = new ChunkSection[chunkSections.length];
|
tmp = new ChunkSection[chunkSections.length];
|
||||||
System.arraycopy(chunkSections, 0, tmp, 0, 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) {
|
public ChunkSection[] getSections(boolean force) {
|
||||||
if (force && forceLoadSections) {
|
force &= forceLoadSections;
|
||||||
ChunkSection[] sections = getChunk().getSections();
|
|
||||||
ChunkSection[] copy = new ChunkSection[sections.length];
|
|
||||||
System.arraycopy(sections, 0, copy, 0, sections.length);
|
|
||||||
return copy;
|
|
||||||
}
|
|
||||||
ChunkSection[] tmp = sections;
|
ChunkSection[] tmp = sections;
|
||||||
if (tmp == null) {
|
if (tmp == null || force) {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
tmp = sections;
|
tmp = sections;
|
||||||
if (tmp == null) {
|
if (tmp == null || force) {
|
||||||
ChunkSection[] chunkSections = getChunk().getSections();
|
ChunkSection[] chunkSections = getChunk().getSections();
|
||||||
tmp = new ChunkSection[chunkSections.length];
|
tmp = new ChunkSection[chunkSections.length];
|
||||||
System.arraycopy(chunkSections, 0, tmp, 0, chunkSections.length);
|
System.arraycopy(chunkSections, 0, tmp, 0, chunkSections.length);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren