From 6dc6e3265666eb700305bdf4f484ce3f17c01650 Mon Sep 17 00:00:00 2001 From: Sandertv Date: Sat, 11 Feb 2017 22:24:38 +0100 Subject: [PATCH] Added some very useless functions for easier size changing of entities. (#348) --- src/pocketmine/entity/Entity.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index 3f99ebe4e..1af830104 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -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); }