summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authornielsbreu@gmail.com <nielsbreu@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-06-22 12:03:41 +0200
committernielsbreu@gmail.com <nielsbreu@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-06-22 12:03:41 +0200
commitc153a5c6df9a86cc443f356c00c4c0e0bee6453a (patch)
tree6c307d033bb5a1a048676d483cb763552fd09fbd /source
parentTNT changes to primed TNT when powered by redstone. (diff)
downloadcuberite-c153a5c6df9a86cc443f356c00c4c0e0bee6453a.tar
cuberite-c153a5c6df9a86cc443f356c00c4c0e0bee6453a.tar.gz
cuberite-c153a5c6df9a86cc443f356c00c4c0e0bee6453a.tar.bz2
cuberite-c153a5c6df9a86cc443f356c00c4c0e0bee6453a.tar.lz
cuberite-c153a5c6df9a86cc443f356c00c4c0e0bee6453a.tar.xz
cuberite-c153a5c6df9a86cc443f356c00c4c0e0bee6453a.tar.zst
cuberite-c153a5c6df9a86cc443f356c00c4c0e0bee6453a.zip
Diffstat (limited to 'source')
-rw-r--r--source/BlockEntities/DispenserEntity.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/BlockEntities/DispenserEntity.cpp b/source/BlockEntities/DispenserEntity.cpp
index 22fcdd3fc..ab4c8e519 100644
--- a/source/BlockEntities/DispenserEntity.cpp
+++ b/source/BlockEntities/DispenserEntity.cpp
@@ -131,6 +131,22 @@ void cDispenserEntity::DropSpenseFromSlot(cChunk & a_Chunk, int a_SlotNum)
}
break;
}
+
+ case E_ITEM_FLINT_AND_STEEL:
+ {
+ // Spawn fire if the block in front is air.
+ if (DispChunk->GetBlock(DispX, DispY, DispZ) == E_BLOCK_AIR)
+ {
+ DispChunk->SetBlock(DispX, DispY, DispZ, E_BLOCK_FIRE, 0);
+ m_Contents.SetSlot(a_SlotNum, m_Contents.GetSlot(a_SlotNum).m_ItemType, m_Contents.GetSlot(a_SlotNum).m_ItemCount, m_Contents.GetSlot(a_SlotNum).m_ItemDamage + 1);
+ // If the durability has run out destroy the item.
+ if (m_Contents.GetSlot(a_SlotNum).m_ItemDamage > 64)
+ {
+ m_Contents.ChangeSlotCount(a_SlotNum, -1);
+ }
+ }
+ break;
+ }
default:
{