mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 17:29:44 +00:00
Merge branch 'release/3.3'
This commit is contained in:
commit
01f12d6147
@ -170,21 +170,25 @@ class Bed extends Transparent{
|
|||||||
|
|
||||||
public function getDropsForCompatibleTool(Item $item) : array{
|
public function getDropsForCompatibleTool(Item $item) : array{
|
||||||
if($this->isHeadPart()){
|
if($this->isHeadPart()){
|
||||||
$tile = $this->getLevel()->getTile($this);
|
return [$this->getItem()];
|
||||||
if($tile instanceof TileBed){
|
|
||||||
return [
|
|
||||||
ItemFactory::get($this->getItemId(), $tile->getColor())
|
|
||||||
];
|
|
||||||
}else{
|
|
||||||
return [
|
|
||||||
ItemFactory::get($this->getItemId(), 14) //Red
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getPickedItem() : Item{
|
||||||
|
return $this->getItem();
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getItem() : Item{
|
||||||
|
$tile = $this->getLevel()->getTile($this);
|
||||||
|
if($tile instanceof TileBed){
|
||||||
|
return ItemFactory::get($this->getItemId(), $tile->getColor());
|
||||||
|
}
|
||||||
|
|
||||||
|
return ItemFactory::get($this->getItemId(), 14); //Red
|
||||||
|
}
|
||||||
|
|
||||||
public function isAffectedBySilkTouch() : bool{
|
public function isAffectedBySilkTouch() : bool{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user