Interface PlacedFeature
- All Superinterfaces:
DataPackSerializable, DefaultedRegistryValue<PlacedFeature>
@CatalogedBy(PlacedFeatures.class)
public interface PlacedFeature
extends DefaultedRegistryValue<PlacedFeature>, 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.Builderbuilder()Creates a newPlacedFeature.Builderto create aPlacedFeature.<F extends FeatureType>
Featurefeature()Returns the feature.booleanplace(ServerLocation location) Places the feature at given locationbooleanplace(ServerWorld world, Vector3i pos) Places the feature at given position and worldReturns the list ofplacement modifiersMethods inherited from interface DataPackSerializable
toDataPackMethods inherited from interface DefaultedRegistryValue
asDefaultedReference, findKey, key
-
Method Details
-
builder
Creates a newPlacedFeature.Builderto 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
-