mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Block API typehints
This commit is contained in:
@ -35,15 +35,15 @@ class Quartz extends Solid{
|
||||
|
||||
protected $id = self::QUARTZ_BLOCK;
|
||||
|
||||
public function __construct($meta = 0){
|
||||
public function __construct(int $meta = 0){
|
||||
$this->meta = $meta;
|
||||
}
|
||||
|
||||
public function getHardness(){
|
||||
public function getHardness() : float{
|
||||
return 0.8;
|
||||
}
|
||||
|
||||
public function getName(){
|
||||
public function getName() : string{
|
||||
static $names = [
|
||||
self::QUARTZ_NORMAL => "Quartz Block",
|
||||
self::QUARTZ_CHISELED => "Chiseled Quartz Block",
|
||||
@ -53,7 +53,7 @@ class Quartz extends Solid{
|
||||
return $names[$this->meta & 0x03];
|
||||
}
|
||||
|
||||
public function getToolType(){
|
||||
public function getToolType() : int{
|
||||
return Tool::TYPE_PICKAXE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user