Fixed squid health attribute errors

This commit is contained in:
Dylan K. Taylor
2017-04-21 14:42:19 +01:00
parent a356e36340
commit e7406ba096
3 changed files with 3 additions and 4 deletions

View File

@ -339,6 +339,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);
@ -642,8 +643,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