mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Added some documentation on harvest level properties
This commit is contained in:
parent
e2e6b7516a
commit
0004e7429f
@ -202,6 +202,18 @@ class Block extends Position implements BlockIds, Metadatable{
|
||||
return BlockToolType::TYPE_NONE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the level of tool required to harvest this block (for normal blocks). When the tool type matches the
|
||||
* block's required tool type, the tool must have a harvest level greater than or equal to this value to be able to
|
||||
* successfully harvest the block.
|
||||
*
|
||||
* If the block requires a specific minimum tier of tiered tool, the minimum tier required should be returned.
|
||||
* Otherwise, 1 should be returned if a tool is required, 0 if not.
|
||||
*
|
||||
* @see Item::getBlockToolHarvestLevel()
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getToolHarvestLevel() : int{
|
||||
return 0;
|
||||
}
|
||||
|
@ -752,6 +752,15 @@ class Item implements ItemIds, \JsonSerializable{
|
||||
return BlockToolType::TYPE_NONE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the harvesting power that this tool has. This affects what blocks it can mine when the tool type matches
|
||||
* the mined block.
|
||||
* This should return 1 for non-tiered tools, and the tool tier for tiered tools.
|
||||
*
|
||||
* @see Block::getToolHarvestLevel()
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getBlockToolHarvestLevel() : int{
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user