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

This commit is contained in:
Dylan K. Taylor
2017-04-21 22:50:14 +01:00
29 changed files with 224 additions and 117 deletions

View File

@ -373,6 +373,7 @@ abstract class Entity extends Location implements Metadatable{
$this->invulnerable = $this->namedtag["Invulnerable"] > 0 ? true : false;
$this->attributeMap = new AttributeMap();
$this->addAttributes();
$this->chunk->addEntity($this);
$this->level->addEntity($this);
@ -710,8 +711,6 @@ abstract class Entity extends Location implements Metadatable{
$this->scheduleUpdate();
$this->addAttributes();
if(isset($this->namedtag->ActiveEffects)){
foreach($this->namedtag->ActiveEffects->getValue() as $e){
$amplifier = $e["Amplifier"] & 0xff; //0-255 only
@ -1179,7 +1178,7 @@ abstract class Entity extends Location implements Metadatable{
//return !($this instanceof Player);
}
public final function scheduleUpdate(){
final public function scheduleUpdate(){
$this->level->updateEntities[$this->id] = $this;
}