diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-08-23 19:13:54 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-08-23 19:13:54 +0200 |
commit | 52d8da6ebe30be046566ba6a34099ba5ebb843a1 (patch) | |
tree | 2d56b64d200a4ed7526bfcfe08a9a52471b6cf1f | |
parent | Changed comments to be more accurate (diff) | |
download | cuberite-52d8da6ebe30be046566ba6a34099ba5ebb843a1.tar cuberite-52d8da6ebe30be046566ba6a34099ba5ebb843a1.tar.gz cuberite-52d8da6ebe30be046566ba6a34099ba5ebb843a1.tar.bz2 cuberite-52d8da6ebe30be046566ba6a34099ba5ebb843a1.tar.lz cuberite-52d8da6ebe30be046566ba6a34099ba5ebb843a1.tar.xz cuberite-52d8da6ebe30be046566ba6a34099ba5ebb843a1.tar.zst cuberite-52d8da6ebe30be046566ba6a34099ba5ebb843a1.zip |
-rw-r--r-- | source/Items/ItemLighter.h | 9 |
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; + } } } |