From f8e2ff5ce3d22f75a9ae0ea30aaae68f76baab34 Mon Sep 17 00:00:00 2001 From: zhenyan121 <3367366583@qq.com> Date: Wed, 1 Jul 2026 10:00:18 +0800 Subject: [PATCH] fix(server_world): floor block position coordinates in handle_block_change --- src/gameplay/server_world.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gameplay/server_world.cpp b/src/gameplay/server_world.cpp index c635808..3473422 100644 --- a/src/gameplay/server_world.cpp +++ b/src/gameplay/server_world.cpp @@ -700,9 +700,9 @@ void ServerWorld::handle_chunk_req(int task_id, const std::string& uuid, } void ServerWorld::handle_block_change(const BlockChangeReq& req) { - float x = req.pos().x(); - float y = req.pos().y(); - float z = req.pos().z(); + float x = std::floor(req.pos().x()); + float y = std::floor(req.pos().y()); + float z = std::floor(req.pos().z()); if (!set_block(glm::ivec3(x, y, z), req.block())) { return; }