mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Rename Block->canBeBrokenWith() to isCompatibleWithTool() and add documentation
This name better describes it. "can be broken with" implies that items which this returns false for cannot destroy the block at all, which is incorrect. What this actually returns is whether the item is the best tool to use to break the block.
This commit is contained in:
@ -56,7 +56,7 @@ class NetherReactor extends Solid{
|
||||
}
|
||||
|
||||
public function getDrops(Item $item) : array{
|
||||
if($this->canBeBrokenWith($item)){
|
||||
if($this->isCompatibleWithTool($item)){
|
||||
return [
|
||||
ItemFactory::get(Item::IRON_INGOT, 0, 6),
|
||||
ItemFactory::get(Item::DIAMOND, 0, 3)
|
||||
|
Reference in New Issue
Block a user