Added basic noteblocks, finished sign storage in Anvil (patch contributed by l0udPL)
http://forum.mc-server.org/showthread.php?tid=528 git-svn-id: http://mc-server.googlecode.com/svn/trunk@793 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include "cChestEntity.h"
|
||||
#include "cFurnaceEntity.h"
|
||||
#include "cSignEntity.h"
|
||||
#include "cNoteEntity.h"
|
||||
#include "cTorch.h"
|
||||
#include "cLadder.h"
|
||||
#include "cPickup.h"
|
||||
@@ -962,6 +963,15 @@ void cChunk::CreateBlockEntities(void)
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case E_BLOCK_NOTE_BLOCK:
|
||||
{
|
||||
if (!HasBlockEntityAt(x + m_PosX * Width, y + m_PosY * Height, z + m_PosZ * Width))
|
||||
{
|
||||
m_BlockEntities.push_back(new cNoteEntity(x + m_PosX * Width, y + m_PosY * Height, z + m_PosZ * Width, m_World) );
|
||||
}
|
||||
break;
|
||||
}
|
||||
} // switch (BlockType)
|
||||
} // for y
|
||||
} // for z
|
||||
@@ -1087,6 +1097,11 @@ void cChunk::SetBlock( int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType
|
||||
AddBlockEntity( new cSignEntity( (ENUM_BLOCK_ID)a_BlockType, WorldPos.x, WorldPos.y, WorldPos.z, m_World) );
|
||||
break;
|
||||
}
|
||||
case E_BLOCK_NOTE_BLOCK:
|
||||
{
|
||||
AddBlockEntity(new cNoteEntity(WorldPos.x, WorldPos.y, WorldPos.z, m_World));
|
||||
break;
|
||||
}
|
||||
} // switch (a_BlockType)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user