mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-23 11:26:37 +00:00
Absorption should be a float. Fixed #1071
This commit is contained in:
parent
6b5c0af161
commit
2d8395f70e
@ -910,11 +910,11 @@ abstract class Entity extends Location implements Metadatable{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAbsorption() : int{
|
public function getAbsorption() : float{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setAbsorption(int $absorption){
|
public function setAbsorption(float $absorption){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,11 +120,11 @@ abstract class Living extends Entity implements Damageable{
|
|||||||
$this->attributeMap->getAttribute(Attribute::HEALTH)->setMaxValue($amount);
|
$this->attributeMap->getAttribute(Attribute::HEALTH)->setMaxValue($amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAbsorption() : int{
|
public function getAbsorption() : float{
|
||||||
return (int) $this->attributeMap->getAttribute(Attribute::ABSORPTION)->getValue();
|
return $this->attributeMap->getAttribute(Attribute::ABSORPTION)->getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setAbsorption(int $absorption){
|
public function setAbsorption(float $absorption){
|
||||||
$this->attributeMap->getAttribute(Attribute::ABSORPTION)->setValue($absorption);
|
$this->attributeMap->getAttribute(Attribute::ABSORPTION)->setValue($absorption);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user