Fixed users of ColorInMetadataTrait having uninitialized default colours

This commit is contained in:
Dylan K. Taylor
2020-11-03 18:42:40 +00:00
parent bcedbc364b
commit 0a8dc3edd3
4 changed files with 8 additions and 0 deletions

View File

@ -24,6 +24,7 @@ declare(strict_types=1);
namespace pocketmine\block;
use pocketmine\block\utils\ColorInMetadataTrait;
use pocketmine\block\utils\DyeColor;
use pocketmine\block\utils\Fallable;
use pocketmine\block\utils\FallableTrait;
use pocketmine\math\Facing;
@ -35,6 +36,7 @@ class ConcretePowder extends Opaque implements Fallable{
}
public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){
$this->color = DyeColor::WHITE();
parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(0.5, BlockToolType::SHOVEL));
}