Merge pull request #1044 from MihailRis/change-on-broken-event-timing

breaking: change on_broken block event timing
This commit is contained in:
MihailRis 2026-10-18 13:53:25 +03:00 • committed by GitHub
commit 4aa899e69a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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 {