mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
Block: Clean up internal constructor inconsistencies
I don't dare look how big this commit is or how many bugs it introduced...
This commit is contained in:
@ -25,17 +25,18 @@ namespace pocketmine\block;
|
||||
|
||||
class RedstoneLamp extends Solid{
|
||||
|
||||
protected $itemId = self::REDSTONE_LAMP;
|
||||
/** @var BlockIdentifierFlattened */
|
||||
protected $idInfo;
|
||||
|
||||
/** @var bool */
|
||||
protected $lit = false;
|
||||
|
||||
public function __construct(){
|
||||
|
||||
public function __construct(BlockIdentifierFlattened $idInfo, string $name){
|
||||
parent::__construct($idInfo, $name);
|
||||
}
|
||||
|
||||
public function getId() : int{
|
||||
return $this->lit ? self::LIT_REDSTONE_LAMP : self::REDSTONE_LAMP;
|
||||
return $this->lit ? $this->idInfo->getSecondId() : parent::getId();
|
||||
}
|
||||
|
||||
public function isLit() : bool{
|
||||
@ -56,10 +57,6 @@ class RedstoneLamp extends Solid{
|
||||
return $this->lit ? 15 : 0;
|
||||
}
|
||||
|
||||
public function getName() : string{
|
||||
return "Redstone Lamp";
|
||||
}
|
||||
|
||||
public function getHardness() : float{
|
||||
return 0.3;
|
||||
}
|
||||
|
Reference in New Issue
Block a user