mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-14 17:59:41 +00:00
fixed for some bugs
Signed-off-by: mmlmml1 <mmlmml1@126.com>
This commit is contained in:
parent
8421985102
commit
2096dace68
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class IronBars extends Thin{
|
class IronBars extends Thin{
|
||||||
|
|
||||||
@ -33,5 +34,35 @@ class IronBars extends Thin{
|
|||||||
public function getName(){
|
public function getName(){
|
||||||
return "Iron Bars";
|
return "Iron Bars";
|
||||||
}
|
}
|
||||||
|
public function getHardness(){
|
||||||
|
return 25;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
public function getBreakTime(Item $item){
|
||||||
|
switch($item->isPickaxe()){
|
||||||
|
case 5:
|
||||||
|
return 0.95;
|
||||||
|
case 4:
|
||||||
|
return 1.25;
|
||||||
|
case 3:
|
||||||
|
return 1.9;
|
||||||
|
case 2:
|
||||||
|
return 0.65;
|
||||||
|
case 1:
|
||||||
|
return 3.75;
|
||||||
|
default:
|
||||||
|
return 25;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDrops(Item $item){
|
||||||
|
if($item->isPickaxe() >= 1){
|
||||||
|
return [
|
||||||
|
[Item::IRON_BARS, 0, 1],
|
||||||
|
];
|
||||||
|
}else{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user