summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockHandler.cpp
diff options
context:
space:
mode:
authorworktycho <work.tycho@gmail.com>2015-12-14 21:31:33 +0100
committerworktycho <work.tycho@gmail.com>2015-12-14 21:31:33 +0100
commit1e5ba8a1bb887808961e9c17dfd44af6bbbd2a84 (patch)
tree8adc41d291bdac3c83eb0c56933e7a29cd1c3942 /src/Blocks/BlockHandler.cpp
parentMerge pull request #2744 from cuberite/HopperMetaStrip (diff)
parentblockheight mechanism (diff)
downloadcuberite-1e5ba8a1bb887808961e9c17dfd44af6bbbd2a84.tar
cuberite-1e5ba8a1bb887808961e9c17dfd44af6bbbd2a84.tar.gz
cuberite-1e5ba8a1bb887808961e9c17dfd44af6bbbd2a84.tar.bz2
cuberite-1e5ba8a1bb887808961e9c17dfd44af6bbbd2a84.tar.lz
cuberite-1e5ba8a1bb887808961e9c17dfd44af6bbbd2a84.tar.xz
cuberite-1e5ba8a1bb887808961e9c17dfd44af6bbbd2a84.tar.zst
cuberite-1e5ba8a1bb887808961e9c17dfd44af6bbbd2a84.zip
Diffstat (limited to 'src/Blocks/BlockHandler.cpp')
-rw-r--r--src/Blocks/BlockHandler.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Blocks/BlockHandler.cpp b/src/Blocks/BlockHandler.cpp
index bb479db53..0ad0e2242 100644
--- a/src/Blocks/BlockHandler.cpp
+++ b/src/Blocks/BlockHandler.cpp
@@ -553,6 +553,16 @@ bool cBlockHandler::DoesDropOnUnsuitable(void)
+/* default functionality: only test for height, since we assume full voxels with varying height */
+bool cBlockHandler::IsInsideBlock(const Vector3d & a_Position, const BLOCKTYPE a_BlockType, const NIBBLETYPE a_BlockMeta)
+{
+ return a_Position.y < cBlockInfo::GetBlockHeight(a_BlockType);
+}
+
+
+
+
+
void cBlockHandler::Check(cChunkInterface & a_ChunkInterface, cBlockPluginInterface & a_PluginInterface, int a_RelX, int a_RelY, int a_RelZ, cChunk & a_Chunk)
{
if (!CanBeAt(a_ChunkInterface, a_RelX, a_RelY, a_RelZ, a_Chunk))