summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemBucket.h
diff options
context:
space:
mode:
authorworktycho <work.tycho@gmail.com>2015-05-24 14:44:34 +0200
committerworktycho <work.tycho@gmail.com>2015-05-24 14:44:34 +0200
commitbd95d7bf7bc30532ca48355a715dd37a56892d5e (patch)
tree8823726394c1cc8fba5e85a7b99e956f58bb0446 /src/Items/ItemBucket.h
parentMerge pull request #2130 from SafwatHalaby/easyInstall (diff)
parentFixes #2059 (diff)
downloadcuberite-bd95d7bf7bc30532ca48355a715dd37a56892d5e.tar
cuberite-bd95d7bf7bc30532ca48355a715dd37a56892d5e.tar.gz
cuberite-bd95d7bf7bc30532ca48355a715dd37a56892d5e.tar.bz2
cuberite-bd95d7bf7bc30532ca48355a715dd37a56892d5e.tar.lz
cuberite-bd95d7bf7bc30532ca48355a715dd37a56892d5e.tar.xz
cuberite-bd95d7bf7bc30532ca48355a715dd37a56892d5e.tar.zst
cuberite-bd95d7bf7bc30532ca48355a715dd37a56892d5e.zip
Diffstat (limited to 'src/Items/ItemBucket.h')
-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)
{