summaryrefslogtreecommitdiffstats
path: root/src/Blocks
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-09-12 13:49:23 +0200
committerHowaner <franzi.moos@googlemail.com>2014-09-12 13:49:23 +0200
commit009d9bbe4685383b094ce4bfdc8ed6fbf7bc52d9 (patch)
tree51a3e39710235eb3e68cbaba5e85b084a5c23d58 /src/Blocks
parentMerge branch 'master' into 1.8-Protocol (diff)
parentAdded flint drop and fence gate meta reset. (diff)
downloadcuberite-009d9bbe4685383b094ce4bfdc8ed6fbf7bc52d9.tar
cuberite-009d9bbe4685383b094ce4bfdc8ed6fbf7bc52d9.tar.gz
cuberite-009d9bbe4685383b094ce4bfdc8ed6fbf7bc52d9.tar.bz2
cuberite-009d9bbe4685383b094ce4bfdc8ed6fbf7bc52d9.tar.lz
cuberite-009d9bbe4685383b094ce4bfdc8ed6fbf7bc52d9.tar.xz
cuberite-009d9bbe4685383b094ce4bfdc8ed6fbf7bc52d9.tar.zst
cuberite-009d9bbe4685383b094ce4bfdc8ed6fbf7bc52d9.zip
Diffstat (limited to 'src/Blocks')
-rw-r--r--src/Blocks/BlockFenceGate.h6
-rw-r--r--src/Blocks/BlockGravel.h11
2 files changed, 17 insertions, 0 deletions
diff --git a/src/Blocks/BlockFenceGate.h b/src/Blocks/BlockFenceGate.h
index ae99a4f94..3041dd46c 100644
--- a/src/Blocks/BlockFenceGate.h
+++ b/src/Blocks/BlockFenceGate.h
@@ -17,6 +17,12 @@ public:
}
+ virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
+ {
+ a_Pickups.Add(E_BLOCK_FENCE_GATE, 1, 0); // Reset meta to zero
+ }
+
+
virtual bool GetPlacementBlockTypeMeta(
cChunkInterface & a_ChunkInterface, cPlayer * a_Player,
int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace,
diff --git a/src/Blocks/BlockGravel.h b/src/Blocks/BlockGravel.h
index 717bd5f5f..3a9fbd170 100644
--- a/src/Blocks/BlockGravel.h
+++ b/src/Blocks/BlockGravel.h
@@ -15,6 +15,17 @@ public:
: cBlockHandler(a_BlockType)
{
}
+
+ virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
+ {
+ a_Pickups.Add(E_BLOCK_GRAVEL, 1, 0);
+
+ cFastRandom Random;
+ if (Random.NextInt(30) == 0)
+ {
+ a_Pickups.Add(E_ITEM_FLINT, 1, 0);
+ }
+ }
} ;