From 947fd1271ff18478e0c7184089c48e1628eb72bd Mon Sep 17 00:00:00 2001 From: Zoey Date: Fri, 19 Apr 2024 15:48:06 -0700 Subject: [PATCH] properly restrict placement/breaking of bedrock --- src/server/network.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/server/network.rs b/src/server/network.rs index ef3f0f7..d4ec921 100644 --- a/src/server/network.rs +++ b/src/server/network.rs @@ -229,7 +229,8 @@ async fn handle_stream_inner( let block = data.level.get_block(x as usize, y as usize, z as usize); // check if bedrock - if block == 0x07 + // TODO: genericize this + if (block == 0x07 || block_type == 0x07) && data .players .iter() @@ -238,6 +239,12 @@ async fn handle_stream_inner( }) .unwrap_or_default() != PlayerType::Operator { + reply_queue.push_back(ServerPacket::SetBlock { + x, + y, + z, + block_type: block, + }); continue; } let packet = ServerPacket::SetBlock {