class
Rosegold::TextComponent
- Rosegold::TextComponent
- Reference
- Object
Included Modules
- JSON::Serializable
Defined in:
rosegold/models/text_component.crConstant Summary
-
TRANSLATIONS =
Hash(String, String).from_json(Rosegold.read_game_asset("1.21.8/language.json"))
Constructors
- .from_nbt(nbt : Minecraft::NBT::Tag) : TextComponent
- .new(pull : JSON::PullParser)
- .new(text : String | Nil = nil)
- .read(io : Minecraft::IO) : TextComponent
Instance Method Summary
- #block : String | Nil
- #block=(block : String | Nil)
- #bold : Bool | Nil
- #bold=(bold : Bool | Nil)
- #click_event : ClickEventComponent | Nil
- #click_event=(click_event : ClickEventComponent | Nil)
-
#color : String | Nil
Formatting fields
-
#color=(color : String | Nil)
Formatting fields
- #entity : String | Nil
- #entity=(entity : String | Nil)
-
#extra : Array(TextComponent) | Nil
Child components
-
#extra=(extra : Array(TextComponent) | Nil)
Child components
- #font : String | Nil
- #font=(font : String | Nil)
- #hover_event : HoverEventComponent | Nil
- #hover_event=(hover_event : HoverEventComponent | Nil)
-
#insertion : String | Nil
Interactive fields
-
#insertion=(insertion : String | Nil)
Interactive fields
- #interpret : Bool | Nil
- #interpret=(interpret : Bool | Nil)
- #italic : Bool | Nil
- #italic=(italic : Bool | Nil)
- #keybind : String | Nil
- #keybind=(keybind : String | Nil)
- #nbt : String | Nil
- #nbt=(nbt : String | Nil)
- #obfuscated : Bool | Nil
- #obfuscated=(obfuscated : Bool | Nil)
- #score : ScoreComponent | Nil
- #score=(score : ScoreComponent | Nil)
- #selector : String | Nil
- #selector=(selector : String | Nil)
- #separator : TextComponent | Nil
- #separator=(separator : TextComponent | Nil)
- #shadow_color : Array(Float32) | Nil
- #shadow_color=(shadow_color : Array(Float32) | Nil)
- #storage : String | Nil
- #storage=(storage : String | Nil)
- #strikethrough : Bool | Nil
- #strikethrough=(strikethrough : Bool | Nil)
- #text : String | Nil
- #text=(text : String | Nil)
- #to_nbt : Minecraft::NBT::Tag
-
#to_s(io : IO) : Nil
Appends a short String representation of this object which includes its class name and its object address.
-
#to_s : String
Returns a nicely readable and concise string representation of this object, typically intended for users.
- #translate : String | Nil
- #translate=(translate : String | Nil)
-
#type : String | Nil
Core content fields
-
#type=(type : String | Nil)
Core content fields
- #underlined : Bool | Nil
- #underlined=(underlined : Bool | Nil)
- #with : Array(TextComponent | String) | Nil
- #with=(with __arg0 : Array(TextComponent | String) | Nil)
Constructor Detail
Instance Method Detail
def to_s(io : IO) : Nil
#
Description copied from class Reference
Appends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>
def to_s : String
#
Description copied from class Object
Returns a nicely readable and concise string representation of this object, typically intended for users.
This method should usually not be overridden. It delegates to
#to_s(IO)
which can be overridden for custom implementations.
Also see #inspect
.