From d6b720b55db1ef94a76681015f49791680b39220 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 12 May 2019 16:21:52 +0100 Subject: [PATCH] Wall: minor BB calculation cleanup --- src/pocketmine/block/Wall.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/pocketmine/block/Wall.php b/src/pocketmine/block/Wall.php index c586fb1d7..785140bdc 100644 --- a/src/pocketmine/block/Wall.php +++ b/src/pocketmine/block/Wall.php @@ -87,13 +87,11 @@ class Wall extends Transparent{ $inset = 0.3125; } - return new AxisAlignedBB( - ($west ? 0 : $inset), - 0, - ($north ? 0 : $inset), - 1 - ($east ? 0 : $inset), - 1.5, - 1 - ($south ? 0 : $inset) - ); + return AxisAlignedBB::one() + ->extend(Facing::UP, 0.5) + ->trim(Facing::NORTH, $north ? 0 : $inset) + ->trim(Facing::SOUTH, $south ? 0 : $inset) + ->trim(Facing::WEST, $west ? 0 : $inset) + ->trim(Facing::EAST, $east ? 0 : $inset); } }