summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockPiston.cpp
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-02-01 15:01:13 +0100
committerTycho <work.tycho+git@gmail.com>2014-02-01 15:01:13 +0100
commitcf3b4ec226034b006fd646b395f4e8a609f6f378 (patch)
treee8c88b1d734660b2b7640d6cf31a62729e05b92c /src/Blocks/BlockPiston.cpp
parentChanged pointers to references (diff)
downloadcuberite-cf3b4ec226034b006fd646b395f4e8a609f6f378.tar
cuberite-cf3b4ec226034b006fd646b395f4e8a609f6f378.tar.gz
cuberite-cf3b4ec226034b006fd646b395f4e8a609f6f378.tar.bz2
cuberite-cf3b4ec226034b006fd646b395f4e8a609f6f378.tar.lz
cuberite-cf3b4ec226034b006fd646b395f4e8a609f6f378.tar.xz
cuberite-cf3b4ec226034b006fd646b395f4e8a609f6f378.tar.zst
cuberite-cf3b4ec226034b006fd646b395f4e8a609f6f378.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockPiston.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Blocks/BlockPiston.cpp b/src/Blocks/BlockPiston.cpp
index 43afda45a..e960d23e4 100644
--- a/src/Blocks/BlockPiston.cpp
+++ b/src/Blocks/BlockPiston.cpp
@@ -80,19 +80,19 @@ cBlockPistonHeadHandler::cBlockPistonHeadHandler(void) :
-void cBlockPistonHeadHandler::OnDestroyedByPlayer(cWorld * a_World, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ)
+void cBlockPistonHeadHandler::OnDestroyedByPlayer(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ)
{
- NIBBLETYPE OldMeta = a_World->GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ);
+ NIBBLETYPE OldMeta = a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ);
int newX = a_BlockX;
int newY = a_BlockY;
int newZ = a_BlockZ;
AddPistonDir(newX, newY, newZ, OldMeta & ~(8), -1);
- BLOCKTYPE Block = a_World->GetBlock(newX, newY, newZ);
+ BLOCKTYPE Block = a_ChunkInterface.GetBlock(newX, newY, newZ);
if ((Block == E_BLOCK_STICKY_PISTON) || (Block == E_BLOCK_PISTON))
{
- a_World->DigBlock(newX, newY, newZ);
+ a_ChunkInterface.DigBlock(a_WorldInterface, newX, newY, newZ);
if (a_Player->IsGameModeCreative())
{
return; // No pickups if creative
@@ -100,7 +100,7 @@ void cBlockPistonHeadHandler::OnDestroyedByPlayer(cWorld * a_World, cPlayer * a_
cItems Pickups;
Pickups.push_back(cItem(Block, 1));
- a_World->SpawnItemPickups(Pickups, a_BlockX + 0.5, a_BlockY + 0.5, a_BlockZ + 0.5);
+ a_WorldInterface.SpawnItemPickups(Pickups, a_BlockX + 0.5, a_BlockY + 0.5, a_BlockZ + 0.5);
}
}