mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Fixed NBT parsing on false properties
This commit is contained in:
@ -1469,7 +1469,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
}
|
||||
|
||||
if($hand->getId() === Item::SIGN_POST or $hand->getId() === Item::WALL_SIGN){
|
||||
$tile = Tile::createTile("Sign", $this->getChunk($block->x >> 4, $block->z >> 4), new Compound(false, [
|
||||
$tile = Tile::createTile("Sign", $this->getChunk($block->x >> 4, $block->z >> 4), new Compound("", [
|
||||
"id" => new String("id", Tile::SIGN),
|
||||
"x" => new Int("x", $block->x),
|
||||
"y" => new Int("y", $block->y),
|
||||
|
@ -106,7 +106,7 @@ class Anvil extends McRegion{
|
||||
}
|
||||
|
||||
public static function createChunkSection($Y){
|
||||
return new ChunkSection(new Compound(null, [
|
||||
return new ChunkSection(new Compound("", [
|
||||
"Y" => new Byte("Y", $Y),
|
||||
"Blocks" => new ByteArray("Blocks", str_repeat("\x00", 4096)),
|
||||
"Data" => new ByteArray("Data", str_repeat("\x00", 2048)),
|
||||
|
@ -118,7 +118,7 @@ abstract class BaseLevelProvider implements LevelProvider{
|
||||
|
||||
public function saveLevelData(){
|
||||
$nbt = new NBT(NBT::BIG_ENDIAN);
|
||||
$nbt->setData(new Compound(null, [
|
||||
$nbt->setData(new Compound("", [
|
||||
"Data" => $this->levelData
|
||||
]));
|
||||
$buffer = $nbt->writeCompressed();
|
||||
|
@ -96,7 +96,7 @@ class LevelDB extends BaseLevelProvider{
|
||||
mkdir($path . "/db", 0777, true);
|
||||
}
|
||||
//TODO, add extra details
|
||||
$levelData = new Compound(null, [
|
||||
$levelData = new Compound("", [
|
||||
"hardcore" => new Byte("hardcore", 0),
|
||||
"initialized" => new Byte("initialized", 1),
|
||||
"GameType" => new Int("GameType", 0),
|
||||
|
@ -100,7 +100,7 @@ class McRegion extends BaseLevelProvider{
|
||||
"GameRules" => new Compound("GameRules", [])
|
||||
]);
|
||||
$nbt = new NBT(NBT::BIG_ENDIAN);
|
||||
$nbt->setData(new Compound(null, [
|
||||
$nbt->setData(new Compound("", [
|
||||
"Data" => $levelData
|
||||
]));
|
||||
$buffer = $nbt->writeCompressed();
|
||||
|
Reference in New Issue
Block a user