From 002f030970eaeedb1f3deaa14504cde13869e8de Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 2 Feb 2019 11:54:25 +0000 Subject: [PATCH] EnderPearl: make a hack less messy --- src/pocketmine/entity/projectile/EnderPearl.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/pocketmine/entity/projectile/EnderPearl.php b/src/pocketmine/entity/projectile/EnderPearl.php index 2191a71ee..69922eccd 100644 --- a/src/pocketmine/entity/projectile/EnderPearl.php +++ b/src/pocketmine/entity/projectile/EnderPearl.php @@ -38,16 +38,7 @@ class EnderPearl extends Throwable{ protected function calculateInterceptWithBlock(Block $block, Vector3 $start, Vector3 $end) : ?RayTraceResult{ if($block->getId() !== Block::AIR and empty($block->getCollisionBoxes())){ //TODO: remove this once block collision boxes are fixed properly - $bb = new AxisAlignedBB( - $block->x, - $block->y, - $block->z, - $block->x + 1, - $block->y + 1, - $block->z + 1 - ); - - return $bb->calculateIntercept($start, $end); + return AxisAlignedBB::one()->offset($block->x, $block->y, $block->z)->calculateIntercept($start, $end); } return parent::calculateInterceptWithBlock($block, $start, $end);