summaryrefslogtreecommitdiffstats
path: root/source/Items/ItemLighter.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-25 16:11:19 +0200
committermadmaxoft <github@xoft.cz>2013-08-25 16:11:19 +0200
commit104a31e23d146fe69fed78932e442f4894af2a86 (patch)
treeb9b2f6ffd83d1fba85361e66955673bf322d94e8 /source/Items/ItemLighter.h
parentFixed logging in cTracer. (diff)
parentFixed iron door opening by hand (diff)
downloadcuberite-104a31e23d146fe69fed78932e442f4894af2a86.tar
cuberite-104a31e23d146fe69fed78932e442f4894af2a86.tar.gz
cuberite-104a31e23d146fe69fed78932e442f4894af2a86.tar.bz2
cuberite-104a31e23d146fe69fed78932e442f4894af2a86.tar.lz
cuberite-104a31e23d146fe69fed78932e442f4894af2a86.tar.xz
cuberite-104a31e23d146fe69fed78932e442f4894af2a86.tar.zst
cuberite-104a31e23d146fe69fed78932e442f4894af2a86.zip
Diffstat (limited to 'source/Items/ItemLighter.h')
-rw-r--r--source/Items/ItemLighter.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/Items/ItemLighter.h b/source/Items/ItemLighter.h
index 39534c7b1..4281a2d0c 100644
--- a/source/Items/ItemLighter.h
+++ b/source/Items/ItemLighter.h
@@ -40,10 +40,13 @@ public:
}
default:
{
- // Light a fire next to the block:
+ // Light a fire next to/on top of the block if air:
AddFaceDirection(a_BlockX, a_BlockY, a_BlockZ, a_BlockFace);
- a_World->SetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_FIRE, 0);
- break;
+ if (a_World->GetBlock(a_BlockX, a_BlockY, a_BlockZ) == E_BLOCK_AIR)
+ {
+ a_World->SetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_FIRE, 0);
+ break;
+ }
}
}