diff options
author | tycho <work.tycho@gmail.com> | 2015-05-24 18:27:05 +0200 |
---|---|---|
committer | tycho <work.tycho@gmail.com> | 2015-05-24 18:27:05 +0200 |
commit | a6ccee594822bc2da5fcf1df9159d54b4040c155 (patch) | |
tree | 232b6454e74d8730853a7e29ac3d535dddc4ddaa /src/Items | |
parent | Fix other clang 3.6 commit (diff) | |
parent | Merge pull request #2114 from cengizIO/master (diff) | |
download | cuberite-a6ccee594822bc2da5fcf1df9159d54b4040c155.tar cuberite-a6ccee594822bc2da5fcf1df9159d54b4040c155.tar.gz cuberite-a6ccee594822bc2da5fcf1df9159d54b4040c155.tar.bz2 cuberite-a6ccee594822bc2da5fcf1df9159d54b4040c155.tar.lz cuberite-a6ccee594822bc2da5fcf1df9159d54b4040c155.tar.xz cuberite-a6ccee594822bc2da5fcf1df9159d54b4040c155.tar.zst cuberite-a6ccee594822bc2da5fcf1df9159d54b4040c155.zip |
Diffstat (limited to 'src/Items')
-rw-r--r-- | src/Items/ItemBucket.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Items/ItemBucket.h b/src/Items/ItemBucket.h index 1dbdfd7bc..78a5e3744 100644 --- a/src/Items/ItemBucket.h +++ b/src/Items/ItemBucket.h @@ -80,6 +80,13 @@ public: return false; } + // Check to see if destination block is too far away + // Reach Distance Multiplayer = 5 Blocks + if ((BlockPos.x - a_Player->GetPosX() > 5) || (BlockPos.z - a_Player->GetPosZ() > 5)) + { + return false; + } + // Remove water / lava block (unless plugins disagree) if (!a_Player->PlaceBlock(BlockPos.x, BlockPos.y, BlockPos.z, E_BLOCK_AIR, 0)) { @@ -126,6 +133,13 @@ public: { return false; } + + // Check to see if destination block is too far away + // Reach Distance Multiplayer = 5 Blocks + if ((BlockPos.x - a_Player->GetPosX() > 5) || (BlockPos.z - a_Player->GetPosZ() > 5)) + { + return false; + } if (a_Player->GetGameMode() != gmCreative) { |