From 3556f26e00277dbe8f1627e2ae4f017342c8d9d8 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 25 Sep 2020 16:39:55 +0100 Subject: [PATCH] Entity: Rename getBlocksAround() -> getBlocksAroundWithEntityInsideActions() this name is more long-winded, but much less misleading. --- src/entity/Entity.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/entity/Entity.php b/src/entity/Entity.php index e855c1b57..f9081dcae 100644 --- a/src/entity/Entity.php +++ b/src/entity/Entity.php @@ -1233,12 +1233,9 @@ abstract class Entity{ } /** - * @deprecated WARNING: Despite what its name implies, this function DOES NOT return all the blocks around the entity. - * Instead, it returns blocks which have reactions for an entity intersecting with them. - * * @return Block[] */ - public function getBlocksAround() : array{ + public function getBlocksAroundWithEntityInsideActions() : array{ if($this->blocksAround === null){ $inset = 0.001; //Offset against floating-point errors @@ -1278,7 +1275,7 @@ abstract class Entity{ protected function checkBlockCollision() : void{ $vectors = []; - foreach($this->getBlocksAround() as $block){ + foreach($this->getBlocksAroundWithEntityInsideActions() as $block){ if(!$block->onEntityInside($this)){ $this->blocksAround = null; }