I've been skimming through the TntBlock class and the PrimedTnt class to try and figure out how explosions are handled. I want a block I'm making to explode when, for instance, you activate it with a flint and steel. My question is the following: Do I need to spawn an entity to use level.explode? Or is there a way to make a block explode without spawning an entity first? From what I can see, this was possible in the past but world.createExplosion is deprecated from what I can tell.
Also if I do need an entity, could I say, just delete the block, spawn in an invisible entity, and have it explode thus reaching the same end result?