summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockPlant.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2020-04-17 11:36:37 +0200
committerGitHub <noreply@github.com>2020-04-17 11:36:37 +0200
commit26ac146f41091dc070d8075f5fc9de25b5a22578 (patch)
tree5be089162a23ad2f2822be7b5d5d7cebbb958406 /src/Blocks/BlockPlant.h
parentImplement glowing redstone ore (diff)
downloadcuberite-26ac146f41091dc070d8075f5fc9de25b5a22578.tar
cuberite-26ac146f41091dc070d8075f5fc9de25b5a22578.tar.gz
cuberite-26ac146f41091dc070d8075f5fc9de25b5a22578.tar.bz2
cuberite-26ac146f41091dc070d8075f5fc9de25b5a22578.tar.lz
cuberite-26ac146f41091dc070d8075f5fc9de25b5a22578.tar.xz
cuberite-26ac146f41091dc070d8075f5fc9de25b5a22578.tar.zst
cuberite-26ac146f41091dc070d8075f5fc9de25b5a22578.zip
Diffstat (limited to 'src/Blocks/BlockPlant.h')
-rw-r--r--src/Blocks/BlockPlant.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/Blocks/BlockPlant.h b/src/Blocks/BlockPlant.h
index 589619b26..b0760528c 100644
--- a/src/Blocks/BlockPlant.h
+++ b/src/Blocks/BlockPlant.h
@@ -26,20 +26,25 @@ public:
- virtual void OnUpdate(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cBlockPluginInterface & a_PluginInterface, cChunk & a_Chunk, int a_RelX, int a_RelY, int a_RelZ) override
+ virtual void OnUpdate(
+ cChunkInterface & a_ChunkInterface,
+ cWorldInterface & a_WorldInterface,
+ cBlockPluginInterface & a_PluginInterface,
+ cChunk & a_Chunk,
+ const Vector3i a_RelPos
+ ) override
{
- Vector3i relPos(a_RelX, a_RelY, a_RelZ);
- auto action = CanGrow(a_Chunk, relPos);
- switch (action)
+ auto Action = CanGrow(a_Chunk, a_RelPos);
+ switch (Action)
{
case paGrowth:
{
- Grow(a_Chunk, relPos);
+ Grow(a_Chunk, a_RelPos);
break;
}
case paDeath:
{
- a_ChunkInterface.DigBlock(a_WorldInterface, a_Chunk.RelativeToAbsolute(relPos));
+ a_ChunkInterface.DigBlock(a_WorldInterface, a_Chunk.RelativeToAbsolute(a_RelPos));
break;
}
case paStay: break; // do nothing