Interface PlacedFeature

All Superinterfaces:
Keyed, Wrapper
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
  • Field Details

  • Method Details

    • reference

      @AsOf("2.3.0") static PlacedFeature reference(ResourceKey key)
      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 place
      placements - the ordered placement modifiers
      Returns:
      an authored placed feature
      Since:
      2.3.0
    • of

      @AsOf("2.3.0") static PlacedFeature of(ConfiguredFeature feature, PlacementModifier... placements)
      Authors a placed feature from a configured feature and a list of modifiers.
      Parameters:
      feature - the configured feature to place
      placements - the ordered placement modifiers
      Returns:
      an authored placed feature
      Since:
      2.3.0
    • toMinecraft

      @AsOf("2.3.0") default Object toMinecraft()
      Description copied from interface: Wrapper
      Convert this handle to the real Minecraft object.
      Specified by:
      toMinecraft in interface Wrapper
      Returns:
      the real Minecraft object
    • builder

      @AsOf("2.3.0") static PlacedFeature.FeatureBuilder builder()