Fixed chunks not loading when respawning and some minor spawn sequence cleanup (#1153)

* Fixed chunks not loading when respawning and some minor spawn sequence cleanup

* This causes too much unexpected behaviour to be useful

Revert "Make use of Mojang's pitch hack, close #821"

This reverts commit c2dfef700f.

* Removed delayed-teleport system and cleaned up movement reset for dead players

* Fixed health resetting to max when quitting and rejoining
This commit is contained in:
Dylan K. Taylor
2017-07-05 10:31:16 +01:00
committed by GitHub
parent b8a30309bb
commit 394f420059
3 changed files with 54 additions and 122 deletions

View File

@ -54,8 +54,10 @@ abstract class Living extends Entity implements Damageable{
if(isset($this->namedtag->HealF)){
$this->namedtag->Health = new FloatTag("Health", (float) $this->namedtag["HealF"]);
unset($this->namedtag->HealF);
}elseif(isset($this->namedtag->Health) and !($this->namedtag->Health instanceof FloatTag)){
$this->namedtag->Health = new FloatTag("Health", (float) $this->namedtag->Health->getValue());
}elseif(isset($this->namedtag->Health)){
if(!($this->namedtag->Health instanceof FloatTag)){
$this->namedtag->Health = new FloatTag("Health", (float) $this->namedtag->Health->getValue());
}
}else{
$this->namedtag->Health = new FloatTag("Health", (float) $this->getMaxHealth());
}