Merge branch 'release/3.3'

This commit is contained in:
Dylan K. Taylor 2018-09-18 12:32:12 +01:00
commit 01f12d6147

View File

@ -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;
} }