mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-09 15:29:47 +00:00
Remove redundant isAffectedBySilkTouch() overrides
this was needed previously to prevent dropping blockitems when these blocks were destroyed. Now the item form is always yielded instead.
This commit is contained in:
parent
12dfcc9eb6
commit
80ac0180b3
@ -197,9 +197,9 @@ class Bed extends Transparent{
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDropsForCompatibleTool(Item $item) : array{
|
public function getDrops(Item $item) : array{
|
||||||
if($this->isHeadPart()){
|
if($this->head){
|
||||||
return parent::getDropsForCompatibleTool($item);
|
return parent::getDrops($item);
|
||||||
}
|
}
|
||||||
|
|
||||||
return [];
|
return [];
|
||||||
@ -209,10 +209,6 @@ class Bed extends Transparent{
|
|||||||
return ItemFactory::get($this->idInfo->getItemId(), $this->color->getMagicNumber());
|
return ItemFactory::get($this->idInfo->getItemId(), $this->color->getMagicNumber());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isAffectedBySilkTouch() : bool{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getAffectedBlocks() : array{
|
public function getAffectedBlocks() : array{
|
||||||
if(($other = $this->getOtherHalf()) !== null){
|
if(($other = $this->getOtherHalf()) !== null){
|
||||||
return [$this, $other];
|
return [$this, $other];
|
||||||
|
@ -149,18 +149,14 @@ abstract class Door extends Transparent{
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDropsForCompatibleTool(Item $item) : array{
|
public function getDrops(Item $item) : array{
|
||||||
if(!$this->top){ //bottom half only
|
if(!$this->top){
|
||||||
return parent::getDropsForCompatibleTool($item);
|
return parent::getDrops($item);
|
||||||
}
|
}
|
||||||
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isAffectedBySilkTouch() : bool{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getAffectedBlocks() : array{
|
public function getAffectedBlocks() : array{
|
||||||
$other = $this->getSide($this->top ? Facing::DOWN : Facing::UP);
|
$other = $this->getSide($this->top ? Facing::DOWN : Facing::UP);
|
||||||
if($other->isSameType($this)){
|
if($other->isSameType($this)){
|
||||||
|
@ -85,8 +85,4 @@ class NetherWartPlant extends Flowable{
|
|||||||
$this->asItem()->setCount($this->age === 3 ? mt_rand(2, 4) : 1)
|
$this->asItem()->setCount($this->age === 3 ? mt_rand(2, 4) : 1)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isAffectedBySilkTouch() : bool{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -115,8 +115,4 @@ class Skull extends Flowable{
|
|||||||
public function asItem() : Item{
|
public function asItem() : Item{
|
||||||
return ItemFactory::get(Item::SKULL, $this->skullType->getMagicNumber());
|
return ItemFactory::get(Item::SKULL, $this->skullType->getMagicNumber());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isAffectedBySilkTouch() : bool{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user