Interface Feature
- All Superinterfaces:
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 Summary
Modifier and TypeMethodDescriptionboolean
place
(ServerLocation location) Places the feature at given locationboolean
place
(ServerWorld world, Vector3i pos) Places the feature at given position and worldReturns the serialized feature configuration.type()
Returns the feature type.Methods inherited from interface org.spongepowered.api.registry.DefaultedRegistryValue
asDefaultedReference, findKey, key
-
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
Places the feature at given position and world- Parameters:
world
- The worldpos
- The position- Returns:
- true when the feature was successfully placed
-
place
Places the feature at given location- Parameters:
location
- The location- Returns:
- true when the feature was successfully placed
-