Fixed things

This commit is contained in:
Shoghi Cervantes 2014-03-01 21:42:40 +01:00
parent 573fe0e5cc
commit 2a23eadbb6
2 changed files with 2 additions and 4 deletions

View File

@ -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"]),

View File

@ -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;
}