Class StructureDefinition.Builder<T>
java.lang.Object
com.gtnewhorizon.structurelib.structure.StructureDefinition.Builder<T>
- Enclosing class:
StructureDefinition<T>
-
Method Summary
Modifier and TypeMethodDescriptionaddChannel(IChannelDefinition definition) addChannel(String channel, int minimumValue, int maximumValue) addElement(char name, IStructureElement<T> structurePiece) addElement(Character name, IStructureElement<T> structurePiece) Deprecated.use the unboxed versionAdds shape.build()
-
Method Details
-
getElements
-
getShapes
-
addShape
Adds shape. Shape is a two-dimensional string array. Each character inside any of these strings will be later mapped to a particular type ofIStructureElementas indicated byaddElement(Character, IStructureElement).next char is next block(a) next string is next line(b) next string[] is next slice(c)
There are a few special reserved characters that are pre-mapped to some common structure elements
- + is anything but air
- - is air checks
- space bar is skip
- ~ is also skip (but marks controller position, not optional)
- char
A000-FFFFrange is reserved for generated skips
- Parameters:
name- unlocalized/code namestructurePiece- generated or written struct - DO NOT STORE IT ANYWHERE, or at least set them to null afterwards- Returns:
- this builder
-
addElement
@Deprecated public StructureDefinition.Builder<T> addElement(Character name, IStructureElement<T> structurePiece) Deprecated.use the unboxed version -
addElement
-
addChannel
-
addChannel
public StructureDefinition.Builder<T> addChannel(String channel, int minimumValue, int maximumValue) -
build
-