summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2017-03-21 20:33:51 +0100
committerLukas Pioch <lukas@zgow.de>2017-03-22 11:35:14 +0100
commit9c9734282d030ae7976764c90d19c7aaaeffbb42 (patch)
tree36c7e24d5de35e620cfac0ab42e723cc5a4073c6 /src/BlockEntities
parentCatch crash if any and print backtrace from every thread (diff)
downloadcuberite-9c9734282d030ae7976764c90d19c7aaaeffbb42.tar
cuberite-9c9734282d030ae7976764c90d19c7aaaeffbb42.tar.gz
cuberite-9c9734282d030ae7976764c90d19c7aaaeffbb42.tar.bz2
cuberite-9c9734282d030ae7976764c90d19c7aaaeffbb42.tar.lz
cuberite-9c9734282d030ae7976764c90d19c7aaaeffbb42.tar.xz
cuberite-9c9734282d030ae7976764c90d19c7aaaeffbb42.tar.zst
cuberite-9c9734282d030ae7976764c90d19c7aaaeffbb42.zip
Diffstat (limited to '')
-rw-r--r--src/BlockEntities/DispenserEntity.cpp5
1 files changed, 4 insertions, 1 deletions
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;
}