Refactor Block->getResistance() -> Block->getBlastResistance() and added some documentation

This commit is contained in:
Dylan K. Taylor
2017-08-20 13:25:43 +01:00
parent 216fc6fe31
commit eeedcf7332
11 changed files with 20 additions and 10 deletions

View File

@ -531,6 +531,7 @@ class Block extends Position implements BlockIds, Metadatable{
}
/**
* Returns a base value used to compute block break times.
* @return float
*/
public function getHardness() : float{
@ -538,9 +539,18 @@ class Block extends Position implements BlockIds, Metadatable{
}
/**
* @deprecated
* @return float
*/
public function getResistance() : float{
return $this->getBlastResistance();
}
/**
* Returns the block's resistance to explosions. Usually 5x hardness.
* @return float
*/
public function getBlastResistance() : float{
return $this->getHardness() * 5;
}