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()
|
throw NoSuchElementException()
|
||||||
|
|
||||||
bits[last] = false
|
bits[last] = false
|
||||||
|
last = -1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -157,6 +158,7 @@ class BlockPosSet : MutableSet<BlockPos> {
|
|||||||
override fun next(): BlockPos {
|
override fun next(): BlockPos {
|
||||||
findNext()
|
findNext()
|
||||||
last = current
|
last = current
|
||||||
|
foundNext = false
|
||||||
val blockPos = current.next()
|
val blockPos = current.next()
|
||||||
return blockPos
|
return blockPos
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user