summaryrefslogtreecommitdiffstats
path: root/src/Blocks/ClearMetaOnDrop.h
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-07-14 21:26:36 +0200
committerTycho <work.tycho+git@gmail.com>2014-07-14 21:26:36 +0200
commit1929d16724de6f451c9485076b4091cbc457916c (patch)
tree2ec9a31b02c6224d21fbcdbf9cba8600ef24965c /src/Blocks/ClearMetaOnDrop.h
parentMerge pull request #1177 from mc-server/ChestFix (diff)
downloadcuberite-1929d16724de6f451c9485076b4091cbc457916c.tar
cuberite-1929d16724de6f451c9485076b4091cbc457916c.tar.gz
cuberite-1929d16724de6f451c9485076b4091cbc457916c.tar.bz2
cuberite-1929d16724de6f451c9485076b4091cbc457916c.tar.lz
cuberite-1929d16724de6f451c9485076b4091cbc457916c.tar.xz
cuberite-1929d16724de6f451c9485076b4091cbc457916c.tar.zst
cuberite-1929d16724de6f451c9485076b4091cbc457916c.zip
Diffstat (limited to 'src/Blocks/ClearMetaOnDrop.h')
-rw-r--r--src/Blocks/ClearMetaOnDrop.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Blocks/ClearMetaOnDrop.h b/src/Blocks/ClearMetaOnDrop.h
new file mode 100644
index 000000000..21b987f2c
--- /dev/null
+++ b/src/Blocks/ClearMetaOnDrop.h
@@ -0,0 +1,18 @@
+
+#pragma once
+
+template<class Base>
+class cClearMetaOnDrop : public Base
+{
+public:
+
+ cClearMetaOnDrop(BLOCKTYPE a_BlockType) :
+ Base(a_BlockType)
+ {}
+
+ virtual ~cClearMetaOnDrop() {}
+ virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
+ {
+ a_Pickups.push_back(cItem(this->m_BlockType, 1, 0));
+ }
+};