diff options
author | x12xx12x <44411062+12xx12@users.noreply.github.com> | 2022-04-19 20:30:12 +0200 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2022-04-20 09:41:02 +0200 |
commit | 5ea7675eca4fe50feed7fc4b871075f8c937d8b1 (patch) | |
tree | 440c01c9c6b783b27155c631273c60d32092c38f /src/Entities/Player.cpp | |
parent | Check height is within world for pistons and digging (#5396) (diff) | |
download | cuberite-5ea7675eca4fe50feed7fc4b871075f8c937d8b1.tar cuberite-5ea7675eca4fe50feed7fc4b871075f8c937d8b1.tar.gz cuberite-5ea7675eca4fe50feed7fc4b871075f8c937d8b1.tar.bz2 cuberite-5ea7675eca4fe50feed7fc4b871075f8c937d8b1.tar.lz cuberite-5ea7675eca4fe50feed7fc4b871075f8c937d8b1.tar.xz cuberite-5ea7675eca4fe50feed7fc4b871075f8c937d8b1.tar.zst cuberite-5ea7675eca4fe50feed7fc4b871075f8c937d8b1.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/Player.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index 07460fe98..376f431eb 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -2322,15 +2322,15 @@ void cPlayer::LoadRank(void) -void cPlayer::SendBlocksAround(int a_BlockX, int a_BlockY, int a_BlockZ, int a_Range) +void cPlayer::SendBlocksAround(Vector3i a_BlockPos, int a_Range) { // Collect the coords of all the blocks to send: sSetBlockVector blks; - for (int y = a_BlockY - a_Range + 1; y < a_BlockY + a_Range; y++) + for (int y = a_BlockPos.y - a_Range + 1; y < a_BlockPos.y + a_Range; y++) { - for (int z = a_BlockZ - a_Range + 1; z < a_BlockZ + a_Range; z++) + for (int z = a_BlockPos.z - a_Range + 1; z < a_BlockPos.z + a_Range; z++) { - for (int x = a_BlockX - a_Range + 1; x < a_BlockX + a_Range; x++) + for (int x = a_BlockPos.x - a_Range + 1; x < a_BlockPos.x + a_Range; x++) { blks.emplace_back(x, y, z, E_BLOCK_AIR, static_cast<NIBBLETYPE>(0)); // Use fake blocktype, it will get set later on. } |