Interface RecipeOptional.Unit<T>

All Superinterfaces:
RecipeOptional<T>
All Known Implementing Classes:
RecipeOptional.Constant, RecipeOptional.Unit.Impl
Enclosing interface:
RecipeOptional<T>

public static interface RecipeOptional.Unit<T> extends RecipeOptional<T>
  • Method Details

    • value

      @Nullable T value()
    • getDefaultValue

      default T getDefaultValue(RecipeSchemaType type)
      Specified by:
      getDefaultValue in interface RecipeOptional<T>
    • getInformativeValue

      @Nullable default T getInformativeValue()
      Description copied from interface: RecipeOptional
      Gets a value that is used during data generation of recipe schema JSONs, as well as during debugging of recipe constructors.

      This needs to be implemented if you intend to use data generation with a custom optional type

      Specified by:
      getInformativeValue in interface RecipeOptional<T>