summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2014-09-29 20:38:15 +0200
committerAlexander Harkness <me@bearbin.net>2014-09-29 20:38:15 +0200
commit90836890400dc13a999d18b049845caa655d2443 (patch)
tree1b73eb451dbfc9e5d98026513e5c15889c9c1334
parentMerge pull request #1479 from SphinxC0re/master (diff)
parentBlockStone.h: fix the codestyle (diff)
downloadcuberite-90836890400dc13a999d18b049845caa655d2443.tar
cuberite-90836890400dc13a999d18b049845caa655d2443.tar.gz
cuberite-90836890400dc13a999d18b049845caa655d2443.tar.bz2
cuberite-90836890400dc13a999d18b049845caa655d2443.tar.lz
cuberite-90836890400dc13a999d18b049845caa655d2443.tar.xz
cuberite-90836890400dc13a999d18b049845caa655d2443.tar.zst
cuberite-90836890400dc13a999d18b049845caa655d2443.zip
-rw-r--r--src/BlockID.h6
-rw-r--r--src/Blocks/BlockStone.h11
2 files changed, 14 insertions, 3 deletions
diff --git a/src/BlockID.h b/src/BlockID.h
index 45e71d85d..9a8830710 100644
--- a/src/BlockID.h
+++ b/src/BlockID.h
@@ -652,6 +652,12 @@ enum
E_META_STAINED_GLASS_PANE_RED = 14,
E_META_STAINED_GLASS_PANE_BLACK = 15,
+ // E_BLOCK_STONE metas:
+ E_META_STONE = 0,
+ E_META_STONE_GRANITE = 1,
+ E_META_STONE_DIORITE = 3,
+ E_META_STONE_ANDESITE = 5,
+
// E_BLOCK_STONE_SLAB metas:
E_META_STONE_SLAB_STONE = 0,
E_META_STONE_SLAB_SANDSTONE = 1,
diff --git a/src/Blocks/BlockStone.h b/src/Blocks/BlockStone.h
index cd5230f49..2e7801f8e 100644
--- a/src/Blocks/BlockStone.h
+++ b/src/Blocks/BlockStone.h
@@ -2,7 +2,7 @@
#pragma once
#include "BlockHandler.h"
-
+#include "BlockID.h"
@@ -18,9 +18,14 @@ public:
virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
{
- a_Pickups.push_back(cItem(E_BLOCK_COBBLESTONE, 1, 0));
+ if(a_BlockMeta == E_META_STONE)
+ {
+ a_Pickups.push_back(cItem(E_BLOCK_COBBLESTONE, 1, 0));
+ return;
+ }
+ a_Pickups.push_back(cItem(E_BLOCK_STONE, 1, a_BlockMeta));
}
-} ;
+};