mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-13 21:35:21 +00:00
Bed: use ColoredTrait
This commit is contained in:
parent
9e79d48aeb
commit
2b4a1ffdfb
@ -25,6 +25,7 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
use pocketmine\block\tile\Bed as TileBed;
|
use pocketmine\block\tile\Bed as TileBed;
|
||||||
use pocketmine\block\utils\BlockDataSerializer;
|
use pocketmine\block\utils\BlockDataSerializer;
|
||||||
|
use pocketmine\block\utils\ColoredTrait;
|
||||||
use pocketmine\block\utils\DyeColor;
|
use pocketmine\block\utils\DyeColor;
|
||||||
use pocketmine\block\utils\HorizontalFacingTrait;
|
use pocketmine\block\utils\HorizontalFacingTrait;
|
||||||
use pocketmine\data\bedrock\DyeColorIdMap;
|
use pocketmine\data\bedrock\DyeColorIdMap;
|
||||||
@ -42,15 +43,15 @@ use pocketmine\world\BlockTransaction;
|
|||||||
use pocketmine\world\World;
|
use pocketmine\world\World;
|
||||||
|
|
||||||
class Bed extends Transparent{
|
class Bed extends Transparent{
|
||||||
|
use ColoredTrait;
|
||||||
use HorizontalFacingTrait;
|
use HorizontalFacingTrait;
|
||||||
|
|
||||||
protected bool $occupied = false;
|
protected bool $occupied = false;
|
||||||
protected bool $head = false;
|
protected bool $head = false;
|
||||||
protected DyeColor $color;
|
|
||||||
|
|
||||||
public function __construct(BlockIdentifier $idInfo, string $name, BlockBreakInfo $breakInfo){
|
public function __construct(BlockIdentifier $idInfo, string $name, BlockBreakInfo $breakInfo){
|
||||||
parent::__construct($idInfo, $name, $breakInfo);
|
|
||||||
$this->color = DyeColor::RED();
|
$this->color = DyeColor::RED();
|
||||||
|
parent::__construct($idInfo, $name, $breakInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function writeStateToMeta() : int{
|
protected function writeStateToMeta() : int{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user