Interface PlacedFeature
- All Superinterfaces:
DataPackSerializable
,DefaultedRegistryValue
@CatalogedBy(PlacedFeatures.class)
public interface PlacedFeature
extends DefaultedRegistryValue, DataPackSerializable
Placed Features are a combination of a
Feature
with a list of placement modifiers
.
Modifiers can impact position, rarity, count and more.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic PlacedFeature.Builder
builder()
Creates a newPlacedFeature.Builder
to create aPlacedFeature
.<F extends FeatureType>
Featurefeature()
Returns the feature.boolean
place
(ServerLocation location) Places the feature at given locationboolean
place
(ServerWorld world, Vector3i pos) Places the feature at given position and worldReturns the list ofplacement modifiers
Methods inherited from interface org.spongepowered.api.datapack.DataPackSerializable
toDataPack
Methods inherited from interface org.spongepowered.api.registry.DefaultedRegistryValue
asDefaultedReference, findKey, key
-
Method Details
-
builder
Creates a newPlacedFeature.Builder
to create aPlacedFeature
.- Returns:
- The new builder
-
feature
Returns the feature.- Type Parameters:
F
- The feature type- Returns:
- The feature configuration
-
placementModifiers
List<PlacementModifier> placementModifiers()Returns the list ofplacement modifiers
- Returns:
- The list of placement modifiers
-
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
-