diff --git a/src/main/java/net/minestom/server/instance/Explosion.java b/src/main/java/net/minestom/server/instance/Explosion.java index 96edbb575..e69b0d1a4 100644 --- a/src/main/java/net/minestom/server/instance/Explosion.java +++ b/src/main/java/net/minestom/server/instance/Explosion.java @@ -79,6 +79,8 @@ public abstract class Explosion { instance.getPlayers().forEach(player -> { player.sendPacketToViewersAndSelf(packet); }); + + postSend(instance, blocks); } /** @@ -91,4 +93,12 @@ public abstract class Explosion { * Just be careful, you might just crash the server or the client. Or you're lucky, both at the same time. */ protected void postExplosion(Instance instance, List blocks, ExplosionPacket packet) {} + + /** + * Called after sending the explosion packet. Can be used to (re)set blocks that have been destroyed. + * This is necessary to do after the packet being sent, because the client sets the positions received to air. + * @param instance the instance in which the explosion occurs + * @param blocks the block positions returned by prepare + */ + protected void postSend(Instance instance, List blocks) {} }