What approach should be taken to replace .digBlockWith()

With all the big changes to event systems collapsing into fewer, more robust methods, the InteractBlockEvent target block no longer has a digBlockWith() method.

What would be the approach to take, if this method is dropped out, to simulate breaking the block with a given tool (ie, enchanted or not, proper tool or not - wood pick on diamond ore = air, iron pick on diamond ore…diamond, enchanted pick - same probability of more diamonds as if fully broken by hand) for use in a one-swing super-pick application?

Still needing large changes but it’ll be done with https://jd.spongepowered.org/org/spongepowered/api/world/PlayerSimulator.html

Ah I see.
I presume the usage would be like:

PlayerSimulator ps;
ps.digBlockWith(blockXYZposition, heldItemStackTool);

or is it much more involved than that? The one thing that does appear to lack in those docs is that only xyz coords/vectors are specified, not a world, so there would be that need to link the simulator to the world+coordinates not just the coordinates…

world.getPlayerSimulator()
There we go… It is bound to a world :wink: