3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-09-29 02:21:06 +02:00

fix: use new index calculations for BlockVectorSet remove (#2842)

- fixes #2841
Dieser Commit ist enthalten in:
Jordan 2024-07-21 14:59:12 +02:00 committet von GitHub
Ursprung d2033d49ca
Commit 01273e0ed7
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194

Datei anzeigen

@ -192,12 +192,13 @@ public class BlockVectorSet extends AbstractCollection<BlockVector3> implements
}
public boolean remove(int x, int y, int z) {
int pair = MathMan.pair((short) (x >> 11), (short) (z >> 11));
LocalBlockVectorSet localMap = localSets.get(pair);
int indexedY = (y + 128) >> 9;
long triple = MathMan.tripleWorldCoord((x >> 11), indexedY, (z >> 11));
LocalBlockVectorSet localMap = localSets.get(triple);
if (localMap != null) {
if (localMap.remove(x & 2047, y, z & 2047)) {
if (localMap.remove(x & 2047, ((y + 128) & 511) - 128, z & 2047)) {
if (localMap.isEmpty()) {
localSets.remove(pair);
localSets.remove(triple);
}
return true;
}