Package net.kyori.adventure.text
Interface BlockNBTComponent
- All Superinterfaces:
Buildable<BlockNBTComponent,,BlockNBTComponent.Builder> BuildableComponent<BlockNBTComponent,,BlockNBTComponent.Builder> Component,ComponentBuilderApplicable,ComponentLike,net.kyori.examination.Examinable,HoverEventSource<Component>,NBTComponent<BlockNBTComponent,,BlockNBTComponent.Builder> ScopedComponent<BlockNBTComponent>,StyleGetter,StyleSetter<Component>
public interface BlockNBTComponent
extends NBTComponent<BlockNBTComponent,BlockNBTComponent.Builder>, ScopedComponent<BlockNBTComponent>
Given an in-game position, this component reads the NBT of the associated block and displays that information.
This component consists of:
- pos
- a position in the world the component is being displayed in.
- everything in
NBTComponent
- Since:
- 4.0.0
- See Also:
- Since Minecraft:
- 1.14
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAn NBT component builder.static interfaceA local position.static interfaceA position.static interfaceA world position. -
Field Summary
Fields inherited from interface net.kyori.adventure.text.Component
EQUALS, EQUALS_IDENTITY, IS_NOT_EMPTY -
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull BlockNBTComponentabsoluteWorldPos(int x, int y, int z) Sets the block position to an absoluteBlockNBTComponent.WorldPoswith the given coordinates.default @NotNull Stream<? extends net.kyori.examination.ExaminableProperty>default @NotNull BlockNBTComponentlocalPos(double left, double up, double forwards) Sets the block position to aBlockNBTComponent.LocalPoswith the given coordinates.@NotNull BlockNBTComponent.Pospos()Gets the block position.@NotNull BlockNBTComponentpos(@NotNull BlockNBTComponent.Pos pos) Sets the block position.default @NotNull BlockNBTComponentrelativeWorldPos(int x, int y, int z) Sets the block position to an relativeBlockNBTComponent.WorldPoswith the given coordinates.default @NotNull BlockNBTComponentworldPos(@NotNull BlockNBTComponent.WorldPos.Coordinate x, @NotNull BlockNBTComponent.WorldPos.Coordinate y, @NotNull BlockNBTComponent.WorldPos.Coordinate z) Sets the block position to aBlockNBTComponent.WorldPoswith the given coordinates.Methods inherited from interface net.kyori.adventure.text.BuildableComponent
toBuilderMethods inherited from interface net.kyori.adventure.text.Component
asHoverEvent, children, clickEvent, color, compact, componentBuilderApply, contains, contains, decoration, decorations, detectCycle, font, hasDecoration, hasStyling, hoverEvent, insertion, iterable, iterable, iterator, iterator, replaceFirstText, replaceFirstText, replaceText, replaceText, replaceText, replaceText, replaceText, replaceText, replaceText, replaceText, shadowColor, spliterator, spliterator, styleMethods inherited from interface net.kyori.examination.Examinable
examinableName, examineMethods inherited from interface net.kyori.adventure.text.event.HoverEventSource
asHoverEventMethods inherited from interface net.kyori.adventure.text.NBTComponent
interpret, interpret, nbtPath, nbtPath, separator, separatorMethods inherited from interface net.kyori.adventure.text.ScopedComponent
append, append, append, append, append, appendNewline, appendSpace, applyFallbackStyle, applyFallbackStyle, asComponent, children, clickEvent, color, colorIfAbsent, decorate, decoration, decoration, decorationIfAbsent, decorations, font, hoverEvent, insertion, mergeStyle, mergeStyle, mergeStyle, shadowColor, shadowColorIfAbsent, style, style, style, styleMethods inherited from interface net.kyori.adventure.text.format.StyleSetter
decorate, decorations
-
Method Details
-
pos
Gets the block position.- Returns:
- the block position
- Since:
- 4.0.0
-
pos
@Contract(pure=true) @NotNull @NotNull BlockNBTComponent pos(@NotNull @NotNull BlockNBTComponent.Pos pos) Sets the block position.- Parameters:
pos- the block position- Returns:
- a block NBT component
- Since:
- 4.0.0
-
localPos
@Contract(pure=true) @NotNull default @NotNull BlockNBTComponent localPos(double left, double up, double forwards) Sets the block position to aBlockNBTComponent.LocalPoswith the given coordinates.- Parameters:
left- the left coordinateup- the up coordinateforwards- the forwards coordinate- Returns:
- a block NBT component
- Since:
- 4.0.0
-
worldPos
@Contract(pure=true) @NotNull default @NotNull BlockNBTComponent worldPos(@NotNull BlockNBTComponent.WorldPos.Coordinate x, @NotNull BlockNBTComponent.WorldPos.Coordinate y, @NotNull 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:
- a block NBT component
- Since:
- 4.0.0
-
absoluteWorldPos
@Contract(pure=true) @NotNull default @NotNull BlockNBTComponent 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:
- a block NBT component
- Since:
- 4.0.0
-
relativeWorldPos
@Contract(pure=true) @NotNull default @NotNull BlockNBTComponent 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:
- a block NBT component
- Since:
- 4.0.0
-
examinableProperties
@NotNull default @NotNull Stream<? extends net.kyori.examination.ExaminableProperty> examinableProperties()- Specified by:
examinablePropertiesin interfaceComponent- Specified by:
examinablePropertiesin interfacenet.kyori.examination.Examinable- Specified by:
examinablePropertiesin interfaceNBTComponent<BlockNBTComponent,BlockNBTComponent.Builder>
-