mirror of
https://github.com/zyllian/classics.git
synced 2025-01-17 19:22:37 -08:00
properly restrict placement/breaking of bedrock
This commit is contained in:
parent
8bdb6e4ee5
commit
947fd1271f
1 changed files with 8 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue