diff options
author | madmaxoft <github@xoft.cz> | 2013-08-25 17:06:51 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-08-25 17:06:51 +0200 |
commit | 83811b69292bff0ef4b24087a4a4d3e523b0076a (patch) | |
tree | 50bf797896f5df82af4cfcd642759d005c598044 /source/Items/ItemLighter.h | |
parent | Projectile entities get saved into MCA files (diff) | |
parent | Reduced LeakFinder's stack buffers to half. (diff) | |
download | cuberite-83811b69292bff0ef4b24087a4a4d3e523b0076a.tar cuberite-83811b69292bff0ef4b24087a4a4d3e523b0076a.tar.gz cuberite-83811b69292bff0ef4b24087a4a4d3e523b0076a.tar.bz2 cuberite-83811b69292bff0ef4b24087a4a4d3e523b0076a.tar.lz cuberite-83811b69292bff0ef4b24087a4a4d3e523b0076a.tar.xz cuberite-83811b69292bff0ef4b24087a4a4d3e523b0076a.tar.zst cuberite-83811b69292bff0ef4b24087a4a4d3e523b0076a.zip |
Diffstat (limited to 'source/Items/ItemLighter.h')
-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; + } } } |