From e512b7bf8e78b0450a542107e0182ff52169e59a Mon Sep 17 00:00:00 2001 From: Blitz Rakete Date: Thu, 21 May 2015 19:03:51 +0200 Subject: Fixes #2059 --- src/Items/ItemBucket.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Items/ItemBucket.h b/src/Items/ItemBucket.h index 015720415..45b4030a3 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) { -- cgit v1.2.3