mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Added all block hardness
This commit is contained in:
@ -45,7 +45,7 @@ class Vine extends Transparent{
|
||||
}
|
||||
|
||||
public function getHardness(){
|
||||
return 1;
|
||||
return 0.2;
|
||||
}
|
||||
|
||||
public function canPassThrough(){
|
||||
@ -142,29 +142,6 @@ class Vine extends Transparent{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getBreakTime(Item $item){
|
||||
if($item->isShears()){
|
||||
return 0.02;
|
||||
}elseif($item->isSword()){
|
||||
return 0.2;
|
||||
}elseif($item->isAxe()){
|
||||
switch($item->isAxe()){
|
||||
case Tool::TIER_WOODEN:
|
||||
return 0.15;
|
||||
case Tool::TIER_STONE:
|
||||
return 0.075;
|
||||
case Tool::TIER_IRON:
|
||||
return 0.05;
|
||||
case Tool::TIER_DIAMOND:
|
||||
return 0.0375;
|
||||
case Tool::TIER_GOLD:
|
||||
return 0.025;
|
||||
}
|
||||
}
|
||||
|
||||
return 0.3;
|
||||
}
|
||||
|
||||
public function onUpdate($type){
|
||||
if($type === Level::BLOCK_UPDATE_NORMAL){
|
||||
/*if($this->getSide(0)->getId() === self::AIR){ //Replace with common break method
|
||||
|
Reference in New Issue
Block a user