feat(gameplay): add block change sync and coordinate utils

This commit is contained in:
2026-06-25 17:09:41 +08:00
parent 4a1ef54258
commit b782b40133
6 changed files with 187 additions and 9 deletions

View File

@@ -74,6 +74,12 @@ asio::awaitable<void> NetworkClient::read_loop() {
m_world.receive_chunk(rsp);
}
}
case to_num(PacketEnum::BLOCK_CHANGE_RSP): {
BlockChangeRsp rsp;
if (rsp.ParseFromArray(body_data.data(), body_data.size())) {
m_world.receive_block_change(rsp);
}
}
}
}
} catch (const asio::system_error& e) {