When it explodes, the server sleeps for a second, the problem may be Event::getBlockList(), which returns about 100 blocks, would it reduce lagg when I would use foreach with coordinates, to remove the blocks at the explosion? What should I use to reduce lagg too? What do you recommend?
blocks count (lag) depends on explosion size, and you are right, but i think you can not reduce lag a lot. and what explosion do you need? just particle or explosion that damages entities, or full explosion?
Php has slow arrays so if chunk has around 15 000 blocks and getblock() method search in it 100 Times. You can make your own method for Getting blocks in explosion radius. IT should be faster but idk maybe block cache has private access