diff options
author | Alexander Harkness <me@bearbin.net> | 2020-04-08 00:28:51 +0200 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2020-04-10 15:07:16 +0200 |
commit | 48ccd93426a1130dcec3555638551472484754e2 (patch) | |
tree | 410fadf214dc1587f319288fad36c1e232047828 /src/Blocks/BlockGlazedTerracotta.h | |
parent | Correct Black Glazed Terracotta block handler (diff) | |
download | cuberite-48ccd93426a1130dcec3555638551472484754e2.tar cuberite-48ccd93426a1130dcec3555638551472484754e2.tar.gz cuberite-48ccd93426a1130dcec3555638551472484754e2.tar.bz2 cuberite-48ccd93426a1130dcec3555638551472484754e2.tar.lz cuberite-48ccd93426a1130dcec3555638551472484754e2.tar.xz cuberite-48ccd93426a1130dcec3555638551472484754e2.tar.zst cuberite-48ccd93426a1130dcec3555638551472484754e2.zip |
Diffstat (limited to 'src/Blocks/BlockGlazedTerracotta.h')
-rw-r--r-- | src/Blocks/BlockGlazedTerracotta.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/Blocks/BlockGlazedTerracotta.h b/src/Blocks/BlockGlazedTerracotta.h new file mode 100644 index 000000000..380c3c923 --- /dev/null +++ b/src/Blocks/BlockGlazedTerracotta.h @@ -0,0 +1,34 @@ + +#pragma once + +#include "BlockHandler.h" +#include "Mixins.h" + + +class cBlockGlazedTerracottaHandler: + public cClearMetaOnDrop<cBlockHandler> +{ + using super = cClearMetaOnDrop<cBlockHandler>; + +public: + + cBlockGlazedTerracottaHandler(BLOCKTYPE a_BlockType) : super(a_BlockType) + { + } + + virtual bool GetPlacementBlockTypeMeta( + cChunkInterface & a_ChunkInterface, cPlayer & a_Player, + int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, + int a_CursorX, int a_CursorY, int a_CursorZ, + BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta + ) override + { + a_BlockType = m_BlockType; + + // FIXME: Do not use cPiston class for furnace placement! + a_BlockMeta = cBlockPistonHandler::RotationPitchToMetaData(a_Player.GetYaw(), 0); + + return true; + } + +}; |