Interface Schematic.Builder
-
- All Superinterfaces:
AbstractBuilder<Schematic>
,Buildable.Builder<Schematic>
,Builder<Schematic,Schematic.Builder>
,CopyableBuilder<Schematic,Schematic.Builder>
,ResettableBuilder<Schematic,Schematic.Builder>
- Enclosing interface:
- Schematic
public static interface Schematic.Builder extends Builder<Schematic,Schematic.Builder>, CopyableBuilder<Schematic,Schematic.Builder>
A builder forSchematic
s.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Schematic.Builder
biomePalette(Palette<Biome,Biome> palette)
Specifies a palette for the schemtic to use for serialization.Schematic.Builder
biomePaletteType(PaletteType<Biome,Biome> type)
Specifies the palette type to use for biomes if thebiomePalette(Palette)
is not specified.Schematic.Builder
blockEntities(BlockEntityVolume volume)
Schematic.Builder
blockPalette(Palette<BlockState,BlockType> palette)
Specifies a palette for the schematic to use for serialization.Schematic.Builder
blockPaletteType(PaletteType<BlockState,BlockType> type)
Specifies the palette type to use if theSchematic.blockPalette()
is not specified.Schematic.Builder
blocks(BlockVolume volume)
Specifies an archetype volume for the world data of the schematic.Schematic
build()
Constructs a newSchematic
from this builder.Schematic.Builder
creator(ArchetypeVolumeCreator volume)
Specifies an extent view for the schematic to load its world data from.Schematic.Builder
entities(java.util.Collection<EntityArchetypeEntry> entities)
Schematic.Builder
entities(EntityArchetypeVolume volume)
Schematic.Builder
entity(EntityArchetype entityArchetype)
Schematic.Builder
entity(EntityArchetype entityArchetype, Vector3d position)
Schematic.Builder
entity(EntityArchetypeEntry entry)
Schematic.Builder
metadata(DataView metadata)
Specifies the metadata container.Schematic.Builder
metaValue(java.lang.String key, java.lang.Object value)
Specifies a metadata value which will be included in the metadata of the schematic.Schematic.Builder
volume(ArchetypeVolume volume)
-
Methods inherited from interface org.spongepowered.api.util.CopyableBuilder
from
-
-
-
-
Method Detail
-
blocks
Schematic.Builder blocks(BlockVolume volume)
Specifies an archetype volume for the world data of the schematic. This is to take part of the schematic, so it should not be referenced outside of the schematic, less modifications are going to be made also affectingthe block entity volume
.- Parameters:
volume
- The archetype volume- Returns:
- This builder, for chaining
-
blockEntities
Schematic.Builder blockEntities(BlockEntityVolume volume)
-
entities
Schematic.Builder entities(EntityArchetypeVolume volume)
-
creator
Schematic.Builder creator(ArchetypeVolumeCreator volume)
Specifies an extent view for the schematic to load its world data from.- Parameters:
volume
- The extent view- Returns:
- This builder, for chaining
-
volume
Schematic.Builder volume(ArchetypeVolume volume)
-
blockPalette
Schematic.Builder blockPalette(Palette<BlockState,BlockType> palette)
Specifies a palette for the schematic to use for serialization. This overrides theblockPaletteType(PaletteType)
value.- Parameters:
palette
- The palette to use for serialization- Returns:
- This builder, for chaining
-
biomePalette
Schematic.Builder biomePalette(Palette<Biome,Biome> palette)
Specifies a palette for the schemtic to use for serialization. This overrides thebiomePaletteType(PaletteType)
value.- Parameters:
palette
- The palette to use for serialization- Returns:
- This builder, for chaining
-
blockPaletteType
Schematic.Builder blockPaletteType(PaletteType<BlockState,BlockType> type)
Specifies the palette type to use if theSchematic.blockPalette()
is not specified.- Parameters:
type
- The palette type- Returns:
- This builder, for chaining
-
biomePaletteType
Schematic.Builder biomePaletteType(PaletteType<Biome,Biome> type)
Specifies the palette type to use for biomes if thebiomePalette(Palette)
is not specified.- Parameters:
type
- The type of biome palette- Returns:
- This builder, for chaining
-
entity
Schematic.Builder entity(EntityArchetype entityArchetype)
-
entity
Schematic.Builder entity(EntityArchetype entityArchetype, Vector3d position)
-
entity
Schematic.Builder entity(EntityArchetypeEntry entry)
-
entities
Schematic.Builder entities(java.util.Collection<EntityArchetypeEntry> entities)
-
metadata
Schematic.Builder metadata(DataView metadata)
Specifies the metadata container.- Parameters:
metadata
- The metadata container- Returns:
- This builder, for chaining
-
metaValue
Schematic.Builder metaValue(java.lang.String key, java.lang.Object value)
Specifies a metadata value which will be included in the metadata of the schematic.- Parameters:
key
- The metadata keyvalue
- The value- Returns:
- This builder, for chaining
-
build
Schematic build() throws java.lang.IllegalArgumentException
Constructs a newSchematic
from this builder.- Specified by:
build
in interfaceAbstractBuilder<Schematic>
- Specified by:
build
in interfaceBuildable.Builder<Schematic>
- Returns:
- The new schematic
- Throws:
java.lang.IllegalArgumentException
- If any required data was not specified
-
-