color = DyeColor::WHITE(); parent::__construct($idInfo, $name, $typeInfo); } protected function getCandleIfCompatibleType(Block $block) : ?Candle{ $result = parent::getCandleIfCompatibleType($block); //different coloured candles can't be combined in the same block return $result instanceof DyedCandle && $result->color->equals($this->color) ? $result : null; } }