Interface ConfiguredFeature
- All Known Subinterfaces:
AbstractCustomFeature
- All Known Implementing Classes:
ConfiguredFeature.CustomConfigured, ConfiguredFeature.Reference, ConfiguredFeature.VanillaConfigured, CustomFeature
@NullMarked
@AsOf("2.3.0")
public sealed interface ConfiguredFeature
extends Wrapper, Keyed
permits ConfiguredFeature.CustomConfigured, ConfiguredFeature.Reference, ConfiguredFeature.VanillaConfigured, AbstractCustomFeature
Wraps Minecraft's ConfiguredFeature.
ConfiguredFeature.Referenceis a reference to an already-registered configured feature.ConfiguredFeature.VanillaConfiguredis a configured feature authored from a vanilla feature type and configuration.ConfiguredFeature.CustomConfiguredis a configured feature composed of a registered custom feature with a config instance. The feature must already be registered under featureKey viaCustomFeature.registerAs(ResourceKey).
- Since:
- 2.3.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA configured feature composed of a registered custom feature with a config instance.static interfacestatic final recordA reference to an already-registered configured feature.static final recordA configured feature authored from a vanilla feature type and configuration.Nested classes/interfaces inherited from interface Wrapper
Wrapper.Context<C> -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncustom(ResourceKey featureKey, Object config) Composes a registered custom feature with a config instance.static ConfiguredFeaturereference(ResourceKey key) References a configured feature already registered under the given key.default ObjectConvert this handle to the real Minecraft object.vanilla(FeatureType featureType, FeatureConfiguration configuration) Authors a configured feature from a vanilla feature type and configuration.
-
Field Details
-
WIRE
-
-
Method Details
-
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
-
vanilla
@AsOf("2.3.0") static ConfiguredFeature.VanillaConfigured vanilla(FeatureType featureType, FeatureConfiguration configuration) Authors a configured feature from a vanilla feature type and configuration.- Parameters:
featureType- the vanilla feature algorithmconfiguration- the vanilla configuration for it- Returns:
- an authored configured feature
- Since:
- 2.3.0
-
custom
@AsOf("2.3.0") static ConfiguredFeature.CustomConfigured custom(ResourceKey featureKey, Object config) Composes a registered custom feature with a config instance. The feature must already be registered under featureKey via CustomFeature.register(...). The same feature may be composed with different configs.- Parameters:
featureKey- the key the custom feature was registered underconfig- the config instance to place with- Returns:
- an authored configured feature
- Since:
- 2.3.0
-
toMinecraft
Description copied from interface:WrapperConvert this handle to the real Minecraft object.- Specified by:
toMinecraftin interfaceWrapper- Returns:
- the real Minecraft object
-