1
0

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
This commit is contained in:
Lukas Pioch
2017-05-09 14:21:25 +02:00
parent 84bdba345d
commit 73a3c4e3be
15 changed files with 315 additions and 19 deletions

View File

@@ -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);
}