Interface Structure
- All Superinterfaces:
DefaultedRegistryValue
A structure used in world generation.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the biomes the structure is allowed in.Returns the decoration step the structure is used in.boolean
place
(ServerLocation location) Places the structure at given locationboolean
place
(ServerWorld world, Vector3i pos) Places the structure at given position and worldspawners()
Returns the spawner overrides to use in the structure instead ofBiome.spawners()
Returns the serialized structure configuration.type()
Returns the structure type.Methods inherited from interface org.spongepowered.api.registry.DefaultedRegistryValue
asDefaultedReference, findKey, key
-
Method Details
-
place
Places the structure at given position and world- Parameters:
world
- The worldpos
- The position- Returns:
- true when the feature was successfully placed
-
place
Places the structure at given location- Parameters:
location
- The location- Returns:
- true when the feature was successfully placed
-
allowedBiomes
Collection<Biome> allowedBiomes()Returns the biomes the structure is allowed in.- Returns:
- The allowed biomes.
-
decorationStep
DecorationStep decorationStep()Returns the decoration step the structure is used in.- Returns:
- The decoration step
-
type
StructureType type()Returns the structure type.- Returns:
- The structure type
-
spawners
Map<EntityCategory,Structure.StructureNaturalSpawner> spawners()Returns the spawner overrides to use in the structure instead ofBiome.spawners()
- Returns:
- The spawner overrides
-
toContainer
DataView toContainer()Returns the serialized structure configuration.Reconfigure a structure using
StructureType.configure(DataView)
- Returns:
- The serialized structure configuration
-