summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockVine.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Blocks/BlockVine.h')
-rw-r--r--src/Blocks/BlockVine.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/Blocks/BlockVine.h b/src/Blocks/BlockVine.h
index 68e6e2ddc..25b6efe47 100644
--- a/src/Blocks/BlockVine.h
+++ b/src/Blocks/BlockVine.h
@@ -162,12 +162,12 @@ public:
- virtual void Check(
- cChunkInterface & a_ChunkInterface, cBlockPluginInterface & a_PluginInterface,
- Vector3i a_RelPos,
- cChunk & a_Chunk
- ) override
+ virtual void OnNeighborChanged(cChunkInterface & a_ChunkInterface, Vector3i a_BlockPos, eBlockFace a_WhichNeighbor) override
{
+ a_ChunkInterface.DoWithChunkAt(a_BlockPos, [&](cChunk & a_Chunk)
+ {
+
+ const auto a_RelPos = a_Chunk.AbsoluteToRelative(a_BlockPos);
NIBBLETYPE CurMeta = a_Chunk.GetMeta(a_RelPos);
NIBBLETYPE MaxMeta = GetMaxMeta(a_Chunk, a_RelPos);
@@ -190,14 +190,13 @@ public:
a_ChunkInterface.DropBlockAsPickups(a_Chunk.RelativeToAbsolute(a_RelPos));
}
a_Chunk.SetBlock(a_RelPos, E_BLOCK_AIR, 0);
- return;
+ return false;
}
a_Chunk.SetBlock(a_RelPos, m_BlockType, Common);
}
- else
- {
- a_Chunk.GetWorld()->GetSimulatorManager()->WakeUp(a_Chunk, a_RelPos);
- }
+
+ return false;
+ });
}