1
0

Mineshafts: Added random loot to generated chests and fixed chest direction

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1365 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2013-04-06 21:21:57 +00:00
parent 8050c89fab
commit 502935c061
13 changed files with 421 additions and 67 deletions

View File

@@ -306,6 +306,12 @@ void cChunk::SetAllData(
}
std::swap(a_BlockEntities, m_BlockEntities);
// Set all block entities' World variable:
for (cBlockEntityList::iterator itr = m_BlockEntities.begin(); itr != m_BlockEntities.end(); ++itr)
{
(*itr)->SetWorld(m_World);
}
// Create block entities that the loader didn't load; fill them with defaults
CreateBlockEntities();
@@ -1015,8 +1021,8 @@ void cChunk::CreateBlockEntities(void)
{
for (int y = 0; y < Height; y++)
{
ENUM_BLOCK_ID BlockType = (ENUM_BLOCK_ID)cChunkDef::GetBlock(m_BlockTypes, x, y, z);
switch ( BlockType )
BLOCKTYPE BlockType = cChunkDef::GetBlock(m_BlockTypes, x, y, z);
switch (BlockType)
{
case E_BLOCK_CHEST:
{