mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Living: Fixed passing FloatTag to setHealth() when HealF tag is present, close #1784
This commit is contained in:
parent
49dbd8b2c8
commit
bf4076766e
@ -72,7 +72,7 @@ abstract class Living extends Entity implements Damageable{
|
||||
$health = $this->getMaxHealth();
|
||||
|
||||
if($this->namedtag->hasTag("HealF", FloatTag::class)){
|
||||
$health = new FloatTag("Health", $this->namedtag->getFloat("HealF"));
|
||||
$health = $this->namedtag->getFloat("HealF");
|
||||
$this->namedtag->removeTag("HealF");
|
||||
}elseif($this->namedtag->hasTag("Health")){
|
||||
$healthTag = $this->namedtag->getTag("Health");
|
||||
|
Loading…
x
Reference in New Issue
Block a user