mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Added another handful of blocks
clearing out my workspace...
This commit is contained in:
@ -35,8 +35,15 @@ use pocketmine\player\Player;
|
||||
use pocketmine\world\BlockTransaction;
|
||||
|
||||
class Lantern extends Transparent{
|
||||
private int $lightLevel; //readonly
|
||||
|
||||
protected bool $hanging = false;
|
||||
|
||||
public function __construct(BlockIdentifier $idInfo, string $name, BlockBreakInfo $breakInfo, int $lightLevel){
|
||||
$this->lightLevel = $lightLevel;
|
||||
parent::__construct($idInfo, $name, $breakInfo);
|
||||
}
|
||||
|
||||
public function getRequiredStateDataBits() : int{ return 1; }
|
||||
|
||||
protected function decodeState(RuntimeDataReader $r) : void{
|
||||
@ -56,7 +63,7 @@ class Lantern extends Transparent{
|
||||
}
|
||||
|
||||
public function getLightLevel() : int{
|
||||
return 15;
|
||||
return $this->lightLevel;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user