Skip to content

Commit ecc9e1d

Browse files
committed
EndPortal meta and Endstone breaktime
1 parent 532b12c commit ecc9e1d

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

src/pocketmine/block/EndPortal.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
use pocketmine\item\Item;
2525

2626
class EndPortal extends Solid{
27-
public function __construct(){
28-
parent::__construct(self::END_PORTAL, 0, "End Portal");
27+
public function __construct($meta = 0){
28+
parent::__construct(self::END_PORTAL, $meta, "End Portal");
2929
$this->hardness = 18000000;
3030
}
3131
}

src/pocketmine/block/EndStone.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,21 @@ public function __construct(){
2828
parent::__construct(self::END_STONE, 0, "End Stone");
2929
$this->hardness = 45;
3030
}
31+
32+
public function getBreakTime(Item $item){
33+
switch($item->isPickaxe()){
34+
case 5:
35+
return 0.6;
36+
case 4:
37+
return 0.75;
38+
case 3:
39+
return 1.15;
40+
case 2:
41+
return 0.4;
42+
case 1:
43+
return 2.25;
44+
default:
45+
return 15;
46+
}
47+
}
3148
}

0 commit comments

Comments
 (0)