Add ChatType
This commit is contained in:
1 parent
65c2207c0a
commit
5cf19a4e98
16 files changed
+158
-151
No files matched your search
@@ -1,3 +1,4 @@
|
||||
use pumpkin_text::style::Style;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
@@ -9,9 +10,8 @@ pub struct ChatType {
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
pub struct Decoration {
|
||||
translation_key: String,
|
||||
style: u8,
|
||||
// TODO
|
||||
// style: Option<Styles>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
style: Option<Style>,
|
||||
parameters: Vec<String>,
|
||||
}
|
||||
|
||||
@@ -19,12 +19,12 @@ impl Default for ChatType {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
chat: Decoration {
|
||||
style: 0,
|
||||
style: None,
|
||||
parameters: vec!["sender".into(), "content".into()],
|
||||
translation_key: "chat.type.text".into(),
|
||||
},
|
||||
narration: Decoration {
|
||||
style: 0,
|
||||
style: None,
|
||||
parameters: vec!["sender".into(), "content".into()],
|
||||
translation_key: "chat.type.text.narrate".into(),
|
||||
},
|
||||
|
||||
@@ -52,7 +52,7 @@ impl Registry {
|
||||
}],
|
||||
};
|
||||
|
||||
let _chat_types = Registry {
|
||||
let chat_types = Registry {
|
||||
registry_id: "minecraft:chat_type".to_string(),
|
||||
registry_entries: vec![RegistryEntry {
|
||||
entry_id: "minecraft:chat",
|
||||
@@ -79,7 +79,7 @@ impl Registry {
|
||||
biomes,
|
||||
wolf_variants,
|
||||
paintings,
|
||||
// chat_types,
|
||||
chat_types,
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user