From 9c9734282d030ae7976764c90d19c7aaaeffbb42 Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Tue, 21 Mar 2017 20:33:51 +0100 Subject: Fireworks can be fired from a dispenser --- src/BlockEntities/DispenserEntity.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/BlockEntities') diff --git a/src/BlockEntities/DispenserEntity.cpp b/src/BlockEntities/DispenserEntity.cpp index d6fbafadf..281fe2ca6 100644 --- a/src/BlockEntities/DispenserEntity.cpp +++ b/src/BlockEntities/DispenserEntity.cpp @@ -253,7 +253,10 @@ void cDispenserEntity::DropSpenseFromSlot(cChunk & a_Chunk, int a_SlotNum) case E_ITEM_FIREWORK_ROCKET: { - // TODO: Add the fireworks entity + if (SpawnProjectileFromDispenser(BlockX, DispY, BlockZ, cProjectileEntity::pkFirework, GetShootVector(Meta) * 20 + Vector3d(0, 1, 0), &SlotItem) != cEntity::INVALID_ID) + { + m_Contents.ChangeSlotCount(a_SlotNum, -1); + } break; } -- cgit v1.2.3