summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodarg <git@rgrado.nl>2022-02-08 16:00:05 +0100
committerAlexander Harkness <me@bearbin.net>2022-02-09 09:45:25 +0100
commit350c801b41e09b7a1edc772e91ef484b2ca958bc (patch)
treebf982881aba74d81b73160fc4344274cf5fbd1d2
parentUpdate BlockBigFlower.h (diff)
downloadcuberite-350c801b41e09b7a1edc772e91ef484b2ca958bc.tar
cuberite-350c801b41e09b7a1edc772e91ef484b2ca958bc.tar.gz
cuberite-350c801b41e09b7a1edc772e91ef484b2ca958bc.tar.bz2
cuberite-350c801b41e09b7a1edc772e91ef484b2ca958bc.tar.lz
cuberite-350c801b41e09b7a1edc772e91ef484b2ca958bc.tar.xz
cuberite-350c801b41e09b7a1edc772e91ef484b2ca958bc.tar.zst
cuberite-350c801b41e09b7a1edc772e91ef484b2ca958bc.zip
-rw-r--r--src/Blocks/BlockBigFlower.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Blocks/BlockBigFlower.h b/src/Blocks/BlockBigFlower.h
index fa15c3aa6..c6612032f 100644
--- a/src/Blocks/BlockBigFlower.h
+++ b/src/Blocks/BlockBigFlower.h
@@ -49,6 +49,10 @@ private:
virtual cItems ConvertToPickups(const NIBBLETYPE a_BlockMeta, const cItem * const a_Tool) const override
{
+ if (IsMetaTopPart(a_BlockMeta))
+ {
+ return {};
+ }
// With shears, drop self (even tall grass and fern):
if ((a_Tool != nullptr) && (a_Tool->m_ItemType == E_ITEM_SHEARS))
@@ -121,7 +125,11 @@ private:
auto lowerPartPos = a_BlockPos - Vector3i(0, 1, 0);
if (a_ChunkInterface.GetBlock(lowerPartPos) == a_OldBlockType)
{
- a_ChunkInterface.SetBlock(lowerPartPos, E_BLOCK_AIR, 0);
+ if (a_Digger->IsPlayer() && (static_cast<const cPlayer *>(a_Digger))->IsGameModeCreative()) {
+ a_ChunkInterface.SetBlock(lowerPartPos, E_BLOCK_AIR, 0);
+ } else {
+ a_ChunkInterface.DropBlockAsPickups(lowerPartPos);
+ }
}
}
else