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:
@@ -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() )
|
||||
|
||||
Reference in New Issue
Block a user