diff options
author | hle0 <91701075+hle0@users.noreply.github.com> | 2024-11-08 00:05:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-08 00:05:47 +0100 |
commit | 33b9c5dc6dae42fb6fc33283ded888a8001e5394 (patch) | |
tree | 136bb3e02c25e49feb00a06857e4145a54b6c339 /src/ClientHandle.cpp | |
parent | Remove simple template-id from constructors for Vector3 template. (#5586) (diff) | |
download | cuberite-33b9c5dc6dae42fb6fc33283ded888a8001e5394.tar cuberite-33b9c5dc6dae42fb6fc33283ded888a8001e5394.tar.gz cuberite-33b9c5dc6dae42fb6fc33283ded888a8001e5394.tar.bz2 cuberite-33b9c5dc6dae42fb6fc33283ded888a8001e5394.tar.lz cuberite-33b9c5dc6dae42fb6fc33283ded888a8001e5394.tar.xz cuberite-33b9c5dc6dae42fb6fc33283ded888a8001e5394.tar.zst cuberite-33b9c5dc6dae42fb6fc33283ded888a8001e5394.zip |
Diffstat (limited to 'src/ClientHandle.cpp')
-rw-r--r-- | src/ClientHandle.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index 01c95095a..2b32c5c07 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -1254,7 +1254,10 @@ void cClientHandle::HandleBlockDigStarted(Vector3i a_BlockPos, eBlockFace a_Bloc BLOCKTYPE DiggingBlock; NIBBLETYPE DiggingMeta; - m_Player->GetWorld()->GetBlockTypeMeta(a_BlockPos, DiggingBlock, DiggingMeta); + if (!m_Player->GetWorld()->GetBlockTypeMeta(a_BlockPos, DiggingBlock, DiggingMeta)) + { + return; + } if ( m_Player->IsGameModeCreative() && @@ -1322,7 +1325,10 @@ void cClientHandle::HandleBlockDigFinished(Vector3i a_BlockPos, eBlockFace a_Blo BLOCKTYPE DugBlock; NIBBLETYPE DugMeta; - m_Player->GetWorld()->GetBlockTypeMeta(a_BlockPos, DugBlock, DugMeta); + if (!m_Player->GetWorld()->GetBlockTypeMeta(a_BlockPos, DugBlock, DugMeta)) + { + return; + } if (!m_Player->IsGameModeCreative()) { |