summaryrefslogtreecommitdiffstats
path: root/source/cChestEntity.cpp
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-10-31 01:52:20 +0100
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-10-31 01:52:20 +0100
commite2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f (patch)
tree2519b9736038f7d5374719122b4ba7937d2e309c /source/cChestEntity.cpp
parentput the timer and quicksort functions into their own files. Made a few changes to the converter. Converter doesn't understand Entity tags and some chunks cause it to segfault for a currently unknown reason. (diff)
downloadcuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.tar
cuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.tar.gz
cuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.tar.bz2
cuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.tar.lz
cuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.tar.xz
cuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.tar.zst
cuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.zip
Diffstat (limited to '')
-rw-r--r--source/cChestEntity.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/cChestEntity.cpp b/source/cChestEntity.cpp
index f76848879..54a06fcb9 100644
--- a/source/cChestEntity.cpp
+++ b/source/cChestEntity.cpp
@@ -7,11 +7,12 @@
#include "cWindow.h"
#include "cPickup.h"
#include "cMCLogger.h"
+#include "cChunk.h"
#include <json/json.h>
-cChestEntity::cChestEntity(int a_X, int a_Y, int a_Z)
- : cBlockEntity( E_BLOCK_CHEST, a_X, a_Y, a_Z )
+cChestEntity::cChestEntity(int a_X, int a_Y, int a_Z, cChunk* a_Chunk)
+ : cBlockEntity( E_BLOCK_CHEST, a_X, a_Y, a_Z, a_Chunk )
{
m_Content = new cItem[ c_ChestHeight*c_ChestWidth ];
}
@@ -37,7 +38,7 @@ void cChestEntity::Destroy()
if( !m_Content[i].IsEmpty() )
{
cPickup* Pickup = new cPickup( m_PosX*32 + 16, m_PosY*32 + 16, m_PosZ*32 + 16, m_Content[i], 0, 1.f, 0 );
- Pickup->Initialize();
+ Pickup->Initialize( GetChunk()->GetWorld() );
m_Content[i].Empty();
}
}