diff options
author | 12xx12 <44411062+12xx12@users.noreply.github.com> | 2020-09-24 14:53:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-24 14:53:49 +0200 |
commit | b5410c718ece106a3b25fab4a5c37815715df275 (patch) | |
tree | 16db80242c18cc62999479b1f650da1d91c46248 /src/Blocks/BlockPackedIce.h | |
parent | TABS OUT OF BED! TABS IN THE CORRIDORS! (diff) | |
download | cuberite-b5410c718ece106a3b25fab4a5c37815715df275.tar cuberite-b5410c718ece106a3b25fab4a5c37815715df275.tar.gz cuberite-b5410c718ece106a3b25fab4a5c37815715df275.tar.bz2 cuberite-b5410c718ece106a3b25fab4a5c37815715df275.tar.lz cuberite-b5410c718ece106a3b25fab4a5c37815715df275.tar.xz cuberite-b5410c718ece106a3b25fab4a5c37815715df275.tar.zst cuberite-b5410c718ece106a3b25fab4a5c37815715df275.zip |
Diffstat (limited to 'src/Blocks/BlockPackedIce.h')
-rw-r--r-- | src/Blocks/BlockPackedIce.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/Blocks/BlockPackedIce.h b/src/Blocks/BlockPackedIce.h new file mode 100644 index 000000000..e344b2a19 --- /dev/null +++ b/src/Blocks/BlockPackedIce.h @@ -0,0 +1,37 @@ + +#pragma once + +#include "BlockHandler.h" + + + + + +class cBlockPackedIceHandler : + public cBlockHandler +{ + using Super = cBlockHandler; + +public: + + using Super::Super; + +private: + + virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, const cEntity * a_Digger, const cItem * a_Tool) const override + { + // Only drop self when using silk-touch: + if (ToolHasSilkTouch(a_Tool)) + { + return cItem(m_BlockType); + } + + return {}; + } + + virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) const override + { + UNUSED(a_Meta); + return 5; + } +} ; |