1use crate::dimension_type::{
2 BackgroundMusic, BedRule, DimensionType, DimensionTypeRegistry, MonsterSpawnLightLevel,
3 MoodSound, MusicEntry,
4};
5use std::borrow::Cow;
6use steel_utils::Identifier;
7pub static OVERWORLD: DimensionType = DimensionType {
8 key: Identifier::vanilla_static("overworld"),
9 fixed_time: None,
10 has_skylight: true,
11 has_ceiling: false,
12 coordinate_scale: 1f64,
13 min_y: -64i32,
14 height: 384i32,
15 logical_height: 384i32,
16 infiniburn: "#minecraft:infiniburn_overworld",
17 ambient_light: 0f32,
18 default_clock: Some("minecraft:overworld"),
19 timelines: Some("#minecraft:in_overworld"),
20 has_ender_dragon_fight: false,
21 monster_spawn_light_level: MonsterSpawnLightLevel::Complex {
22 distribution_type: "minecraft:uniform",
23 min_inclusive: 0i32,
24 max_inclusive: 7i32,
25 },
26 monster_spawn_block_light_limit: 0i32,
27 skybox: None,
28 cardinal_light: None,
29 sky_color: Some("#78a7ff"),
30 fog_color: Some("#c0d8ff"),
31 cloud_color: Some("#ccffffff"),
32 cloud_height: Some(192.33f32),
33 ambient_light_color: Some("#0a0a0a"),
34 sky_light_color: None,
35 sky_light_factor: None,
36 fog_start_distance: None,
37 fog_end_distance: None,
38 default_dripstone_particle: None,
39 respawn_anchor_works: false,
40 can_start_raid: true,
41 fast_lava: false,
42 piglins_zombify: true,
43 sky_light_level: None,
44 snow_golem_melts: false,
45 water_evaporates: false,
46 nether_portal_spawns_piglin: true,
47 bed_rule: BedRule {
48 can_set_spawn: "always",
49 can_sleep: "when_dark",
50 explodes: false,
51 error_message_key: Some("block.minecraft.bed.no_sleep"),
52 },
53 mood_sound: Some(MoodSound {
54 sound: &crate::sound_events::AMBIENT_CAVE,
55 tick_delay: 6000i32,
56 block_search_extent: 8i32,
57 offset: 2f64,
58 }),
59 background_music: Some(BackgroundMusic {
60 default: MusicEntry {
61 sound: &crate::sound_events::MUSIC_GAME,
62 min_delay: 12000i32,
63 max_delay: 24000i32,
64 replace_current_music: false,
65 },
66 creative: Some(MusicEntry {
67 sound: &crate::sound_events::MUSIC_CREATIVE,
68 min_delay: 12000i32,
69 max_delay: 24000i32,
70 replace_current_music: false,
71 }),
72 }),
73};
74pub static OVERWORLD_CAVES: DimensionType = DimensionType {
75 key: Identifier::vanilla_static("overworld_caves"),
76 fixed_time: None,
77 has_skylight: true,
78 has_ceiling: true,
79 coordinate_scale: 1f64,
80 min_y: -64i32,
81 height: 384i32,
82 logical_height: 384i32,
83 infiniburn: "#minecraft:infiniburn_overworld",
84 ambient_light: 0f32,
85 default_clock: Some("minecraft:overworld"),
86 timelines: Some("#minecraft:in_overworld"),
87 has_ender_dragon_fight: false,
88 monster_spawn_light_level: MonsterSpawnLightLevel::Complex {
89 distribution_type: "minecraft:uniform",
90 min_inclusive: 0i32,
91 max_inclusive: 7i32,
92 },
93 monster_spawn_block_light_limit: 0i32,
94 skybox: None,
95 cardinal_light: None,
96 sky_color: Some("#78a7ff"),
97 fog_color: Some("#c0d8ff"),
98 cloud_color: Some("#ccffffff"),
99 cloud_height: Some(192.33f32),
100 ambient_light_color: Some("#0a0a0a"),
101 sky_light_color: None,
102 sky_light_factor: None,
103 fog_start_distance: None,
104 fog_end_distance: None,
105 default_dripstone_particle: None,
106 respawn_anchor_works: false,
107 can_start_raid: true,
108 fast_lava: false,
109 piglins_zombify: true,
110 sky_light_level: None,
111 snow_golem_melts: false,
112 water_evaporates: false,
113 nether_portal_spawns_piglin: true,
114 bed_rule: BedRule {
115 can_set_spawn: "always",
116 can_sleep: "when_dark",
117 explodes: false,
118 error_message_key: Some("block.minecraft.bed.no_sleep"),
119 },
120 mood_sound: Some(MoodSound {
121 sound: &crate::sound_events::AMBIENT_CAVE,
122 tick_delay: 6000i32,
123 block_search_extent: 8i32,
124 offset: 2f64,
125 }),
126 background_music: Some(BackgroundMusic {
127 default: MusicEntry {
128 sound: &crate::sound_events::MUSIC_GAME,
129 min_delay: 12000i32,
130 max_delay: 24000i32,
131 replace_current_music: false,
132 },
133 creative: Some(MusicEntry {
134 sound: &crate::sound_events::MUSIC_CREATIVE,
135 min_delay: 12000i32,
136 max_delay: 24000i32,
137 replace_current_music: false,
138 }),
139 }),
140};
141pub static THE_END: DimensionType = DimensionType {
142 key: Identifier::vanilla_static("the_end"),
143 fixed_time: Some(6000i64),
144 has_skylight: true,
145 has_ceiling: false,
146 coordinate_scale: 1f64,
147 min_y: 0i32,
148 height: 256i32,
149 logical_height: 256i32,
150 infiniburn: "#minecraft:infiniburn_end",
151 ambient_light: 0.25f32,
152 default_clock: Some("minecraft:the_end"),
153 timelines: Some("#minecraft:in_end"),
154 has_ender_dragon_fight: true,
155 monster_spawn_light_level: MonsterSpawnLightLevel::Simple(15i32),
156 monster_spawn_block_light_limit: 0i32,
157 skybox: Some("end"),
158 cardinal_light: None,
159 sky_color: Some("#000000"),
160 fog_color: Some("#181318"),
161 cloud_color: None,
162 cloud_height: None,
163 ambient_light_color: Some("#3f473f"),
164 sky_light_color: Some("#ac60cd"),
165 sky_light_factor: Some(0f32),
166 fog_start_distance: None,
167 fog_end_distance: None,
168 default_dripstone_particle: None,
169 respawn_anchor_works: false,
170 can_start_raid: true,
171 fast_lava: false,
172 piglins_zombify: true,
173 sky_light_level: None,
174 snow_golem_melts: false,
175 water_evaporates: false,
176 nether_portal_spawns_piglin: false,
177 bed_rule: BedRule {
178 can_set_spawn: "never",
179 can_sleep: "never",
180 explodes: true,
181 error_message_key: None,
182 },
183 mood_sound: Some(MoodSound {
184 sound: &crate::sound_events::AMBIENT_CAVE,
185 tick_delay: 6000i32,
186 block_search_extent: 8i32,
187 offset: 2f64,
188 }),
189 background_music: Some(BackgroundMusic {
190 default: MusicEntry {
191 sound: &crate::sound_events::MUSIC_END,
192 min_delay: 6000i32,
193 max_delay: 24000i32,
194 replace_current_music: true,
195 },
196 creative: None,
197 }),
198};
199pub static THE_NETHER: DimensionType = DimensionType {
200 key: Identifier::vanilla_static("the_nether"),
201 fixed_time: Some(18000i64),
202 has_skylight: false,
203 has_ceiling: true,
204 coordinate_scale: 8f64,
205 min_y: 0i32,
206 height: 256i32,
207 logical_height: 128i32,
208 infiniburn: "#minecraft:infiniburn_nether",
209 ambient_light: 0.1f32,
210 default_clock: None,
211 timelines: Some("#minecraft:in_nether"),
212 has_ender_dragon_fight: false,
213 monster_spawn_light_level: MonsterSpawnLightLevel::Simple(7i32),
214 monster_spawn_block_light_limit: 15i32,
215 skybox: Some("none"),
216 cardinal_light: Some("nether"),
217 sky_color: None,
218 fog_color: None,
219 cloud_color: None,
220 cloud_height: None,
221 ambient_light_color: Some("#302821"),
222 sky_light_color: Some("#7a7aff"),
223 sky_light_factor: Some(0f32),
224 fog_start_distance: Some(10f32),
225 fog_end_distance: Some(96f32),
226 default_dripstone_particle: Some("minecraft:dripping_dripstone_lava"),
227 respawn_anchor_works: true,
228 can_start_raid: false,
229 fast_lava: true,
230 piglins_zombify: false,
231 sky_light_level: Some(4f32),
232 snow_golem_melts: true,
233 water_evaporates: true,
234 nether_portal_spawns_piglin: false,
235 bed_rule: BedRule {
236 can_set_spawn: "never",
237 can_sleep: "never",
238 explodes: true,
239 error_message_key: None,
240 },
241 mood_sound: None,
242 background_music: None,
243};
244pub fn register_dimension_types(registry: &mut DimensionTypeRegistry) {
245 registry.register(&OVERWORLD);
246 registry.register(&OVERWORLD_CAVES);
247 registry.register(&THE_END);
248 registry.register(&THE_NETHER);
249}