Interface BrushBuilder
public interface BrushBuilder
Builder to build brushes.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddSchematicSet(SchematicSetBuilder schematicSetBuilder) Add a new schematic set builderBuild the schematic brushBuilds the settings of a brush from the current state.voidclear()Reset all modifier to default and clear schematic sets.intCreate a new schematic setintGet the schematic count of the brushgetSchematicSet(int id) Get the schematic set builder for the set with the idGet the current placement modifiervoidrefresh()Reload all schematics in the brush<T extends Nameable>
voidremovePlacementModifier(T type) Removes the placement modifierbooleanremoveSchematicSet(int id) Remove the set with the idvoidrestore(BrushBuilderSnapshot snapshot) Replaces the placement modifiers and schematic sets with copies of those in the snapshot.Get the registered schematic set builder<T extends Nameable>
voidsetPlacementModifier(T type, Mutator<?> provider) Sets the placement modifiersnapshot()Get a immutable snapshot of the brush builder.
-
Method Details
-
getSchematicSet
Get the schematic set builder for the set with the id- Parameters:
id- id- Returns:
- set if the id exists
-
removeSchematicSet
boolean removeSchematicSet(int id) Remove the set with the id- Parameters:
id- id- Returns:
- true if the set with the id was removed
-
createSchematicSet
int createSchematicSet()Create a new schematic set- Returns:
- id of the created schematic set
-
setPlacementModifier
-
removePlacementModifier
Removes the placement modifier- Type Parameters:
T- Type of the placement modifier- Parameters:
type- type
-
build
Build the schematic brush- Parameters:
plugin- pluginowner- brush owner- Returns:
- new schematic brush instance
-
buildSettings
BrushSettings buildSettings()Builds the settings of a brush from the current state. The settings share no mutable state with this builder.- Returns:
- new brush settings
-
addSchematicSet
Add a new schematic set builder- Parameters:
schematicSetBuilder- builder to add
-
schematicSets
List<SchematicSetBuilder> schematicSets()Get the registered schematic set builder- Returns:
- unmodifiable list of schematic sets
-
placementModifier
-
clear
void clear()Reset all modifier to default and clear schematic sets. -
getSchematicCount
int getSchematicCount()Get the schematic count of the brush- Returns:
- schematic count
-
refresh
void refresh()Reload all schematics in the brush -
snapshot
-
restore
Replaces the placement modifiers and schematic sets with copies of those in the snapshot.- Parameters:
snapshot- snapshot to restore
-