Interface CustomComposedConfiguredFeature<C>
- Type Parameters:
C- the configuration type carried to the custom feature
- All Superinterfaces:
ConfiguredFeature, Keyed, Registerable<CustomComposedConfiguredFeature<C>>, Wrapper
@NullMarked
@AsOf("3.0.0")
public interface CustomComposedConfiguredFeature<C>
extends ConfiguredFeature, Registerable<CustomComposedConfiguredFeature<C>>
A configured feature composed of a user-authored
CustomFeature and a matching configuration
instance.- Since:
- 3.0.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classBuilder forCustomComposedConfiguredFeature. -
Method Summary
Modifier and TypeMethodDescriptionstatic <C> CustomComposedConfiguredFeature.Builder<C> builder()Creates a new builder.config()The configuration instance carried to thecustom feature.feature()The custom feature this configured feature composes.static <C> CustomComposedConfiguredFeature<C> of(@Nullable ResourceKey resourceKey, CustomFeature<C> feature, C config) Creates a new custom composed configured feature.static <C> CustomComposedConfiguredFeature<C> of(CustomFeature<C> feature, C config) Creates a new custom composed configured feature without a resource key.default CustomComposedConfiguredFeature.Builder<C> Converts this composed configured feature to a builder.Methods inherited from interface ConfiguredFeature
resourceKey, wrapMethods inherited from interface Registerable
registerMethods inherited from interface Wrapper
asHandle, toMinecraft, unwrap
-
Method Details
-
feature
The custom feature this configured feature composes.- Returns:
- the custom feature
- Since:
- 3.0.0
-
config
The configuration instance carried to thecustom feature.- Returns:
- the configuration
- Since:
- 3.0.0
-
toBuilder
Converts this composed configured feature to a builder.- Returns:
- a builder with the same values as this composed configured feature
- Since:
- 3.0.0
-
of
@AsOf("3.0.0") static <C> CustomComposedConfiguredFeature<C> of(@Nullable ResourceKey resourceKey, CustomFeature<C> feature, C config) Creates a new custom composed configured feature.- Type Parameters:
C- the configuration type- Parameters:
resourceKey- the resource key of the configured feature, or null if not presentfeature- the custom featureconfig- the configuration instance carried to the custom feature- Returns:
- a new custom composed configured feature
- Since:
- 3.0.0
-
of
Creates a new custom composed configured feature without a resource key.- Type Parameters:
C- the configuration type- Parameters:
feature- the custom featureconfig- the configuration instance carried to the custom feature- Returns:
- a new custom composed configured feature
- Since:
- 3.0.0
-
builder
Creates a new builder.- Type Parameters:
C- the configuration type- Returns:
- a new builder
- Since:
- 3.0.0
-