1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
//! These registries are sent by the server during the configuration state so
//! you should be relying on those if possible, but these are provided for your
//! convenience anyways.
use azalea_registry_macros::registry;
use crate::Registry;
registry! {
enum WolfVariant {
Pale => "minecraft:wolf",
Spotted => "minecraft:wolf_spotted",
Snowy => "minecraft:wolf_snowy",
Black => "minecraft:wolf_black",
Ashen => "minecraft:wolf_ashen",
Rusty => "minecraft:wolf_rusty",
Woods => "minecraft:wolf_woods",
Chestnut => "minecraft:wolf_chestnut",
Striped => "minecraft:wolf_striped",
}
}
#[allow(clippy::derivable_impls)]
impl Default for WolfVariant {
fn default() -> Self {
WolfVariant::Pale
}
}
registry! {
enum DimensionType {
Overworld => "minecraft:overworld",
Nether => "minecraft:the_nether",
End => "minecraft:the_end",
OverworldCaves => "minecraft:overworld_caves",
}
}
registry! {
enum TrimMaterial {
Quartz => "minecraft:quartz",
Iron => "minecraft:iron",
Netherite => "minecraft:netherite",
Redstone => "minecraft:redstone",
Copper => "minecraft:copper",
Gold => "minecraft:gold",
Emerald => "minecraft:emerald",
Diamond => "minecraft:diamond",
Lapis => "minecraft:lapis",
Amethyst => "minecraft:amethyst",
}
}
registry! {
enum TrimPattern {
Sentry => "sentry",
Dune => "dune",
Coast => "coast",
Wild => "wild",
Ward => "ward",
Eye => "eye",
Vex => "vex",
Tide => "tide",
Snout => "snout",
Rib => "rib",
Spire => "spire",
Wayfinder => "wayfinder",
Shaper => "shaper",
Silence => "silence",
Raiser => "raiser",
Host => "host",
Flow => "flow",
Bolt => "bolt",
}
}
registry! {
enum JukeboxSong {
Thirteen => "13",
Cat => "cat",
Blocks => "blocks",
Chirp => "chirp",
Far => "far",
Mall => "mall",
Mellohi => "mellohi",
Stal => "stal",
Strad => "strad",
Ward => "ward",
Eleven => "11",
Wait => "wait",
Pigstep => "pigstep",
Otherside => "otherside",
Five => "5",
Relic => "relic",
Precipice => "precipice",
Creator => "creator",
CreatorMusicBox => "creator_music_box",
}
}
registry! {
enum ChatType {
Chat => "chat",
SayCommand => "say_command",
MsgCommandIncoming => "msg_command_incoming",
MsgCommandOutgoing => "msg_command_outgoing",
TeamMsgCommandIncoming => "team_msg_command_incoming",
TeamMsgCommandOutgoing => "team_msg_command_outgoing",
EmoteCommand => "emote_command",
}
}
impl ChatType {
#[must_use]
pub fn chat_translation_key(self) -> &'static str {
match self {
ChatType::Chat => "chat.type.text",
ChatType::SayCommand => "chat.type.announcement",
ChatType::MsgCommandIncoming => "commands.message.display.incoming",
ChatType::MsgCommandOutgoing => "commands.message.display.outgoing",
ChatType::TeamMsgCommandIncoming => "chat.type.team.text",
ChatType::TeamMsgCommandOutgoing => "chat.type.team.sent",
ChatType::EmoteCommand => "chat.type.emote",
}
}
#[must_use]
pub fn narrator_translation_key(self) -> &'static str {
match self {
ChatType::EmoteCommand => "chat.type.emote",
_ => "chat.type.text.narrate",
}
}
}
|