mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-17 03:08:58 +00:00
Fixed things
This commit is contained in:
parent
573fe0e5cc
commit
2a23eadbb6
@ -205,7 +205,7 @@ class LevelAPI{
|
|||||||
$tag = new NBTTag_List("Items", array());
|
$tag = new NBTTag_List("Items", array());
|
||||||
$tag->setTagType(NBTTag::TAG_Compound);
|
$tag->setTagType(NBTTag::TAG_Compound);
|
||||||
foreach($data as $slot => $fields){
|
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"]),
|
"Count" => new NBTTag_Byte("Count", $fields["Count"]),
|
||||||
"Slot" => new NBTTag_Short("Slot", $fields["Slot"]),
|
"Slot" => new NBTTag_Short("Slot", $fields["Slot"]),
|
||||||
"Damage" => new NBTTag_Short("Damage", $fields["Damage"]),
|
"Damage" => new NBTTag_Short("Damage", $fields["Damage"]),
|
||||||
|
@ -405,9 +405,6 @@ class Level{
|
|||||||
|
|
||||||
|
|
||||||
public function loadChunk($X, $Z){
|
public function loadChunk($X, $Z){
|
||||||
if(!isset($this->level)){
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
$index = PMFLevel::getIndex($X, $Z);
|
$index = PMFLevel::getIndex($X, $Z);
|
||||||
if(isset($this->usedChunks[$index])){
|
if(isset($this->usedChunks[$index])){
|
||||||
return true;
|
return true;
|
||||||
@ -433,6 +430,7 @@ class Level{
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user