first commit
This commit is contained in:
commit
41d8c71c65
32 files changed
+6765
No files matched your search
@@ -0,0 +1,41 @@
|
||||
interface text {
|
||||
use common.{named-color, rgb-color, argb-color};
|
||||
|
||||
resource text-component {
|
||||
text: static func(plain: string) -> text-component;
|
||||
translate: static func(key: string, %with: list<text-component>) -> text-component;
|
||||
|
||||
add-child: func(child: text-component);
|
||||
add-text: func(text: string);
|
||||
get-text: func() -> string;
|
||||
encode: func() -> list<u8>;
|
||||
|
||||
// Style
|
||||
|
||||
color-named: func(color: named-color);
|
||||
color-rgb: func(color: rgb-color);
|
||||
bold: func(value: bool);
|
||||
italic: func(value: bool);
|
||||
underlined: func(value: bool);
|
||||
strikethrough: func(value: bool);
|
||||
obfuscated: func(value: bool);
|
||||
/// Text inserted into chat when shift-clicked
|
||||
insertion: func(text: string);
|
||||
font: func(font: string);
|
||||
shadow-color: func(color: argb-color);
|
||||
|
||||
// Click events
|
||||
|
||||
click-open-url: func(url: string);
|
||||
click-run-command: func(command: string);
|
||||
click-suggest-command: func(command: string);
|
||||
click-copy-to-clipboard: func(text: string);
|
||||
|
||||
// Hover events
|
||||
|
||||
hover-show-text: func(text: text-component);
|
||||
/// Item data as SNBT string
|
||||
hover-show-item: func(item: string);
|
||||
hover-show-entity: func(entity-type: string, id: string, name: option<text-component>);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user