summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockBed.cpp
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-01-26 15:20:39 +0100
committerTycho <work.tycho+git@gmail.com>2014-01-26 15:20:39 +0100
commit14e48ccb4bbad6f43121dc27f042083cda160f45 (patch)
tree96df772125eb96f79bf76226e5df91b4e2b99696 /src/Blocks/BlockBed.cpp
parentAdded support for overide in c++11 supporting varients of gcc/clang (diff)
downloadcuberite-14e48ccb4bbad6f43121dc27f042083cda160f45.tar
cuberite-14e48ccb4bbad6f43121dc27f042083cda160f45.tar.gz
cuberite-14e48ccb4bbad6f43121dc27f042083cda160f45.tar.bz2
cuberite-14e48ccb4bbad6f43121dc27f042083cda160f45.tar.lz
cuberite-14e48ccb4bbad6f43121dc27f042083cda160f45.tar.xz
cuberite-14e48ccb4bbad6f43121dc27f042083cda160f45.tar.zst
cuberite-14e48ccb4bbad6f43121dc27f042083cda160f45.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockBed.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Blocks/BlockBed.cpp b/src/Blocks/BlockBed.cpp
index 9c6f15698..02cdd58c7 100644
--- a/src/Blocks/BlockBed.cpp
+++ b/src/Blocks/BlockBed.cpp
@@ -6,7 +6,7 @@
void cBlockBedHandler::OnPlacedByPlayer(
- cChunkInterface * a_ChunkInterface, cPlayer * a_Player,
+ cChunkInterface * a_ChunkInterface, cWorldInterface * a_WorldInterface, cPlayer * a_Player,
int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace,
int a_CursorX, int a_CursorY, int a_CursorZ,
BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta
@@ -15,7 +15,7 @@ void cBlockBedHandler::OnPlacedByPlayer(
if (a_BlockMeta < 8)
{
Vector3i Direction = MetaDataToDirection(a_BlockMeta);
- a_ChunkInterface->SetBlock(a_BlockX + Direction.x, a_BlockY, a_BlockZ + Direction.z, E_BLOCK_BED, a_BlockMeta | 0x8);
+ a_ChunkInterface->SetBlock(a_WorldInterface,a_BlockX + Direction.x, a_BlockY, a_BlockZ + Direction.z, E_BLOCK_BED, a_BlockMeta | 0x8);
}
}
@@ -56,7 +56,7 @@ void cBlockBedHandler::OnUse(cChunkInterface * a_ChunkInterface, cWorldInterface
if (a_WorldInterface->GetDimension() != dimOverworld)
{
Vector3i Coords(a_BlockX, a_BlockY, a_BlockZ);
- a_ChunkInterface->DoExplosionAt(5, a_BlockX, a_BlockY, a_BlockZ, true, esBed, &Coords);
+ a_WorldInterface->DoExplosionAt(5, a_BlockX, a_BlockY, a_BlockZ, true, esBed, &Coords);
}
else
{
@@ -66,7 +66,7 @@ void cBlockBedHandler::OnUse(cChunkInterface * a_ChunkInterface, cWorldInterface
if (Meta & 0x8)
{
// Is pillow
- a_WorldInterface->BroadcastUseBed(*a_Player, a_BlockX, a_BlockY, a_BlockZ);
+ a_WorldInterface->GetBroadcastManager()->BroadcastUseBed(*a_Player, a_BlockX, a_BlockY, a_BlockZ);
}
else
{
@@ -74,7 +74,7 @@ void cBlockBedHandler::OnUse(cChunkInterface * a_ChunkInterface, cWorldInterface
Vector3i Direction = MetaDataToDirection( Meta & 0x7 );
if (a_ChunkInterface->GetBlock(a_BlockX + Direction.x, a_BlockY, a_BlockZ + Direction.z) == E_BLOCK_BED) // Must always use pillow location for sleeping
{
- a_WorldInterface->BroadcastUseBed(*a_Player, a_BlockX + Direction.x, a_BlockY, a_BlockZ + Direction.z);
+ a_WorldInterface->GetBroadcastManager()->BroadcastUseBed(*a_Player, a_BlockX + Direction.x, a_BlockY, a_BlockZ + Direction.z);
}
}
} else {