From db4dac6d45d67db6bc995801b0cd9c49b3466d1f Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 12 May 2019 16:00:38 +0100 Subject: [PATCH] World: Remove incorrect isSolid() check for placement collision check isSolid() != can be collided with. That's decided by the collision boxes provided, if any. --- src/pocketmine/world/World.php | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/pocketmine/world/World.php b/src/pocketmine/world/World.php index 48df73655..92ff2b764 100644 --- a/src/pocketmine/world/World.php +++ b/src/pocketmine/world/World.php @@ -1813,18 +1813,16 @@ class World implements ChunkManager, Metadatable{ return false; } - if($hand->isSolid()){ - foreach($hand->getCollisionBoxes() as $collisionBox){ - if(!empty($this->getCollidingEntities($collisionBox))){ - return false; //Entity in block - } + foreach($hand->getCollisionBoxes() as $collisionBox){ + if(!empty($this->getCollidingEntities($collisionBox))){ + return false; //Entity in block + } - if($player !== null){ - if(($diff = $player->getNextPosition()->subtract($player->getPosition())) and $diff->lengthSquared() > 0.00001){ - $bb = $player->getBoundingBox()->offsetCopy($diff->x, $diff->y, $diff->z); - if($collisionBox->intersectsWith($bb)){ - return false; //Inside player BB - } + if($player !== null){ + if(($diff = $player->getNextPosition()->subtract($player->getPosition())) and $diff->lengthSquared() > 0.00001){ + $bb = $player->getBoundingBox()->offsetCopy($diff->x, $diff->y, $diff->z); + if($collisionBox->intersectsWith($bb)){ + return false; //Inside player BB } } }