mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-13 05:15:13 +00:00
Added End Portal frame bounding box
This commit is contained in:
parent
3bf39df255
commit
cf542ac73a
@ -21,9 +21,22 @@
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\math\AxisAlignedBB;
|
||||||
|
|
||||||
class EndPortal extends Solid{
|
class EndPortal extends Solid{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
parent::__construct(self::END_PORTAL, $meta, "End Portal");
|
parent::__construct(self::END_PORTAL, $meta, "End Portal");
|
||||||
$this->hardness = 18000000;
|
$this->hardness = 18000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getBoundingBox(){
|
||||||
|
return new AxisAlignedBB(
|
||||||
|
$this->x,
|
||||||
|
$this->y,
|
||||||
|
$this->z,
|
||||||
|
$this->x + 1,
|
||||||
|
$this->y + (($this->getDamage() & 0x04) > 0 ? 1 : 0.8125),
|
||||||
|
$this->z + 1
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user