mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 10:53:05 +00:00
Added all block hardness
This commit is contained in:
@ -31,6 +31,10 @@ class Quartz extends Solid{
|
||||
$this->meta = $meta;
|
||||
}
|
||||
|
||||
public function getHardness(){
|
||||
return 0.8;
|
||||
}
|
||||
|
||||
public function getName(){
|
||||
static $names = [
|
||||
0 => "Quartz Block",
|
||||
@ -41,24 +45,6 @@ class Quartz extends Solid{
|
||||
return $names[$this->meta & 0x03];
|
||||
}
|
||||
|
||||
public function getBreakTime(Item $item){
|
||||
|
||||
switch($item->isPickaxe()){
|
||||
case 5:
|
||||
return 0.15;
|
||||
case 4:
|
||||
return 0.2;
|
||||
case 3:
|
||||
return 0.3;
|
||||
case 2:
|
||||
return 0.1;
|
||||
case 1:
|
||||
return 0.6;
|
||||
default:
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
|
||||
public function getDrops(Item $item){
|
||||
if($item->isPickaxe() >= 1){
|
||||
return [
|
||||
|
Reference in New Issue
Block a user