mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-03 08:39:53 +00:00
Removed double chests
This commit is contained in:
parent
1055ab6a79
commit
41084f51a6
@ -65,10 +65,12 @@ class ChestBlock extends TransparentBlock{
|
|||||||
"y" => $this->y,
|
"y" => $this->y,
|
||||||
"z" => $this->z
|
"z" => $this->z
|
||||||
));
|
));
|
||||||
|
|
||||||
|
/* 0.7.4 bug, waiting for Mojang...
|
||||||
if($chest instanceof Tile){
|
if($chest instanceof Tile){
|
||||||
$chest->pairWith($tile);
|
$chest->pairWith($tile);
|
||||||
$tile->pairWith($chest);
|
$tile->pairWith($chest);
|
||||||
}
|
}*/
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,15 +41,14 @@ class LevelImport{
|
|||||||
$tiles->save();
|
$tiles->save();
|
||||||
}elseif(file_exists($this->path."chunks.dat") and file_exists($this->path."level.dat")){ //Pocket
|
}elseif(file_exists($this->path."chunks.dat") and file_exists($this->path."level.dat")){ //Pocket
|
||||||
$nbt = new NBT();
|
$nbt = new NBT();
|
||||||
$nbt->load(substr(file_get_contents($this->path."level.dat"), 12));
|
$nbt->load(substr(file_get_contents($this->path."level.dat"), 8));
|
||||||
$level = array_shift($nbt->tree);
|
$level = array_shift($nbt->tree);
|
||||||
var_dump($level);
|
|
||||||
if($level["LevelName"] == ""){
|
if($level["LevelName"] == ""){
|
||||||
$level["LevelName"] = "world".time();
|
$level["LevelName"] = "world".time();
|
||||||
}
|
}
|
||||||
console("[INFO] Importing Pocket level \"".$level["LevelName"]."\" to PMF format");
|
console("[INFO] Importing Pocket level \"".$level["LevelName"]."\" to PMF format");
|
||||||
unset($level["Player"]);
|
unset($level["Player"]);
|
||||||
$nbt->load(file_get_contents($this->path."entities.dat"));
|
$nbt->load(substr(file_get_contents($this->path."entities.dat"), 12));
|
||||||
$entities = array_shift($nbt->tree);
|
$entities = array_shift($nbt->tree);
|
||||||
if(!isset($entities["TileEntities"])){
|
if(!isset($entities["TileEntities"])){
|
||||||
$entities["TileEntities"] = array();
|
$entities["TileEntities"] = array();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user