Interface PlacedFeature
- All Known Implementing Classes:
PlacedFeature.Composed, PlacedFeature.Reference
@NullMarked
@AsOf("2.3.0")
public sealed interface PlacedFeature
extends Wrapper, Keyed
permits PlacedFeature.Reference, PlacedFeature.Composed
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 classBuilder forPlacedFeature.static final recordA placed feature authored from a configured feature and a modifier list.static interfacestatic final recordA reference to an already-registered placed feature. -
Method Summary
Modifier and TypeMethodDescriptionstatic PlacedFeature.Builderbuilder()Creates a new builder.static PlacedFeatureReads a keyed Minecraft placed-feature holder into a reference wrapper.static PlacedFeature.Composedof(ConfiguredFeature feature, PlacementModifier... placements) Authors a placed feature from a configured feature and a list of modifiers.static PlacedFeature.Composedof(ConfiguredFeature feature, List<PlacementModifier> placements) Authors a placed feature from a configured feature and a list of modifiers.static PlacedFeature.Referencereference(ResourceKey key) References a placed feature already registered under the given key.default PlacedFeature.BuilderConverts this object to a builder.default ObjectConverts this placed feature to a Minecraft object.default PlacedFeaturewrap()Resolves this object's key in Minecraft's placed-feature registry and decodes the registered value.
-
Method Details
-
toMinecraft
Converts this placed feature to a Minecraft object.- Specified by:
toMinecraftin interfaceWrapper- Returns:
- a Minecraft object representing this placed feature
- Since:
- 2.3.0
-
toBuilder
Converts this object to a builder.- Returns:
- a builder with the same values as this object
- Since:
- 2.3.0
-
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
-
wrap
Resolves this object's key in Minecraft's placed-feature registry and decodes the registered value.- Returns:
- the decoded placed feature
- Since:
- 3.3.0
-
of
@AsOf("2.3.0") static PlacedFeature.Composed 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
@AsOf("2.3.0") static PlacedFeature.Composed of(ConfiguredFeature feature, 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
-
builder
Creates a new builder.- Returns:
- a new builder
- Since:
- 2.3.0
-
decode
Reads a keyed Minecraft placed-feature holder into a reference wrapper.- Parameters:
minecraftPlacedFeature- the placed-feature holder to read- Returns:
- a reference to the placed feature
- Since:
- 3.3.0
-