Interface ConfiguredFeature
- All Known Subinterfaces:
ComposedConfiguredFeature, CustomComposedConfiguredFeature<C>, ReferencedConfiguredFeature
A configured feature is a feature that has been configured with a specific configuration.
Configured features are used to generate features in the world and are tied to biomes.
- Since:
- 2.3.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncomposed()Authors a configured feature from a vanilla feature type and configuration.static <C> CustomComposedConfiguredFeature.Builder<C> custom()Composes a registered custom feature with a config instance.static <C> CustomComposedConfiguredFeature<C> custom(CustomFeature<C> feature, C config) Composes a custom feature with a config instance.static ConfiguredFeatureReads a keyed Minecraft configured-feature holder into a wrapper.static <C> CustomComposedConfiguredFeature<C> of(CustomFeature<C> feature, C config) Composes a registered custom feature with a config instance.static ComposedConfiguredFeatureof(FeatureType featureType, FeatureConfiguration config) Authors a configured feature from a vanilla feature type and configuration.static ReferencedConfiguredFeaturereference(ResourceKey key) References a configured feature already registered under the given key.The resource key of the configured feature, if present.default ConfiguredFeaturewrap()Resolves this object's key in Minecraft's configured-feature registry and decodes the registered value.Methods inherited from interface Wrapper
asHandle, toMinecraft, unwrap
-
Method Details
-
resourceKey
The resource key of the configured feature, if present.- Returns:
- the resource key of the configured feature, if present
- Since:
- 3.0.0
-
of
@AsOf("2.3.0") @Obsolete static ComposedConfiguredFeature of(FeatureType featureType, FeatureConfiguration config) Authors a configured feature from a vanilla feature type and configuration.- Parameters:
featureType- the vanilla feature typeconfig- the configuration- Returns:
- an authored configured feature
- Since:
- 2.3.0
-
custom
@AsOf("3.0.0") static <C> CustomComposedConfiguredFeature<C> custom(CustomFeature<C> feature, C config) Composes a custom feature with a config instance.- Type Parameters:
C- the config type- Parameters:
feature- the custom feature to composeconfig- the config instance to place with- Returns:
- an authored configured feature
- Since:
- 3.0.0
-
of
@AsOf("3.0.0") @Obsolete static <C> CustomComposedConfiguredFeature<C> of(CustomFeature<C> feature, C config) Composes a registered custom feature with a config instance.- Type Parameters:
C- the config type- Parameters:
feature- the custom feature to composeconfig- the config instance to place with- Returns:
- an authored configured feature
- Since:
- 3.0.0
-
reference
References a configured feature already registered under the given key.- Parameters:
key- the registry key of the configured feature- Returns:
- a reference to the registered configured feature
- Since:
- 2.3.0
-
wrap
Resolves this object's key in Minecraft's configured-feature registry and decodes the registered value.- Returns:
- the decoded configured feature
- Throws:
IllegalStateException- if this object has no resource key- Since:
- 3.3.0
-
composed
Authors a configured feature from a vanilla feature type and configuration.- Returns:
- an authored configured feature
- Since:
- 3.0.0
-
custom
Composes a registered custom feature with a config instance. The feature- Type Parameters:
C- the config type- Returns:
- an authored configured feature
- Since:
- 3.0.0
-
decode
Reads a keyed Minecraft configured-feature holder into a wrapper.- Parameters:
minecraftFeature- the configured-feature holder to read- Returns:
- the wrapper for the configured feature
- Since:
- 3.3.0
-