Expand description
Data model for Minecraft text components.
The types in this module represent the component schema shared by JSON and NBT text component encodings.
Re-exports§
pub use crate::basic::Uuid;
Structs§
- Command
String - A command string validated for use in a text component click event.
- Component
Object - A full text component object with content, style, and appended components.
- Component
Sequence - A non-empty list shorthand for a sequence of text components.
- Empty
Component Sequence - Error returned when an empty list is converted into a
ComponentSequence. - HttpUrl
- A validated absolute HTTP or HTTPS URL used by an
open_urlclick event. - Invalid
Command String - Error returned when a command contains a character forbidden by Minecraft.
- Invalid
Http Url - Error returned when an
open_urlvalue is not an absolute HTTP or HTTPS URL. - Invalid
Player Name - Error returned when a string is not a valid
PlayerName. - Invalid
Resource Location - Error returned when a string is not a valid
ResourceLocation. - Invalid
RgbColor - Error returned when an RGB value does not fit in 24 bits.
- Invalid
Uuid - Error returned when a UUID representation is malformed.
- Player
Name - A validated Java Edition player name.
- Positive
I32 - A strictly positive signed 32-bit integer.
- Profile
- Player profile data used to render a player object.
- Profile
Property - A property attached to a player profile.
- Resource
Location - A validated Minecraft resource location.
- RgbColor
- A 24-bit red, green, and blue color.
- Score
- A scoreboard holder and objective referenced by score content.
- Shadow
Color - A text shadow color stored as a packed 32-bit ARGB value.
- Style
- Optional formatting and interaction properties for a component.
Enums§
- Click
Event - An action performed when a styled component is clicked.
- Component
- The Java Edition text component schema documented for the current protocol.
- Content
- The mutually exclusive content payload of a
ComponentObject. - Dialog
Reference - A reference to a registered dialog or an inline dialog definition.
- Hover
Event - Content shown when a styled component is hovered.
- Invalid
Component Object - Describes why a serialized component object does not match the component schema.
- Named
Color - A predefined Minecraft text color.
- NbtDisplay
- Controls how values extracted from NBT are rendered.
- NbtTarget
- The source queried by an NBT component.
- Object
Content - The object rendered by object content.
- Player
Model - The geometry used to render a player skin.
- Player
Profile - The shorthand or full representation of a player profile.
- Profile
Property Name - A supported player profile property name.
- Text
Color - A named Minecraft color or an explicit 24-bit RGB color.
Constants§
- TEXT_
COMPONENT_ FORMAT_ VERSION - Java Edition release whose text component schema is represented here.
Type Aliases§
- Json
Component - A text component whose dynamic payloads use JSON values.
- NbtComponent
- A text component whose dynamic payloads use NBT values.