Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-09 21:10:05 +01:00
we do want to synchronise across the chunk when loading sections
Dieser Commit ist enthalten in:
Ursprung
42346b429b
Commit
39b0da2b99
@ -54,14 +54,13 @@ public abstract class CharBlocks implements IBlocks {
|
|||||||
};
|
};
|
||||||
public final char[][] blocks;
|
public final char[][] blocks;
|
||||||
public final Section[] sections;
|
public final Section[] sections;
|
||||||
private final Object[] loadLock = new Object[16];
|
private final Object loadLock = new Object();
|
||||||
|
|
||||||
public CharBlocks() {
|
public CharBlocks() {
|
||||||
blocks = new char[16][];
|
blocks = new char[16][];
|
||||||
sections = new Section[16];
|
sections = new Section[16];
|
||||||
for (int i = 0; i < 16; i++) {
|
for (int i = 0; i < 16; i++) {
|
||||||
sections[i] = EMPTY;
|
sections[i] = EMPTY;
|
||||||
loadLock[i] = new Object();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,7 +121,7 @@ public abstract class CharBlocks implements IBlocks {
|
|||||||
if (section.isFull()) {
|
if (section.isFull()) {
|
||||||
return section.get(this, layer);
|
return section.get(this, layer);
|
||||||
}
|
}
|
||||||
synchronized (loadLock[layer]) {
|
synchronized (loadLock) {
|
||||||
return sections[layer].get(this, layer);
|
return sections[layer].get(this, layer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren