Interface PlacedFeature
- All Known Implementing Classes:
PlacedFeature.Custom, PlacedFeature.Reference
@NullMarked
@AsOf("2.3.0")
public sealed interface PlacedFeature
extends Wrapper, Keyed
permits PlacedFeature.Reference, PlacedFeature.Custom
Wraps Minecraft's PlacedFeature, a configured feature paired with the ordered
list of placement modifiers applied to it. A placed feature may either reference
one already present in the
PLACED_FEATURE registry, or be authored from a
configured feature plus a list of modifiers.- Since:
- 2.3.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA placed feature authored from a configured feature and a modifier list.static interfacestatic final classstatic final recordA reference to an already-registered placed feature.Nested classes/interfaces inherited from interface Wrapper
Wrapper.Context<C> -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic PlacedFeature.FeatureBuilderbuilder()static PlacedFeatureof(ConfiguredFeature feature, PlacementModifier... placements) Authors a placed feature from a configured feature and a list of modifiers.static PlacedFeatureof(ConfiguredFeature feature, List<PlacementModifier> placements) Authors a placed feature from a configured feature and a list of modifiers.static PlacedFeaturereference(ResourceKey key) References a placed feature already registered under the given key.default ObjectConvert this handle to the real Minecraft object.
-
Field Details
-
WIRE
-
-
Method Details
-
reference
References a placed feature already registered under the given key.- Parameters:
key- the registry key of the placed feature- Returns:
- a reference to the registered placed feature
- Since:
- 2.3.0
-
of
@AsOf("2.3.0") static PlacedFeature of(ConfiguredFeature feature, List<PlacementModifier> placements) Authors a placed feature from a configured feature and a list of modifiers.- Parameters:
feature- the configured feature to placeplacements- the ordered placement modifiers- Returns:
- an authored placed feature
- Since:
- 2.3.0
-
of
Authors a placed feature from a configured feature and a list of modifiers.- Parameters:
feature- the configured feature to placeplacements- the ordered placement modifiers- Returns:
- an authored placed 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
-
builder
-