1
0

Dispensers spawn fire if it has Flint and steel.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1619 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
nielsbreu@gmail.com 2013-06-22 10:03:41 +00:00
parent 5a18b9b6b7
commit c153a5c6df

View File

@ -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:
{