All Superinterfaces:
DefaultedRegistryValue

@CatalogedBy(Features.class) public interface Feature extends DefaultedRegistryValue
Features include smaller objects placed in the world like trees, flowers, ore etc.

Features are used in world generation as a part of placed features

  • Method Details

    • type

      FeatureType type()
      Returns the feature type.
      Returns:
      The feature type
    • toContainer

      DataView toContainer()
      Returns the serialized feature configuration.

      Reconfigure a feature using FeatureType.configure(DataView)

      Returns:
      The serialized feature configuration
    • place

      boolean place(ServerWorld world, Vector3i pos)
      Places the feature at given position and world
      Parameters:
      world - The world
      pos - The position
      Returns:
      true when the feature was successfully placed
    • place

      boolean place(ServerLocation location)
      Places the feature at given location
      Parameters:
      location - The location
      Returns:
      true when the feature was successfully placed