3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-17 00:20:09 +01: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) { public boolean remove(int x, int y, int z) {
int pair = MathMan.pair((short) (x >> 11), (short) (z >> 11)); int indexedY = (y + 128) >> 9;
LocalBlockVectorSet localMap = localSets.get(pair); long triple = MathMan.tripleWorldCoord((x >> 11), indexedY, (z >> 11));
LocalBlockVectorSet localMap = localSets.get(triple);
if (localMap != null) { 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()) { if (localMap.isEmpty()) {
localSets.remove(pair); localSets.remove(triple);
} }
return true; return true;
} }