mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-01 07:39:57 +00:00
Added some very useless functions for easier size changing of entities. (#348)
This commit is contained in:
parent
d430ad50be
commit
6dc6e32656
@ -385,6 +385,20 @@ abstract class Entity extends Location implements Metadatable{
|
|||||||
$this->setDataFlag(self::DATA_FLAGS, self::DATA_FLAG_ALWAYS_SHOW_NAMETAG, $value);
|
$this->setDataFlag(self::DATA_FLAGS, self::DATA_FLAG_ALWAYS_SHOW_NAMETAG, $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return float
|
||||||
|
*/
|
||||||
|
public function getScale(): float{
|
||||||
|
return $this->getDataProperty(self::DATA_SCALE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param float $value
|
||||||
|
*/
|
||||||
|
public function setScale(float $value){
|
||||||
|
$this->setDataProperty(self::DATA_SCALE, self::DATA_TYPE_FLOAT, $value);
|
||||||
|
}
|
||||||
|
|
||||||
public function isSneaking(){
|
public function isSneaking(){
|
||||||
return $this->getDataFlag(self::DATA_FLAGS, self::DATA_FLAG_SNEAKING);
|
return $this->getDataFlag(self::DATA_FLAGS, self::DATA_FLAG_SNEAKING);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user