summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBlitz Rakete <blitzrakete@gmail.com>2015-05-21 19:03:51 +0200
committerBlitz Rakete <blitzrakete@gmail.com>2015-05-21 19:03:51 +0200
commite512b7bf8e78b0450a542107e0182ff52169e59a (patch)
tree5902f9ba578df1a4748566136d8035382823fdff /src
parentMerge pull request #2074 from SafwatHalaby/rmUnique (diff)
downloadcuberite-e512b7bf8e78b0450a542107e0182ff52169e59a.tar
cuberite-e512b7bf8e78b0450a542107e0182ff52169e59a.tar.gz
cuberite-e512b7bf8e78b0450a542107e0182ff52169e59a.tar.bz2
cuberite-e512b7bf8e78b0450a542107e0182ff52169e59a.tar.lz
cuberite-e512b7bf8e78b0450a542107e0182ff52169e59a.tar.xz
cuberite-e512b7bf8e78b0450a542107e0182ff52169e59a.tar.zst
cuberite-e512b7bf8e78b0450a542107e0182ff52169e59a.zip
Diffstat (limited to '')
-rw-r--r--src/Items/ItemBucket.h14
1 files changed, 14 insertions, 0 deletions
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)
{