Skip to content

Commit 2bca1f1

Browse files
TathanDevmisode
andauthored
Add Custom Sky generator for Sky Aesthetics (#667)
* Added Custom Sky generator * Added 1.21.1 support * fix config * revert config change * Fix assets config not working * update url * Fix merge conflict --------- Co-authored-by: Misode <[email protected]>
1 parent 09a2d4c commit 2bca1f1

File tree

6 files changed

+186
-68
lines changed

6 files changed

+186
-68
lines changed

package-lock.json

Lines changed: 63 additions & 63 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
"license": "MIT",
1717
"dependencies": {
1818
"@giscus/react": "^2.2.3",
19-
"@spyglassmc/core": "^0.4.16",
20-
"@spyglassmc/java-edition": "^0.3.22",
21-
"@spyglassmc/json": "^0.3.19",
19+
"@spyglassmc/core": "^0.4.17",
20+
"@spyglassmc/java-edition": "^0.3.23",
21+
"@spyglassmc/json": "^0.3.20",
2222
"@spyglassmc/locales": "^0.3.10",
23-
"@spyglassmc/mcdoc": "^0.3.20",
24-
"@spyglassmc/nbt": "^0.3.20",
23+
"@spyglassmc/mcdoc": "^0.3.21",
24+
"@spyglassmc/nbt": "^0.3.21",
2525
"@zip.js/zip.js": "^2.4.5",
2626
"brace": "^0.11.1",
2727
"buffer": "^6.0.3",

public/mcdoc/sky_aesthetics.mcdoc

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
2+
dispatch minecraft:resource[sky_aesthetics:sky] to struct SkyProperties {
3+
world: #[id="dimension"] string,
4+
id?: string,
5+
cloud_settings: CloudSettings,
6+
fog_settings?: FogSettings,
7+
rain: boolean,
8+
custom_vanilla_objects: CustomVanillaObjects,
9+
stars: Star,
10+
/// The R, G and B value for the color
11+
sunrise_color?: [float] @ 3,
12+
sunrise_alpha_modifier?: float,
13+
sky_type: SkyType,
14+
sky_color: struct {
15+
custom_color: boolean,
16+
17+
/// The R, G, B and alpha value for the color
18+
#[until="1.21.2"]
19+
color: [float] @ 4,
20+
/// The R, G and B value for the color
21+
#[since="1.21.3"]
22+
color: [float] @ 3 ,
23+
24+
},
25+
sky_objects: [SkyObject],
26+
constellations: [string],
27+
condition: RenderCondition
28+
29+
}
30+
31+
struct CloudSettings {
32+
cloud: boolean,
33+
cloud_height: int,
34+
/// The R, G and B value for the color
35+
cloud_color?: struct CustomCloudColor {
36+
base_color: [double] @ 3,
37+
storm_color: [double] @ 3,
38+
rain_color: [double] @ 3,
39+
always_base_color: boolean
40+
}
41+
}
42+
43+
struct FogSettings {
44+
fog: boolean,
45+
/// The R, G, B and alpha value for the color
46+
fog_color: [float] @ 4,
47+
fog_density: [float] @ 2,
48+
}
49+
50+
struct CustomVanillaObjects {
51+
sun: boolean,
52+
sun_texture: string,
53+
sun_height: int,
54+
sun_size: int,
55+
moon: boolean,
56+
moon_phase: boolean,
57+
moon_texture: string,
58+
moon_height: int,
59+
moon_size: int,
60+
}
61+
62+
struct Star {
63+
vanilla: boolean,
64+
moving_stars: boolean,
65+
count: int,
66+
all_days_visible: boolean,
67+
scale: float,
68+
/// The R, G and B value for the color
69+
color: [float] @ 3,
70+
shooting_stars? : struct shootingStars {
71+
percentage: int,
72+
random_lifetime: [double] @ 2,
73+
scale: float,
74+
speed: float,
75+
color: [double] @ 3,
76+
rotation?: int
77+
}
78+
}
79+
80+
struct SkyObject {
81+
texture: string,
82+
blend: boolean,
83+
size: float,
84+
height: int,
85+
rotation: [float] @ 3,
86+
rotation_type: RotationType
87+
}
88+
89+
struct RenderCondition {
90+
condition: boolean,
91+
biome?: #[id="worldgen/biome"] string,
92+
biomes?: #[id(registry="worldgen/biome",tags=allowed)] string,
93+
94+
}
95+
96+
enum(string) SkyType {
97+
#[starred] Overworld = "OVERWORLD",
98+
None = "NONE",
99+
End = "END"
100+
}
101+
102+
enum(string) RotationType {
103+
Day = "DAY",
104+
Night = "NIGHT",
105+
Fixed = "FIXED"
106+
}

src/app/services/Spyglass.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ export class SpyglassService {
314314
...Object.fromEntries(siteConfig.generators.filter(gen => gen.dependency).map(gen =>
315315
[gen.path ?? gen.id, {
316316
category: gen.id,
317+
pack: gen.tags?.includes('assets') ? 'assets' : 'data',
317318
}]
318319
)),
319320
},

src/config.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,15 @@
719719
"dependency": "ohthetreesyoullgrow",
720720
"minVersion": "1.20",
721721
"wiki": "https://github.com/CorgiTaco/Oh-The-Trees-Youll-Grow/wiki/Generating-Your-Tree-With-Data-Packs!"
722+
},
723+
{
724+
"id": "sky_aesthetics:sky",
725+
"url": "sky-aesthetics/sky",
726+
"path": "sky",
727+
"tags": ["partners", "assets"],
728+
"dependency": "sky_aesthetics",
729+
"minVersion": "1.21.1",
730+
"wiki": "https://github.com/TathanDev/SkyAesthetics/wiki/Custom-Sky"
722731
}
723732
],
724733
"legacyGuides": [

src/locales/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
"generator.neoforge:structure_modifier": "Structure Modifier",
9797
"generator.not_found": "Cannot find generator \"%0%\"",
9898
"generator.ohthetreesyoullgrow:configured_feature": "OTTYG Feature",
99+
"generator.sky_aesthetics:sky": "Custom Sky",
99100
"generator.pack_mcmeta": "pack.mcmeta",
100101
"generator.painting_variant": "Painting Variant",
101102
"generator.post_effect": "Post Effect",
@@ -187,6 +188,7 @@
187188
"partner.neoforge": "NeoForge",
188189
"partner.obsidian": "Obsidian",
189190
"partner.ohthetreesyoullgrow": "Oh The Trees You'll Grow",
191+
"partner.sky_aesthetics": "Sky Aesthetics",
190192
"presets": "Presets",
191193
"preview": "Visualize",
192194
"preview.auto_scroll": "Auto scroll",

0 commit comments

Comments
 (0)