summaryrefslogtreecommitdiffstats
path: root/src/Blocks
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-03-07 19:42:13 +0100
committerTycho <work.tycho+git@gmail.com>2014-03-07 19:42:13 +0100
commit7f389522ef1f40e847a4a7828ad55e50c0151b00 (patch)
tree0846dcf86adfca98b823a8888224f630de5bf9dd /src/Blocks
parentFixed warnings (diff)
downloadcuberite-7f389522ef1f40e847a4a7828ad55e50c0151b00.tar
cuberite-7f389522ef1f40e847a4a7828ad55e50c0151b00.tar.gz
cuberite-7f389522ef1f40e847a4a7828ad55e50c0151b00.tar.bz2
cuberite-7f389522ef1f40e847a4a7828ad55e50c0151b00.tar.lz
cuberite-7f389522ef1f40e847a4a7828ad55e50c0151b00.tar.xz
cuberite-7f389522ef1f40e847a4a7828ad55e50c0151b00.tar.zst
cuberite-7f389522ef1f40e847a4a7828ad55e50c0151b00.zip
Diffstat (limited to 'src/Blocks')
-rw-r--r--src/Blocks/BlockStairs.h8
-rw-r--r--src/Blocks/BlockVine.h16
2 files changed, 21 insertions, 3 deletions
diff --git a/src/Blocks/BlockStairs.h b/src/Blocks/BlockStairs.h
index c1887bc46..93035b3b1 100644
--- a/src/Blocks/BlockStairs.h
+++ b/src/Blocks/BlockStairs.h
@@ -25,6 +25,14 @@ public:
BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta
) override
{
+ UNUSED(a_ChunkInterface);
+ UNUSED(a_BlockX);
+ UNUSED(a_BlockY);
+ UNUSED(a_BlockZ);
+ UNUSED(a_CursorX);
+ UNUSED(a_CursorY);
+ UNUSED(a_CursorZ);
+ UNUSED(a_BlockMeta);
a_BlockType = m_BlockType;
a_BlockMeta = RotationToMetaData(a_Player->GetYaw());
switch (a_BlockFace)
diff --git a/src/Blocks/BlockVine.h b/src/Blocks/BlockVine.h
index d8c114284..0934a451b 100644
--- a/src/Blocks/BlockVine.h
+++ b/src/Blocks/BlockVine.h
@@ -24,6 +24,10 @@ public:
BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta
) override
{
+ UNUSED(a_Player);
+ UNUSED(a_CursorX);
+ UNUSED(a_CursorY);
+ UNUSED(a_CursorZ);
// TODO: Disallow placement where the vine doesn't attach to something properly
BLOCKTYPE BlockType = 0;
NIBBLETYPE BlockMeta;
@@ -162,11 +166,17 @@ public:
return false;
}
- virtual void OnUpdate(cWorld * a_World, int X, int Y, int Z)
+ virtual void OnUpdate(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cBlockPluginInterface & a_BlockPluginInterface, cChunk & a_Chunk, int a_RelX, int a_RelY, int a_RelZ)
{
- if (a_World->GetBlock(X, Y - 1, Z) == E_BLOCK_AIR)
+ UNUSED(a_ChunkInterface);
+ UNUSED(a_WorldInterface);
+ UNUSED(a_BlockPluginInterface);
+
+ BLOCKTYPE Block;
+ a_Chunk.UnboundedRelGetBlockType(a_RelX, a_RelY - 1, a_RelZ, Block);
+ if (Block == E_BLOCK_AIR)
{
- a_World->SetBlock(X, Y - 1, Z, E_BLOCK_VINES, a_World->GetBlockMeta(X, Y, Z));
+ a_Chunk.UnboundedRelSetBlock(a_RelX, a_RelY - 1, a_RelZ, E_BLOCK_VINES, a_Chunk.GetMeta(a_RelX, a_RelY, a_RelZ));
}
}