summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemBucket.h
diff options
context:
space:
mode:
authorMat <mail@mathias.is>2019-12-30 00:54:37 +0100
committerGitHub <noreply@github.com>2019-12-30 00:54:37 +0100
commit5074527d2c5beb9a022f58468071434fbf7fb694 (patch)
tree9dfee4e7f6c68e573b15817b3265fa9f19e70441 /src/Items/ItemBucket.h
parentCMake: Fix builds in folders with spaces (diff)
downloadcuberite-5074527d2c5beb9a022f58468071434fbf7fb694.tar
cuberite-5074527d2c5beb9a022f58468071434fbf7fb694.tar.gz
cuberite-5074527d2c5beb9a022f58468071434fbf7fb694.tar.bz2
cuberite-5074527d2c5beb9a022f58468071434fbf7fb694.tar.lz
cuberite-5074527d2c5beb9a022f58468071434fbf7fb694.tar.xz
cuberite-5074527d2c5beb9a022f58468071434fbf7fb694.tar.zst
cuberite-5074527d2c5beb9a022f58468071434fbf7fb694.zip
Diffstat (limited to 'src/Items/ItemBucket.h')
-rw-r--r--src/Items/ItemBucket.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Items/ItemBucket.h b/src/Items/ItemBucket.h
index 36caf667b..487b66c8f 100644
--- a/src/Items/ItemBucket.h
+++ b/src/Items/ItemBucket.h
@@ -46,6 +46,12 @@ public:
bool ScoopUpFluid(cWorld * a_World, cPlayer * a_Player, const cItem & a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace)
{
+ // Players can't pick up fluid while in adventure mode.
+ if (a_Player->IsGameModeAdventure())
+ {
+ return false;
+ }
+
if (a_BlockFace != BLOCK_FACE_NONE)
{
return false;
@@ -121,6 +127,12 @@ public:
int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, BLOCKTYPE a_FluidBlock
)
{
+ // Players can't place fluid while in adventure mode.
+ if (a_Player->IsGameModeAdventure())
+ {
+ return false;
+ }
+
if (a_BlockFace != BLOCK_FACE_NONE)
{
return false;