breaking: change on_broken block event timing

This commit is contained in:
MihailRis 2026-10-15 21:17:14 +03:00
parent 4354896008
commit 3bcbb987e3

View file

@ -69,11 +69,11 @@ void BlocksController::breakBlock(
onBlockInteraction(
player, glm::ivec3(x, y, z), def, BlockInteraction::destruction
);
scripting::on_block_broken(player, def, glm::ivec3(x, y, z));
blocks_agent::set(chunks, x, y, z, 0, {});
if (lighting) {
lighting->onBlockSet(x, y, z, 0);
}
scripting::on_block_broken(player, def, glm::ivec3(x, y, z));
if (def.rt.extended) {
updateSides(x, y, z , def.size.x, def.size.y, def.size.z);
} else {