Merge branch 'api3/network' into api3/network-mcpe-1.1

This commit is contained in:
Dylan K. Taylor
2017-04-24 13:56:19 +01:00
3 changed files with 49 additions and 9 deletions

View File

@ -709,9 +709,16 @@ class Chunk{
continue; //Fixes entities allocated in wrong chunks.
}
if(($entity = Entity::createEntity($nbt["id"], $level, $nbt)) instanceof Entity){
$entity->spawnToAll();
}else{
try{
$entity = Entity::createEntity($nbt["id"], $level, $nbt);
if($entity instanceof Entity){
$entity->spawnToAll();
}else{
$changed = true;
continue;
}
}catch(\Throwable $t){
$level->getServer()->getLogger()->logException($t);
$changed = true;
continue;
}