1
0

Prepared WindowOwner class hierarchy for minecart with chest.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@719 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2012-08-07 12:05:35 +00:00
parent 37c2ffad43
commit b53b40b561
6 changed files with 96 additions and 20 deletions

View File

@@ -28,6 +28,7 @@ cChestEntity::cChestEntity(int a_X, int a_Y, int a_Z, cWorld * a_World)
, m_JoinedChest( NULL )
{
m_Content = new cItem[ c_ChestHeight * c_ChestWidth ];
SetBlockEntity(this); // cBlockEntityWindowOwner
}
@@ -173,7 +174,6 @@ void cChestEntity::UsedBy(cPlayer * a_Player)
cWindow * Window = new cWindow(this, true, cWindow::Chest, 1);
Window->SetSlots(GetContents(), GetChestHeight() * c_ChestWidth);
Window->SetWindowTitle("UberChest");
Window->GetOwner()->SetEntity(this);
OpenWindow( Window );
}
if ( GetWindow() )