mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Anvil fixes, improved memory settings
This commit is contained in:
@ -101,7 +101,8 @@ class RegionLoader extends \pocketmine\level\format\mcregion\RegionLoader{
|
||||
return null;
|
||||
}
|
||||
|
||||
$chunk = Chunk::fromBinary(fread($this->filePointer, $length - 1), $this->levelProvider);
|
||||
$data = fread($this->filePointer, $length - 1);
|
||||
$chunk = Chunk::fromBinary($data, $this->levelProvider);
|
||||
if($chunk instanceof Chunk){
|
||||
return $chunk;
|
||||
}elseif($forward === false){
|
||||
@ -123,7 +124,8 @@ class RegionLoader extends \pocketmine\level\format\mcregion\RegionLoader{
|
||||
$nbt->TerrainPopulated = new Byte("TerrainPopulated", 0);
|
||||
$nbt->V = new Byte("V", self::VERSION);
|
||||
$nbt->InhabitedTime = new Long("InhabitedTime", 0);
|
||||
$nbt->Biomes = new ByteArray("Biomes", str_repeat(Binary::writeByte(-1), 256));
|
||||
$biomes = str_repeat(Binary::writeByte(-1), 256);
|
||||
$nbt->Biomes = new ByteArray("Biomes", $biomes);
|
||||
$nbt->BiomeColors = new IntArray("BiomeColors", array_fill(0, 156, Binary::readInt("\x00\x85\xb2\x4a")));
|
||||
$nbt->HeightMap = new IntArray("HeightMap", array_fill(0, 256, 127));
|
||||
$nbt->Sections = new Enum("Sections", []);
|
||||
|
Reference in New Issue
Block a user