I messed up when typing a command into a repeating command block, and accidentally summoned a bunch of armor stands, all of which were being executed to summon fire arrows every tick. There were so many entities that the world lagged to 0 fps, and I had to exit the game. I now can't get back into the world. I have heard that I can use NBTExplorer to go into the region file to delete the entities manually, but the problem is that I don't know what chunk they are in, and I have loaded way too many chunks to just comb through them all and find the specific one I'm looking for. Is there some way I can find out what chunk has the most entities, or is there some other solution?
You can use NBTExplorer to delete the entities.
The chunks are saved in region files that are named after the coordinates divided by 512, in the folders
region for Overworld,
DIM-1/region for Nether and
DIM1/region for End. Close the world in Minecraft, open the corresponding file in NBTExplorer, navigate to the chunk (here NBTExplorer tells you the coordinates), delete all entries in the
Level.Entities tag (or just some, if you want) and save.