diff options
Diffstat (limited to '')
-rw-r--r-- | src/BlockEntities/DispenserEntity.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/BlockEntities/DispenserEntity.cpp b/src/BlockEntities/DispenserEntity.cpp index e03bf776d..f5b9c8923 100644 --- a/src/BlockEntities/DispenserEntity.cpp +++ b/src/BlockEntities/DispenserEntity.cpp @@ -128,7 +128,8 @@ void cDispenserEntity::DropSpenseFromSlot(cChunk & a_Chunk, int a_SlotNum) 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); + const cItem& slot = m_Contents.GetSlot(a_SlotNum); + m_Contents.SetSlot(a_SlotNum, slot.m_ItemType, slot.m_ItemCount, slot.m_ItemDamage + 1); // If the durability has run out destroy the item. if (m_Contents.GetSlot(a_SlotNum).m_ItemDamage > 64) { |