fix on_blocks_tick interval

This commit is contained in:
MihailRis 2025-12-29 20:56:34 +03:00
parent 47d9434a96
commit cd43d9545a
2 changed files with 3 additions and 2 deletions

View file

@ -24,7 +24,7 @@ BlocksController::BlocksController(const Level& level, Lighting* lighting)
chunks(*level.chunks),
lighting(lighting),
randTickClock(20, 3),
blocksTickClock(20, 1),
blocksTickClock(20, 3),
worldTickClock(20, 1) {
}
@ -124,7 +124,7 @@ void BlocksController::update(float delta, uint padding) {
randomTick(randTickClock.getPart(), randTickClock.getParts(), padding);
}
if (blocksTickClock.update(delta)) {
onBlocksTick(blocksTickClock.getPart(), blocksTickClock.getParts());
onBlocksTick(blocksTickClock.getTickId(), blocksTickClock.getParts());
}
if (worldTickClock.update(delta)) {
scripting::on_world_tick(worldTickClock.getTickRate());