Currently, we open the leveldb when the user opens the world, and close it when the user opens a different world or when the program is closed.
This confuses everyone because they leave the program open and try to play bedrock and it either throws an error or fails to update some part of the world.
Let's change it so that every operation opens the leveldb, does the thing, then closes it. It should be relatively cheap. Most functions are already written to work in bulk (i.e. the loop is on the inside), so that's good.
Currently, we open the leveldb when the user opens the world, and close it when the user opens a different world or when the program is closed.
This confuses everyone because they leave the program open and try to play bedrock and it either throws an error or fails to update some part of the world.
Let's change it so that every operation opens the leveldb, does the thing, then closes it. It should be relatively cheap. Most functions are already written to work in bulk (i.e. the loop is on the inside), so that's good.