Why do you even need it to be a chest, if you are just going to have it delete itself as soon as it impacts?
If the result you want is something to fall from the sky and land on the surface, as a sand block would, to identify the top block on the surface, then you donât need it to be a chest, just use the sand block â and even then if its a matter of "I have a coordinate location, I want to drop something from a height in order to determine the block that it would land on from the top of the map /starting at an arbitrary high value, with the only interest being to identify the point that a falling block WOULD land on, you can check the block lighting properties of locations within that column to find the point where it decreases. But you could just spawn sand in the air and let it fall and land to find that positionâŚ
If the effect you are after is âa falling chest, visible to someone for a few seconds before it hits the groundâ you can actually just create a falling chest. All blocks in the game can be turned into falling-entities, and fall as a sand block would (which auto-converts them into fixed-position blocks when they land). No need to disguise it, the chest just turns into a block that is impacted by gravityâŚ
You would need to first create a chest block at a given height, given location. Then you spawn a falling block entity form of the chest at the exact same location â falling block entities require a blockstate at a location to match the blockstate used for the falling entity, or else it glitches out and doesnât work. The server removes the block as the entity is spawned, and the falling commences.
Either spawning sand in the air, and letting it turn itself into falling sand, or spawning a block+fallingblock in the air, a falling-block entity is what does the falling. When the block hits the ground and solidifies, a ChangeBlockEvent.Place, root cause instanceof FallingBlockEntity event is thrown. You could listen for that event, cancel/remove the transaction if the location x/z matches a spawned one (or if its the only way your server will have falling chest blocks, respond to all falling block chest blocks), grab the location, and pass that into your mob spawning system.
Note: Falling blocks need to be spawned at 0.5/0.5 coordinates so that the block lands solidly. If it is offset, or with a motion vector that displaces it, when it lands, the results are inconsistant: if it lands on a flat plane, it will slide into a nearby available coordinate, if it lands where there is an edge, it will be destroyed or slide down into the lower position depending on which x or z axis is where the bulk of it lays, and how much is over the center line, in ways which basically appear random and inconsistant. 0.5/0.5 spawn positions, and you have zero problems.