mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 10:53:05 +00:00
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:
@ -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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user