1use crate::timeline::{
2 Timeline, TimelineRegistry, Track, Keyframe, KeyframeValue, Ease, TimeMarker,
3};
4use steel_utils::Identifier;
5pub static MOON: Timeline = Timeline {
6 key: Identifier::vanilla_static("moon"),
7 clock: &crate::vanilla_world_clocks::OVERWORLD,
8 period_ticks: Some(192000i32),
9 tracks: &[
10 Track {
11 name: "minecraft:gameplay/surface_slime_spawn_chance",
12 ease: Some(Ease::Named("constant")),
13 modifier: Some("maximum"),
14 keyframes: &[
15 Keyframe {
16 ticks: 0i64,
17 value: KeyframeValue::Float(0.5f32),
18 },
19 Keyframe {
20 ticks: 24000i64,
21 value: KeyframeValue::Float(0.375f32),
22 },
23 Keyframe {
24 ticks: 48000i64,
25 value: KeyframeValue::Float(0.25f32),
26 },
27 Keyframe {
28 ticks: 72000i64,
29 value: KeyframeValue::Float(0.125f32),
30 },
31 Keyframe {
32 ticks: 96000i64,
33 value: KeyframeValue::Float(0f32),
34 },
35 Keyframe {
36 ticks: 120000i64,
37 value: KeyframeValue::Float(0.125f32),
38 },
39 Keyframe {
40 ticks: 144000i64,
41 value: KeyframeValue::Float(0.25f32),
42 },
43 Keyframe {
44 ticks: 168000i64,
45 value: KeyframeValue::Float(0.375f32),
46 },
47 ],
48 },
49 Track {
50 name: "minecraft:visual/moon_phase",
51 ease: None,
52 modifier: None,
53 keyframes: &[
54 Keyframe {
55 ticks: 0i64,
56 value: KeyframeValue::String("full_moon"),
57 },
58 Keyframe {
59 ticks: 24000i64,
60 value: KeyframeValue::String("waning_gibbous"),
61 },
62 Keyframe {
63 ticks: 48000i64,
64 value: KeyframeValue::String("third_quarter"),
65 },
66 Keyframe {
67 ticks: 72000i64,
68 value: KeyframeValue::String("waning_crescent"),
69 },
70 Keyframe {
71 ticks: 96000i64,
72 value: KeyframeValue::String("new_moon"),
73 },
74 Keyframe {
75 ticks: 120000i64,
76 value: KeyframeValue::String("waxing_crescent"),
77 },
78 Keyframe {
79 ticks: 144000i64,
80 value: KeyframeValue::String("first_quarter"),
81 },
82 Keyframe {
83 ticks: 168000i64,
84 value: KeyframeValue::String("waxing_gibbous"),
85 },
86 ],
87 },
88 ],
89 time_markers: &[],
90};
91pub static VILLAGER_SCHEDULE: Timeline = Timeline {
92 key: Identifier::vanilla_static("villager_schedule"),
93 clock: &crate::vanilla_world_clocks::OVERWORLD,
94 period_ticks: Some(24000i32),
95 tracks: &[
96 Track {
97 name: "minecraft:gameplay/baby_villager_activity",
98 ease: None,
99 modifier: None,
100 keyframes: &[
101 Keyframe {
102 ticks: 10i64,
103 value: KeyframeValue::String("minecraft:idle"),
104 },
105 Keyframe {
106 ticks: 3000i64,
107 value: KeyframeValue::String("minecraft:play"),
108 },
109 Keyframe {
110 ticks: 6000i64,
111 value: KeyframeValue::String("minecraft:idle"),
112 },
113 Keyframe {
114 ticks: 10000i64,
115 value: KeyframeValue::String("minecraft:play"),
116 },
117 Keyframe {
118 ticks: 12000i64,
119 value: KeyframeValue::String("minecraft:rest"),
120 },
121 ],
122 },
123 Track {
124 name: "minecraft:gameplay/villager_activity",
125 ease: None,
126 modifier: None,
127 keyframes: &[
128 Keyframe {
129 ticks: 10i64,
130 value: KeyframeValue::String("minecraft:idle"),
131 },
132 Keyframe {
133 ticks: 2000i64,
134 value: KeyframeValue::String("minecraft:work"),
135 },
136 Keyframe {
137 ticks: 9000i64,
138 value: KeyframeValue::String("minecraft:meet"),
139 },
140 Keyframe {
141 ticks: 11000i64,
142 value: KeyframeValue::String("minecraft:idle"),
143 },
144 Keyframe {
145 ticks: 12000i64,
146 value: KeyframeValue::String("minecraft:rest"),
147 },
148 ],
149 },
150 ],
151 time_markers: &[],
152};
153pub static DAY: Timeline = Timeline {
154 key: Identifier::vanilla_static("day"),
155 clock: &crate::vanilla_world_clocks::OVERWORLD,
156 period_ticks: Some(24000i32),
157 tracks: &[
158 Track {
159 name: "minecraft:audio/firefly_bush_sounds",
160 ease: None,
161 modifier: Some("or"),
162 keyframes: &[
163 Keyframe {
164 ticks: 12600i64,
165 value: KeyframeValue::Bool(true),
166 },
167 Keyframe {
168 ticks: 23401i64,
169 value: KeyframeValue::Bool(false),
170 },
171 ],
172 },
173 Track {
174 name: "minecraft:gameplay/bees_stay_in_hive",
175 ease: None,
176 modifier: Some("or"),
177 keyframes: &[
178 Keyframe {
179 ticks: 12542i64,
180 value: KeyframeValue::Bool(true),
181 },
182 Keyframe {
183 ticks: 23460i64,
184 value: KeyframeValue::Bool(false),
185 },
186 ],
187 },
188 Track {
189 name: "minecraft:gameplay/cat_waking_up_gift_chance",
190 ease: Some(Ease::Named("constant")),
191 modifier: Some("maximum"),
192 keyframes: &[
193 Keyframe {
194 ticks: 362i64,
195 value: KeyframeValue::Float(0f32),
196 },
197 Keyframe {
198 ticks: 23667i64,
199 value: KeyframeValue::Float(0.7f32),
200 },
201 ],
202 },
203 Track {
204 name: "minecraft:gameplay/creaking_active",
205 ease: None,
206 modifier: Some("or"),
207 keyframes: &[
208 Keyframe {
209 ticks: 12600i64,
210 value: KeyframeValue::Bool(true),
211 },
212 Keyframe {
213 ticks: 23401i64,
214 value: KeyframeValue::Bool(false),
215 },
216 ],
217 },
218 Track {
219 name: "minecraft:gameplay/eyeblossom_open",
220 ease: None,
221 modifier: None,
222 keyframes: &[
223 Keyframe {
224 ticks: 12600i64,
225 value: KeyframeValue::Bool(true),
226 },
227 Keyframe {
228 ticks: 23401i64,
229 value: KeyframeValue::Bool(false),
230 },
231 ],
232 },
233 Track {
234 name: "minecraft:gameplay/monsters_burn",
235 ease: None,
236 modifier: Some("or"),
237 keyframes: &[
238 Keyframe {
239 ticks: 12542i64,
240 value: KeyframeValue::Bool(false),
241 },
242 Keyframe {
243 ticks: 23460i64,
244 value: KeyframeValue::Bool(true),
245 },
246 ],
247 },
248 Track {
249 name: "minecraft:gameplay/sky_light_level",
250 ease: None,
251 modifier: Some("multiply"),
252 keyframes: &[
253 Keyframe {
254 ticks: 133i64,
255 value: KeyframeValue::Float(1f32),
256 },
257 Keyframe {
258 ticks: 11867i64,
259 value: KeyframeValue::Float(1f32),
260 },
261 Keyframe {
262 ticks: 13670i64,
263 value: KeyframeValue::Float(0.26666668f32),
264 },
265 Keyframe {
266 ticks: 22330i64,
267 value: KeyframeValue::Float(0.26666668f32),
268 },
269 ],
270 },
271 Track {
272 name: "minecraft:gameplay/turtle_egg_hatch_chance",
273 ease: Some(Ease::Named("constant")),
274 modifier: Some("maximum"),
275 keyframes: &[
276 Keyframe {
277 ticks: 21062i64,
278 value: KeyframeValue::Float(1f32),
279 },
280 Keyframe {
281 ticks: 21905i64,
282 value: KeyframeValue::Float(0.002f32),
283 },
284 ],
285 },
286 Track {
287 name: "minecraft:visual/cloud_color",
288 ease: None,
289 modifier: Some("multiply"),
290 keyframes: &[
291 Keyframe {
292 ticks: 133i64,
293 value: KeyframeValue::String("#ffffffff"),
294 },
295 Keyframe {
296 ticks: 11867i64,
297 value: KeyframeValue::String("#ffffffff"),
298 },
299 Keyframe {
300 ticks: 13670i64,
301 value: KeyframeValue::String("#ff191926"),
302 },
303 Keyframe {
304 ticks: 22330i64,
305 value: KeyframeValue::String("#ff191926"),
306 },
307 ],
308 },
309 Track {
310 name: "minecraft:visual/fog_color",
311 ease: None,
312 modifier: Some("multiply"),
313 keyframes: &[
314 Keyframe {
315 ticks: 133i64,
316 value: KeyframeValue::String("#ffffff"),
317 },
318 Keyframe {
319 ticks: 11867i64,
320 value: KeyframeValue::String("#ffffff"),
321 },
322 Keyframe {
323 ticks: 13670i64,
324 value: KeyframeValue::String("#0f0f16"),
325 },
326 Keyframe {
327 ticks: 22330i64,
328 value: KeyframeValue::String("#0f0f16"),
329 },
330 ],
331 },
332 Track {
333 name: "minecraft:visual/moon_angle",
334 ease: Some(Ease::CubicBezier([0.362f32, 0.241f32, 0.638f32, 0.759f32])),
335 modifier: None,
336 keyframes: &[
337 Keyframe {
338 ticks: 6000i64,
339 value: KeyframeValue::Float(540f32),
340 },
341 Keyframe {
342 ticks: 6000i64,
343 value: KeyframeValue::Float(180f32),
344 },
345 ],
346 },
347 Track {
348 name: "minecraft:visual/sky_color",
349 ease: None,
350 modifier: Some("multiply"),
351 keyframes: &[
352 Keyframe {
353 ticks: 133i64,
354 value: KeyframeValue::String("#ffffff"),
355 },
356 Keyframe {
357 ticks: 11867i64,
358 value: KeyframeValue::String("#ffffff"),
359 },
360 Keyframe {
361 ticks: 13670i64,
362 value: KeyframeValue::String("#000000"),
363 },
364 Keyframe {
365 ticks: 22330i64,
366 value: KeyframeValue::String("#000000"),
367 },
368 ],
369 },
370 Track {
371 name: "minecraft:visual/sky_light_color",
372 ease: None,
373 modifier: Some("multiply"),
374 keyframes: &[
375 Keyframe {
376 ticks: 730i64,
377 value: KeyframeValue::String("#ffffff"),
378 },
379 Keyframe {
380 ticks: 11270i64,
381 value: KeyframeValue::String("#ffffff"),
382 },
383 Keyframe {
384 ticks: 13140i64,
385 value: KeyframeValue::String("#7a7aff"),
386 },
387 Keyframe {
388 ticks: 22860i64,
389 value: KeyframeValue::String("#7a7aff"),
390 },
391 ],
392 },
393 Track {
394 name: "minecraft:visual/sky_light_factor",
395 ease: None,
396 modifier: Some("multiply"),
397 keyframes: &[
398 Keyframe {
399 ticks: 730i64,
400 value: KeyframeValue::Float(1f32),
401 },
402 Keyframe {
403 ticks: 11270i64,
404 value: KeyframeValue::Float(1f32),
405 },
406 Keyframe {
407 ticks: 13140i64,
408 value: KeyframeValue::Float(0.24f32),
409 },
410 Keyframe {
411 ticks: 22860i64,
412 value: KeyframeValue::Float(0.24f32),
413 },
414 ],
415 },
416 Track {
417 name: "minecraft:visual/star_angle",
418 ease: Some(Ease::CubicBezier([0.362f32, 0.241f32, 0.638f32, 0.759f32])),
419 modifier: None,
420 keyframes: &[
421 Keyframe {
422 ticks: 6000i64,
423 value: KeyframeValue::Float(360f32),
424 },
425 Keyframe {
426 ticks: 6000i64,
427 value: KeyframeValue::Float(0f32),
428 },
429 ],
430 },
431 Track {
432 name: "minecraft:visual/star_brightness",
433 ease: None,
434 modifier: Some("maximum"),
435 keyframes: &[
436 Keyframe {
437 ticks: 92i64,
438 value: KeyframeValue::Float(0.037f32),
439 },
440 Keyframe {
441 ticks: 627i64,
442 value: KeyframeValue::Float(0f32),
443 },
444 Keyframe {
445 ticks: 11373i64,
446 value: KeyframeValue::Float(0f32),
447 },
448 Keyframe {
449 ticks: 11732i64,
450 value: KeyframeValue::Float(0.016f32),
451 },
452 Keyframe {
453 ticks: 11959i64,
454 value: KeyframeValue::Float(0.044f32),
455 },
456 Keyframe {
457 ticks: 12399i64,
458 value: KeyframeValue::Float(0.143f32),
459 },
460 Keyframe {
461 ticks: 12729i64,
462 value: KeyframeValue::Float(0.258f32),
463 },
464 Keyframe {
465 ticks: 13228i64,
466 value: KeyframeValue::Float(0.5f32),
467 },
468 Keyframe {
469 ticks: 22772i64,
470 value: KeyframeValue::Float(0.5f32),
471 },
472 Keyframe {
473 ticks: 23032i64,
474 value: KeyframeValue::Float(0.364f32),
475 },
476 Keyframe {
477 ticks: 23356i64,
478 value: KeyframeValue::Float(0.225f32),
479 },
480 Keyframe {
481 ticks: 23758i64,
482 value: KeyframeValue::Float(0.101f32),
483 },
484 ],
485 },
486 Track {
487 name: "minecraft:visual/sun_angle",
488 ease: Some(Ease::CubicBezier([0.362f32, 0.241f32, 0.638f32, 0.759f32])),
489 modifier: None,
490 keyframes: &[
491 Keyframe {
492 ticks: 6000i64,
493 value: KeyframeValue::Float(360f32),
494 },
495 Keyframe {
496 ticks: 6000i64,
497 value: KeyframeValue::Float(0f32),
498 },
499 ],
500 },
501 Track {
502 name: "minecraft:visual/sunrise_sunset_color",
503 ease: None,
504 modifier: None,
505 keyframes: &[
506 Keyframe {
507 ticks: 71i64,
508 value: KeyframeValue::String("#5fefa333"),
509 },
510 Keyframe {
511 ticks: 310i64,
512 value: KeyframeValue::String("#29f5ba33"),
513 },
514 Keyframe {
515 ticks: 565i64,
516 value: KeyframeValue::String("#06fbd433"),
517 },
518 Keyframe {
519 ticks: 730i64,
520 value: KeyframeValue::String("#00ffe533"),
521 },
522 Keyframe {
523 ticks: 11270i64,
524 value: KeyframeValue::String("#00ffe533"),
525 },
526 Keyframe {
527 ticks: 11397i64,
528 value: KeyframeValue::String("#04fcd833"),
529 },
530 Keyframe {
531 ticks: 11522i64,
532 value: KeyframeValue::String("#0ff9cb33"),
533 },
534 Keyframe {
535 ticks: 11690i64,
536 value: KeyframeValue::String("#29f5ba33"),
537 },
538 Keyframe {
539 ticks: 11929i64,
540 value: KeyframeValue::String("#5fefa333"),
541 },
542 Keyframe {
543 ticks: 12243i64,
544 value: KeyframeValue::String("#b1e78733"),
545 },
546 Keyframe {
547 ticks: 12358i64,
548 value: KeyframeValue::String("#cce47e33"),
549 },
550 Keyframe {
551 ticks: 12512i64,
552 value: KeyframeValue::String("#e9e07233"),
553 },
554 Keyframe {
555 ticks: 12613i64,
556 value: KeyframeValue::String("#f6dd6b33"),
557 },
558 Keyframe {
559 ticks: 12732i64,
560 value: KeyframeValue::String("#feda6333"),
561 },
562 Keyframe {
563 ticks: 12841i64,
564 value: KeyframeValue::String("#fed75c33"),
565 },
566 Keyframe {
567 ticks: 13035i64,
568 value: KeyframeValue::String("#ecd25133"),
569 },
570 Keyframe {
571 ticks: 13252i64,
572 value: KeyframeValue::String("#c1cc4733"),
573 },
574 Keyframe {
575 ticks: 13775i64,
576 value: KeyframeValue::String("#36be3733"),
577 },
578 Keyframe {
579 ticks: 13888i64,
580 value: KeyframeValue::String("#1fbb3533"),
581 },
582 Keyframe {
583 ticks: 14039i64,
584 value: KeyframeValue::String("#09b73333"),
585 },
586 Keyframe {
587 ticks: 14192i64,
588 value: KeyframeValue::String("#00b33333"),
589 },
590 Keyframe {
591 ticks: 21807i64,
592 value: KeyframeValue::String("#00b23333"),
593 },
594 Keyframe {
595 ticks: 21961i64,
596 value: KeyframeValue::String("#09b73333"),
597 },
598 Keyframe {
599 ticks: 22112i64,
600 value: KeyframeValue::String("#1fbb3533"),
601 },
602 Keyframe {
603 ticks: 22225i64,
604 value: KeyframeValue::String("#36be3733"),
605 },
606 Keyframe {
607 ticks: 22748i64,
608 value: KeyframeValue::String("#c1cc4733"),
609 },
610 Keyframe {
611 ticks: 22965i64,
612 value: KeyframeValue::String("#ecd25133"),
613 },
614 Keyframe {
615 ticks: 23159i64,
616 value: KeyframeValue::String("#fed75c33"),
617 },
618 Keyframe {
619 ticks: 23272i64,
620 value: KeyframeValue::String("#feda6333"),
621 },
622 Keyframe {
623 ticks: 23488i64,
624 value: KeyframeValue::String("#e9e07233"),
625 },
626 Keyframe {
627 ticks: 23642i64,
628 value: KeyframeValue::String("#cce47e33"),
629 },
630 Keyframe {
631 ticks: 23757i64,
632 value: KeyframeValue::String("#b1e78733"),
633 },
634 ],
635 },
636 ],
637 time_markers: &[
638 TimeMarker {
639 key: Identifier::new_static("minecraft", "day"),
640 ticks: 1000i32,
641 show_in_commands: Some(true),
642 },
643 TimeMarker {
644 key: Identifier::new_static("minecraft", "midnight"),
645 ticks: 18000i32,
646 show_in_commands: Some(true),
647 },
648 TimeMarker {
649 key: Identifier::new_static("minecraft", "night"),
650 ticks: 13000i32,
651 show_in_commands: Some(true),
652 },
653 TimeMarker {
654 key: Identifier::new_static("minecraft", "noon"),
655 ticks: 6000i32,
656 show_in_commands: Some(true),
657 },
658 TimeMarker {
659 key: Identifier::new_static("minecraft", "roll_village_siege"),
660 ticks: 18000i32,
661 show_in_commands: None,
662 },
663 TimeMarker {
664 key: Identifier::new_static("minecraft", "wake_up_from_sleep"),
665 ticks: 0i32,
666 show_in_commands: None,
667 },
668 ],
669};
670pub static EARLY_GAME: Timeline = Timeline {
671 key: Identifier::vanilla_static("early_game"),
672 clock: &crate::vanilla_world_clocks::OVERWORLD,
673 period_ticks: None,
674 tracks: &[
675 Track {
676 name: "minecraft:gameplay/can_pillager_patrol_spawn",
677 ease: None,
678 modifier: Some("and"),
679 keyframes: &[
680 Keyframe {
681 ticks: 0i64,
682 value: KeyframeValue::Bool(false),
683 },
684 Keyframe {
685 ticks: 120000i64,
686 value: KeyframeValue::Bool(true),
687 },
688 ],
689 },
690 ],
691 time_markers: &[],
692};
693pub fn register_timelines(registry: &mut TimelineRegistry) {
694 registry.register(&MOON);
695 registry.register(&VILLAGER_SCHEDULE);
696 registry.register(&DAY);
697 registry.register(&EARLY_GAME);
698}