mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
fix: use new index calculations for BlockVectorSet remove (#2842)
- fixes #2841
This commit is contained in:
parent
d2033d49ca
commit
01273e0ed7
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user