Living: remove unnecessary double CompoundTag::getTag() call

This commit is contained in:
Dylan K. Taylor 2021-06-29 23:54:52 +01:00
parent 316e2654cc
commit 2312511be6
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -142,7 +142,7 @@ abstract class Living extends Entity{
$health = $healFTag->getValue();
}elseif(($healthTag = $nbt->getTag("Health")) instanceof ShortTag){
$health = $healthTag->getValue(); //Older versions of PocketMine-MP incorrectly saved this as a short instead of a float
}elseif(($healthTag = $nbt->getTag("Health")) instanceof FloatTag){
}elseif($healthTag instanceof FloatTag){
$health = $healthTag->getValue();
}