Interface BlockNBTComponent.Builder
- All Superinterfaces:
AbstractBuilder<BlockNBTComponent>, ComponentBuilder<BlockNBTComponent, BlockNBTComponent.Builder>, ComponentBuilderApplicable, ComponentLike, MutableStyleSetter<BlockNBTComponent.Builder>, NBTComponentBuilder<BlockNBTComponent, BlockNBTComponent.Builder>, StyleSetter<BlockNBTComponent.Builder>
- Enclosing interface:
BlockNBTComponent
public static sealed interface BlockNBTComponent.Builder
extends NBTComponentBuilder<BlockNBTComponent, BlockNBTComponent.Builder>
An NBT component builder.
- Since:
- 4.0.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault BlockNBTComponent.BuilderabsoluteWorldPos(int x, int y, int z) Sets the block position to an absoluteBlockNBTComponent.WorldPoswith the given coordinates.default BlockNBTComponent.BuilderlocalPos(double left, double up, double forwards) Sets the block position to aBlockNBTComponent.LocalPoswith the given values.pos(BlockNBTComponent.Pos pos) Sets the block position.default BlockNBTComponent.BuilderrelativeWorldPos(int x, int y, int z) Sets the block position to an relativeBlockNBTComponent.WorldPoswith the given coordinates.default BlockNBTComponent.BuilderworldPos(BlockNBTComponent.WorldPos.Coordinate x, BlockNBTComponent.WorldPos.Coordinate y, BlockNBTComponent.WorldPos.Coordinate z) Sets the block position to aBlockNBTComponent.WorldPoswith the given coordinates.Methods inherited from interface ComponentBuilder
append, append, append, append, append, append, appendNewline, appendSpace, applicableApply, apply, applyDeep, asComponent, build, children, clickEvent, color, colorIfAbsent, componentBuilderApply, decorate, decorate, decoration, decoration, decorationIfAbsent, decorations, decorations, font, hoverEvent, insertion, mapChildren, mapChildrenDeep, mergeStyle, mergeStyle, mergeStyle, resetStyle, style, styleMethods inherited from interface NBTComponentBuilder
interpret, nbtPath, plain, separatorMethods inherited from interface StyleSetter
shadowColor, shadowColorIfAbsent
-
Method Details
-
pos
Sets the block position.- Parameters:
pos- the block position- Returns:
- this builder
- Since:
- 4.0.0
-
localPos
@Contract("_, _, _ -> this") default BlockNBTComponent.Builder localPos(double left, double up, double forwards) Sets the block position to aBlockNBTComponent.LocalPoswith the given values.- Parameters:
left- the left valueup- the up valueforwards- the forwards value- Returns:
- this builder
- Since:
- 4.0.0
-
worldPos
@Contract("_, _, _ -> this") default BlockNBTComponent.Builder worldPos(BlockNBTComponent.WorldPos.Coordinate x, BlockNBTComponent.WorldPos.Coordinate y, BlockNBTComponent.WorldPos.Coordinate z) Sets the block position to aBlockNBTComponent.WorldPoswith the given coordinates.- Parameters:
x- the x coordinatey- the y coordinatez- the z coordinate- Returns:
- this builder
- Since:
- 4.0.0
-
absoluteWorldPos
@Contract("_, _, _ -> this") default BlockNBTComponent.Builder absoluteWorldPos(int x, int y, int z) Sets the block position to an absoluteBlockNBTComponent.WorldPoswith the given coordinates.- Parameters:
x- the x coordinatey- the y coordinatez- the z coordinate- Returns:
- this builder
- Since:
- 4.0.0
-
relativeWorldPos
@Contract("_, _, _ -> this") default BlockNBTComponent.Builder relativeWorldPos(int x, int y, int z) Sets the block position to an relativeBlockNBTComponent.WorldPoswith the given coordinates.- Parameters:
x- the x coordinatey- the y coordinatez- the z coordinate- Returns:
- this builder
- Since:
- 4.0.0
-