mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-14 07:25:31 +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();
|
$health = $this->getMaxHealth();
|
||||||
|
|
||||||
if($this->namedtag->hasTag("HealF", FloatTag::class)){
|
if($this->namedtag->hasTag("HealF", FloatTag::class)){
|
||||||
$health = new FloatTag("Health", $this->namedtag->getFloat("HealF"));
|
$health = $this->namedtag->getFloat("HealF");
|
||||||
$this->namedtag->removeTag("HealF");
|
$this->namedtag->removeTag("HealF");
|
||||||
}elseif($this->namedtag->hasTag("Health")){
|
}elseif($this->namedtag->hasTag("Health")){
|
||||||
$healthTag = $this->namedtag->getTag("Health");
|
$healthTag = $this->namedtag->getTag("Health");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user