From 73a3c4e3be1916bdd4830e7ce7454035a1f572f6 Mon Sep 17 00:00:00 2001 From: Lukas Pioch Date: Tue, 9 May 2017 14:21:25 +0200 Subject: Exported boat - NBT: Added saving / loading of material - Added the material in the item handler of the boat - Drop the correct boat if destroyed - APIDoc: Added desc and functions --- src/BlockEntities/DispenserEntity.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/BlockEntities/DispenserEntity.cpp') diff --git a/src/BlockEntities/DispenserEntity.cpp b/src/BlockEntities/DispenserEntity.cpp index 281fe2ca6..78ce81e5b 100644 --- a/src/BlockEntities/DispenserEntity.cpp +++ b/src/BlockEntities/DispenserEntity.cpp @@ -222,6 +222,11 @@ void cDispenserEntity::DropSpenseFromSlot(cChunk & a_Chunk, int a_SlotNum) } case E_ITEM_BOAT: + case E_ITEM_SPRUCE_BOAT: + case E_ITEM_BIRCH_BOAT: + case E_ITEM_JUNGLE_BOAT: + case E_ITEM_ACACIA_BOAT: + case E_ITEM_DARK_OAK_BOAT: { Vector3d SpawnPos; if (IsBlockWater(DispBlock)) @@ -244,7 +249,7 @@ void cDispenserEntity::DropSpenseFromSlot(cChunk & a_Chunk, int a_SlotNum) SpawnPos += GetShootVector(Meta) * 0.8; // A boat is bigger than one block. Add the shoot vector to put it outside the dispenser. SpawnPos += Vector3d(0.5, 0.5, 0.5); - if (m_World->SpawnBoat(SpawnPos.x, SpawnPos.y, SpawnPos.z)) + if (m_World->SpawnBoat(SpawnPos.x, SpawnPos.y, SpawnPos.z, cBoat::ItemToMaterial(SlotItem))) { m_Contents.ChangeSlotCount(a_SlotNum, -1); } -- cgit v1.2.3