From 1055ab6a795fa4b48d1a7b37a1afff786087317e Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Tue, 27 Aug 2013 13:48:08 +0200 Subject: [PATCH] Fixed chests --- src/world/LevelImport.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/world/LevelImport.php b/src/world/LevelImport.php index e8934f321..787814a77 100644 --- a/src/world/LevelImport.php +++ b/src/world/LevelImport.php @@ -41,14 +41,15 @@ class LevelImport{ $tiles->save(); }elseif(file_exists($this->path."chunks.dat") and file_exists($this->path."level.dat")){ //Pocket $nbt = new NBT(); - $nbt->load(file_get_contents($this->path."level.dat")); + $nbt->load(substr(file_get_contents($this->path."level.dat"), 12)); $level = array_shift($nbt->tree); + var_dump($level); if($level["LevelName"] == ""){ $level["LevelName"] = "world".time(); } console("[INFO] Importing Pocket level \"".$level["LevelName"]."\" to PMF format"); unset($level["Player"]); - $nbt->load(substr(file_get_contents($this->path."entities.dat"), 12)); + $nbt->load(file_get_contents($this->path."entities.dat")); $entities = array_shift($nbt->tree); if(!isset($entities["TileEntities"])){ $entities["TileEntities"] = array();