summaryrefslogtreecommitdiffstats
path: root/source/Blocks/BlockDirt.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-03 10:52:11 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-03 10:52:11 +0200
commitea2ed2c918bddf773bb8d10298016f4e5309d0b2 (patch)
tree129848747361501cbc2e330e1a33b7f8089f51b2 /source/Blocks/BlockDirt.h
parentsTick: Updated the plugin to work with current code (diff)
downloadcuberite-ea2ed2c918bddf773bb8d10298016f4e5309d0b2.tar
cuberite-ea2ed2c918bddf773bb8d10298016f4e5309d0b2.tar.gz
cuberite-ea2ed2c918bddf773bb8d10298016f4e5309d0b2.tar.bz2
cuberite-ea2ed2c918bddf773bb8d10298016f4e5309d0b2.tar.lz
cuberite-ea2ed2c918bddf773bb8d10298016f4e5309d0b2.tar.xz
cuberite-ea2ed2c918bddf773bb8d10298016f4e5309d0b2.tar.zst
cuberite-ea2ed2c918bddf773bb8d10298016f4e5309d0b2.zip
Diffstat (limited to '')
-rw-r--r--source/Blocks/BlockDirt.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/Blocks/BlockDirt.h b/source/Blocks/BlockDirt.h
index 346815846..b048b6318 100644
--- a/source/Blocks/BlockDirt.h
+++ b/source/Blocks/BlockDirt.h
@@ -14,8 +14,8 @@ class cBlockDirtHandler :
public cBlockHandler
{
public:
- cBlockDirtHandler(BLOCKTYPE a_BlockID)
- : cBlockHandler(a_BlockID)
+ cBlockDirtHandler(BLOCKTYPE a_BlockType)
+ : cBlockHandler(a_BlockType)
{
}
@@ -26,18 +26,18 @@ public:
}
- void OnUpdate(cWorld * a_World, int a_X, int a_Y, int a_Z) override
+ void OnUpdate(cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ) override
{
- if (m_BlockID != E_BLOCK_GRASS)
+ if (m_BlockType != E_BLOCK_GRASS)
{
return;
}
// Grass becomes dirt if there is something on top of it:
- BLOCKTYPE Above = a_World->GetBlock(a_X, a_Y + 1, a_Z);
+ BLOCKTYPE Above = a_World->GetBlock(a_BlockX, a_BlockY + 1, a_BlockZ);
if (!g_BlockTransparent[Above] && !g_BlockOneHitDig[Above])
{
- a_World->FastSetBlock(a_X, a_Y, a_Z, E_BLOCK_DIRT, 0);
+ a_World->FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_DIRT, 0);
return;
}
@@ -51,7 +51,7 @@ public:
BLOCKTYPE DestBlock;
NIBBLETYPE DestMeta;
- a_World->GetBlockTypeMeta(a_X + OfsX, a_Y + OfsY, a_Z + OfsZ, DestBlock, DestMeta);
+ a_World->GetBlockTypeMeta(a_BlockX + OfsX, a_BlockY + OfsY, a_BlockZ + OfsZ, DestBlock, DestMeta);
if(DestBlock != E_BLOCK_DIRT)
{
continue;
@@ -59,10 +59,10 @@ public:
BLOCKTYPE AboveDest;
NIBBLETYPE AboveMeta;
- a_World->GetBlockTypeMeta(a_X + OfsX, a_Y + OfsY + 1, a_Z + OfsZ, AboveDest, AboveMeta);
+ a_World->GetBlockTypeMeta(a_BlockX + OfsX, a_BlockY + OfsY + 1, a_BlockZ + OfsZ, AboveDest, AboveMeta);
if (g_BlockOneHitDig[AboveDest] || g_BlockTransparent[AboveDest])
{
- a_World->FastSetBlock(a_X + OfsX, a_Y + OfsY, a_Z + OfsZ, E_BLOCK_GRASS, 0);
+ a_World->FastSetBlock(a_BlockX + OfsX, a_BlockY + OfsY, a_BlockZ + OfsZ, E_BLOCK_GRASS, 0);
}
} // for i - repeat twice
}