summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-08-23 19:13:54 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-08-23 19:13:54 +0200
commit52d8da6ebe30be046566ba6a34099ba5ebb843a1 (patch)
tree2d56b64d200a4ed7526bfcfe08a9a52471b6cf1f /source
parentChanged comments to be more accurate (diff)
downloadcuberite-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
Diffstat (limited to '')
-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;
+ }
}
}