File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 2424use pocketmine \item \Item ;
2525
2626class 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}
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments