From 2a23eadbb67ab3651589029a87621d9a3e9f9328 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Sat, 1 Mar 2014 21:42:40 +0100 Subject: [PATCH] Fixed things --- src/API/LevelAPI.php | 2 +- src/world/Level.php | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/API/LevelAPI.php b/src/API/LevelAPI.php index 1204f5b6d..e979cd6da 100644 --- a/src/API/LevelAPI.php +++ b/src/API/LevelAPI.php @@ -205,7 +205,7 @@ class LevelAPI{ $tag = new NBTTag_List("Items", array()); $tag->setTagType(NBTTag::TAG_Compound); foreach($data as $slot => $fields){ - $tag->{$slot} = new NBTTag_Compound(false, array( + $tag[(int) $slot] = new NBTTag_Compound(false, array( "Count" => new NBTTag_Byte("Count", $fields["Count"]), "Slot" => new NBTTag_Short("Slot", $fields["Slot"]), "Damage" => new NBTTag_Short("Damage", $fields["Damage"]), diff --git a/src/world/Level.php b/src/world/Level.php index 03b057b94..639e0dc25 100644 --- a/src/world/Level.php +++ b/src/world/Level.php @@ -405,9 +405,6 @@ class Level{ public function loadChunk($X, $Z){ - if(!isset($this->level)){ - return false; - } $index = PMFLevel::getIndex($X, $Z); if(isset($this->usedChunks[$index])){ return true; @@ -433,6 +430,7 @@ class Level{ break; } } + return true; } return false; }