diff --git a/src/pocketmine/block/Door.php b/src/pocketmine/block/Door.php index 674ce94e0..4c7c1e02c 100644 --- a/src/pocketmine/block/Door.php +++ b/src/pocketmine/block/Door.php @@ -73,7 +73,7 @@ abstract class Door extends Transparent{ if($j === 0){ if($flag){ if(!$flag1){ - $bb = AxisAlignedBB::getBoundingBoxFromPool( + $bb->setBounds( $this->x, $this->y, $this->z, @@ -82,7 +82,7 @@ abstract class Door extends Transparent{ $this->z + $f ); }else{ - $bb = AxisAlignedBB::getBoundingBoxFromPool( + $bb->setBounds( $this->x, $this->y, $this->z + 1 - $f, @@ -92,7 +92,7 @@ abstract class Door extends Transparent{ ); } }else{ - $bb = AxisAlignedBB::getBoundingBoxFromPool( + $bb->setBounds( $this->x, $this->y, $this->z, @@ -104,7 +104,7 @@ abstract class Door extends Transparent{ }elseif($j === 1){ if($flag){ if(!$flag1){ - $bb = AxisAlignedBB::getBoundingBoxFromPool( + $bb->setBounds( $this->x + 1 - $f, $this->y, $this->z, @@ -113,7 +113,7 @@ abstract class Door extends Transparent{ $this->z + 1 ); }else{ - $bb = AxisAlignedBB::getBoundingBoxFromPool( + $bb->setBounds( $this->x, $this->y, $this->z, @@ -123,7 +123,7 @@ abstract class Door extends Transparent{ ); } }else{ - $bb = AxisAlignedBB::getBoundingBoxFromPool( + $bb->setBounds( $this->x, $this->y, $this->z, @@ -135,7 +135,7 @@ abstract class Door extends Transparent{ }elseif($j === 2){ if($flag){ if(!$flag1){ - $bb = AxisAlignedBB::getBoundingBoxFromPool( + $bb->setBounds( $this->x, $this->y, $this->z + 1 - $f, @@ -144,7 +144,7 @@ abstract class Door extends Transparent{ $this->z + 1 ); }else{ - $bb = AxisAlignedBB::getBoundingBoxFromPool( + $bb->setBounds( $this->x, $this->y, $this->z, @@ -154,7 +154,7 @@ abstract class Door extends Transparent{ ); } }else{ - $bb = AxisAlignedBB::getBoundingBoxFromPool( + $bb->setBounds( $this->x + 1 - $f, $this->y, $this->z, @@ -166,7 +166,7 @@ abstract class Door extends Transparent{ }elseif($j === 3){ if($flag){ if(!$flag1){ - $bb = AxisAlignedBB::getBoundingBoxFromPool( + $bb->setBounds( $this->x, $this->y, $this->z, @@ -175,7 +175,7 @@ abstract class Door extends Transparent{ $this->z + 1 ); }else{ - $bb = AxisAlignedBB::getBoundingBoxFromPool( + $bb->setBounds( $this->x + 1 - $f, $this->y, $this->z, @@ -185,7 +185,7 @@ abstract class Door extends Transparent{ ); } }else{ - $bb = AxisAlignedBB::getBoundingBoxFromPool( + $bb->setBounds( $this->x, $this->y, $this->z + 1 - $f, diff --git a/src/pocketmine/block/Trapdoor.php b/src/pocketmine/block/Trapdoor.php index a706e9cb6..619bcd8d7 100644 --- a/src/pocketmine/block/Trapdoor.php +++ b/src/pocketmine/block/Trapdoor.php @@ -43,8 +43,6 @@ class Trapdoor extends Transparent{ $f = 0.1875; - $bb = null; - if(($damage & 0x08) > 0){ $bb = AxisAlignedBB::getBoundingBoxFromPool( $this->x, @@ -67,7 +65,7 @@ class Trapdoor extends Transparent{ if(($damage & 0x04) > 0){ if(($damage & 0x03) === 0){ - $bb = AxisAlignedBB::getBoundingBoxFromPool( + $bb->setBounds( $this->x, $this->y, $this->z + 1 - $f, @@ -76,7 +74,7 @@ class Trapdoor extends Transparent{ $this->z + 1 ); }elseif(($damage & 0x03) === 1){ - $bb = AxisAlignedBB::getBoundingBoxFromPool( + $bb->setBounds( $this->x, $this->y, $this->z, @@ -85,7 +83,7 @@ class Trapdoor extends Transparent{ $this->z + $f ); }if(($damage & 0x03) === 2){ - $bb = AxisAlignedBB::getBoundingBoxFromPool( + $bb->setBounds( $this->x + 1 - $f, $this->y, $this->z, @@ -94,7 +92,7 @@ class Trapdoor extends Transparent{ $this->z + 1 ); }if(($damage & 0x03) === 3){ - $bb = AxisAlignedBB::getBoundingBoxFromPool( + $bb->setBounds( $this->x, $this->y, $this->z,