mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-01 07:39:57 +00:00
Fix for #3569 NetherBrickFence
This commit is contained in:
parent
8ce02d8687
commit
958c3589c9
@ -20,15 +20,15 @@
|
|||||||
*/
|
*/
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use pocketmine\block\Block;
|
|
||||||
use pocketmine\block\Fence;
|
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
//use pocketmine\item\Tool;
|
use pocketmine\item\Tool;
|
||||||
|
|
||||||
class NetherBrickFence extends Transparent {
|
class NetherBrickFence extends Transparent {
|
||||||
|
|
||||||
public function __construct(){
|
protected $id = self::NETHER_BRICK_FENCE;
|
||||||
parent::__construct(self::NETHER_BRICK_FENCE);
|
|
||||||
|
public function __construct($meta = 0){
|
||||||
|
$this->meta = $meta;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getBreakTime(Item $item){
|
public function getBreakTime(Item $item){
|
||||||
@ -61,9 +61,9 @@ class NetherBrickFence extends Transparent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getDrops(Item $item){
|
public function getDrops(Item $item){
|
||||||
if($item->isPickaxe()){
|
if($item->isPickaxe() >= Tool::TYPE_WOODEN){
|
||||||
return [
|
return [
|
||||||
[Item::FENCE, Fence::FENCE_NETHER_BRICK, 1],
|
[Item::NETHER_BRICK_FENCE, $this->meta, 1],
|
||||||
];
|
];
|
||||||
}else{
|
}else{
|
||||||
return [];
|
return [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user