Added another handful of blocks

clearing out my workspace...
This commit is contained in:
Dylan K. Taylor
2022-07-05 20:42:22 +01:00
parent 3c017af6a0
commit a42bb9626d
7 changed files with 73 additions and 5 deletions

View File

@ -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;
}
/**