Added Villager spawn egg

This commit is contained in:
Shoghi Cervantes
2014-08-16 14:25:58 +02:00
parent c675605014
commit 52d28795fa
7 changed files with 110 additions and 30 deletions

View File

@@ -158,7 +158,7 @@ abstract class Entity extends Position implements Metadatable{
$this->justCreated = true;
$this->namedtag = $nbt;
$this->chunk = $chunk;
$this->setLevel($chunk->getProvider()->getLevel(), true); //Create a hard reference
$this->setLevel($chunk->getProvider()->getLevel()); //Create a hard reference
$this->server = $chunk->getProvider()->getLevel()->getServer();
$this->boundingBox = new AxisAlignedBB(0, 0, 0, 0, 0, 0);
@@ -667,7 +667,7 @@ abstract class Entity extends Position implements Metadatable{
$this->getLevel()->freeAllChunks($this);
}
}
$this->setLevel($targetLevel, true); //Hard reference
$this->setLevel($targetLevel, $this instanceof Player ? true : false); //Hard reference
$this->getLevel()->addEntity($this);
if($this instanceof Player){
$this->usedChunks = [];