Added some very useless functions for easier size changing of entities. (#348)

This commit is contained in:
Sandertv 2017-02-11 22:24:38 +01:00 committed by Dylan K. Taylor
parent d430ad50be
commit 6dc6e32656

View File

@ -384,7 +384,21 @@ abstract class Entity extends Location implements Metadatable{
public function setNameTagAlwaysVisible($value = true){
$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(){
return $this->getDataFlag(self::DATA_FLAGS, self::DATA_FLAG_SNEAKING);
}