Stop spawning entities to players twice

This will be done when the chunk is sent to the player anyway.
This commit is contained in:
Dylan K. Taylor 2017-05-29 15:57:05 +01:00
parent 2f306c3a38
commit 8779259734

View File

@ -711,9 +711,7 @@ class Chunk{
try{ try{
$entity = Entity::createEntity($nbt["id"], $level, $nbt); $entity = Entity::createEntity($nbt["id"], $level, $nbt);
if($entity instanceof Entity){ if(!($entity instanceof Entity)){
$entity->spawnToAll();
}else{
$changed = true; $changed = true;
continue; continue;
} }