summaryrefslogtreecommitdiffstats
path: root/source/Blocks/BlockBed.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-09 14:58:43 +0200
committermadmaxoft <github@xoft.cz>2013-08-09 14:58:43 +0200
commitd4a3c451c43454176af39aad5cede5281615a6ad (patch)
treea3dc0500db414ed3b03ca5b983353400dcae4bcd /source/Blocks/BlockBed.cpp
parentMerge pull request #52 from ravenscroftj/feature/food (diff)
downloadcuberite-d4a3c451c43454176af39aad5cede5281615a6ad.tar
cuberite-d4a3c451c43454176af39aad5cede5281615a6ad.tar.gz
cuberite-d4a3c451c43454176af39aad5cede5281615a6ad.tar.bz2
cuberite-d4a3c451c43454176af39aad5cede5281615a6ad.tar.lz
cuberite-d4a3c451c43454176af39aad5cede5281615a6ad.tar.xz
cuberite-d4a3c451c43454176af39aad5cede5281615a6ad.tar.zst
cuberite-d4a3c451c43454176af39aad5cede5281615a6ad.zip
Diffstat (limited to '')
-rw-r--r--source/Blocks/BlockBed.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/Blocks/BlockBed.cpp b/source/Blocks/BlockBed.cpp
index 2ae6980ac..f5e9db88d 100644
--- a/source/Blocks/BlockBed.cpp
+++ b/source/Blocks/BlockBed.cpp
@@ -53,10 +53,13 @@ void cBlockBedHandler::OnDestroyed(cWorld * a_World, int a_BlockX, int a_BlockY,
void cBlockBedHandler::OnUse(cWorld *a_World, cPlayer *a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ)
{
- if (a_World->GetDimension() != 0)
+ if (a_World->GetDimension() != dimOverworld)
+ {
+ Vector3i Coords(a_BlockX, a_BlockY, a_BlockZ);
+ a_World->DoExplosiontAt(5, a_BlockX, a_BlockY, a_BlockZ, true, esBed, &Coords);
+ }
+ else
{
- a_World->DoExplosiontAt(5, a_BlockX, a_BlockY, a_BlockZ);
- } else {
if (a_World->GetTimeOfDay() > 13000)
{
NIBBLETYPE Meta = a_World->GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ);