From 1da0a48edbad5854808f5b83c836c8c20d163995 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Sat, 23 May 2015 11:37:48 +0200 Subject: [PATCH] Fixed #3055 --- src/pocketmine/block/Cactus.php | 4 ++-- src/pocketmine/entity/Entity.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pocketmine/block/Cactus.php b/src/pocketmine/block/Cactus.php index 54dec6193..e8a09c0db 100644 --- a/src/pocketmine/block/Cactus.php +++ b/src/pocketmine/block/Cactus.php @@ -56,10 +56,10 @@ class Cactus extends Transparent{ return new AxisAlignedBB( $this->x + 0.0625, - $this->y, + $this->y + 0.0625, $this->z + 0.0625, $this->x + 0.9375, - $this->y + 1, + $this->y + 0.9375, $this->z + 0.9375 ); } diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index 1e6e7f82a..0f9d4ad34 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -1317,7 +1317,7 @@ abstract class Entity extends Location implements Metadatable{ } } - if(!($this instanceof Player) and $vector->length() > 0){ + if(!($this instanceof Player) and $vector->lengthSquared() > 0){ $vector = $vector->normalize(); $d = 0.014; $this->motionX += $vector->x * $d;