Set last returned index to -1 when removing
This commit is contained in:
parent
ba83b89476
commit
9577e205e7
@ -71,6 +71,7 @@ class BlockPosSet : MutableSet<BlockPos> {
|
||||
throw NoSuchElementException()
|
||||
|
||||
bits[last] = false
|
||||
last = -1
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -157,6 +158,7 @@ class BlockPosSet : MutableSet<BlockPos> {
|
||||
override fun next(): BlockPos {
|
||||
findNext()
|
||||
last = current
|
||||
foundNext = false
|
||||
val blockPos = current.next()
|
||||
return blockPos
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user