Fixed assert failure when player join in un-generated areas of the world

This commit is contained in:
Dylan K. Taylor 2017-04-24 10:32:50 +01:00
parent fcff6961a8
commit 1be4bd67e4

View File

@ -326,7 +326,7 @@ abstract class Entity extends Location implements Metadatable{
$this->justCreated = true;
$this->namedtag = $nbt;
$this->chunk = $level->getChunk($this->namedtag["Pos"][0] >> 4, $this->namedtag["Pos"][2] >> 4);
$this->chunk = $level->getChunk($this->namedtag["Pos"][0] >> 4, $this->namedtag["Pos"][2] >> 4, true);
assert($this->chunk !== null);
$this->setLevel($level);
$this->server = $level->getServer();