1
0

Added y bounds checking for cPlayer::PlaceBlock (#5194)

This commit is contained in:
Kiryu144
2021-07-23 11:14:01 +02:00
committed by GitHub
parent 179d6da490
commit 36a97d441b
4 changed files with 76 additions and 53 deletions

View File

@@ -2333,15 +2333,6 @@ void cPlayer::LoadRank(void)
bool cPlayer::PlaceBlock(const Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
{
return PlaceBlocks({ { a_Position, a_BlockType, a_BlockMeta } });
}
void cPlayer::SendBlocksAround(int a_BlockX, int a_BlockY, int a_BlockZ, int a_Range)
{
// Collect the coords of all the blocks to send:
@@ -2457,6 +2448,15 @@ const cUUID & cPlayer::GetUUID(void) const
bool cPlayer::PlaceBlock(const Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
{
return PlaceBlocks({ { a_Position, a_BlockType, a_BlockMeta } });
}
bool cPlayer::PlaceBlocks(const std::initializer_list<sSetBlock> a_Blocks)
{
if (DoesPlacingBlocksIntersectEntity(a_Blocks))