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 <misoloo64@gmail.com>
This commit is contained in:
Ethan Costa
2024-12-27 22:42:50 +01:00
committed by GitHub
parent 09a2d4c24f
commit 2bca1f1ffb
6 changed files with 186 additions and 68 deletions

126
package-lock.json generated
View File

@@ -10,12 +10,12 @@
"license": "MIT",
"dependencies": {
"@giscus/react": "^2.2.3",
"@spyglassmc/core": "^0.4.16",
"@spyglassmc/java-edition": "^0.3.22",
"@spyglassmc/json": "^0.3.19",
"@spyglassmc/core": "^0.4.17",
"@spyglassmc/java-edition": "^0.3.23",
"@spyglassmc/json": "^0.3.20",
"@spyglassmc/locales": "^0.3.10",
"@spyglassmc/mcdoc": "^0.3.20",
"@spyglassmc/nbt": "^0.3.20",
"@spyglassmc/mcdoc": "^0.3.21",
"@spyglassmc/nbt": "^0.3.21",
"@zip.js/zip.js": "^2.4.5",
"brace": "^0.11.1",
"buffer": "^6.0.3",
@@ -742,9 +742,9 @@
}
},
"node_modules/@spyglassmc/core": {
"version": "0.4.16",
"resolved": "https://registry.npmjs.org/@spyglassmc/core/-/core-0.4.16.tgz",
"integrity": "sha512-OA8mPp8TZQ9QQ/tee33UQglD3hEsJ6cbASagjLCskd7CPr2TVncRcuoUvRS955+eS0TW9I/+inhfgm8x5bwKig==",
"version": "0.4.17",
"resolved": "https://registry.npmjs.org/@spyglassmc/core/-/core-0.4.17.tgz",
"integrity": "sha512-9i+TBilUGv00H3kdRd5C7cVTv4qPXuVo3TH4TKPELqEn1sKNu4HPZQXT83Ux6bSOpD3YOqGXoFX0XqnBIa/soQ==",
"dependencies": {
"@spyglassmc/locales": "0.3.10",
"base64-arraybuffer": "^1.0.2",
@@ -760,26 +760,26 @@
}
},
"node_modules/@spyglassmc/java-edition": {
"version": "0.3.22",
"resolved": "https://registry.npmjs.org/@spyglassmc/java-edition/-/java-edition-0.3.22.tgz",
"integrity": "sha512-KGdK1flAmuebffQ5TioLF4+f7uSUlViL4cZM9MRaVou4In+8hvpvZ6Tnta7Xc3IGvJuvZbbnuMRRDhYVUTDa7g==",
"version": "0.3.23",
"resolved": "https://registry.npmjs.org/@spyglassmc/java-edition/-/java-edition-0.3.23.tgz",
"integrity": "sha512-yhkuMT7nMJjQbStNgDp7rAd1BoJj5dJwWQIsvklwpk67Upqd5lyu0H50uewCd3PfN7iG62V11hPpV9yOJ3wANA==",
"dependencies": {
"@spyglassmc/core": "0.4.16",
"@spyglassmc/json": "0.3.19",
"@spyglassmc/core": "0.4.17",
"@spyglassmc/json": "0.3.20",
"@spyglassmc/locales": "0.3.10",
"@spyglassmc/mcdoc": "0.3.20",
"@spyglassmc/mcfunction": "0.2.18",
"@spyglassmc/nbt": "0.3.20"
"@spyglassmc/mcdoc": "0.3.21",
"@spyglassmc/mcfunction": "0.2.19",
"@spyglassmc/nbt": "0.3.21"
}
},
"node_modules/@spyglassmc/json": {
"version": "0.3.19",
"resolved": "https://registry.npmjs.org/@spyglassmc/json/-/json-0.3.19.tgz",
"integrity": "sha512-4sJN4OlX+/t3g2xSJjozUKy7PGPw008zX702B8I7NxzjHcNZAia5+BL1E1lbsmh6fF1j6IqitoBlVtEgP93lRw==",
"version": "0.3.20",
"resolved": "https://registry.npmjs.org/@spyglassmc/json/-/json-0.3.20.tgz",
"integrity": "sha512-vbu6hic7sYnvDpmM2yb1yyA9rMZku2CCl+DC9zrWFfd2WSB/PGiBGY4d+L9azbbX+VhVf+Fg9y9//cZ/ttQM0Q==",
"dependencies": {
"@spyglassmc/core": "0.4.16",
"@spyglassmc/core": "0.4.17",
"@spyglassmc/locales": "0.3.10",
"@spyglassmc/mcdoc": "0.3.20"
"@spyglassmc/mcdoc": "0.3.21"
}
},
"node_modules/@spyglassmc/locales": {
@@ -788,31 +788,31 @@
"integrity": "sha512-FzwmnX9+/OXsgD+EhsTBsloOKAYoaKYR3vVlEReNXtJuxtP08dufkSvDJBSSssgsd4iqi3/cA5ODJy6bUgj4+w=="
},
"node_modules/@spyglassmc/mcdoc": {
"version": "0.3.20",
"resolved": "https://registry.npmjs.org/@spyglassmc/mcdoc/-/mcdoc-0.3.20.tgz",
"integrity": "sha512-yc5EJZYHQYAXLenKlwdYoSKqLKJKdYExP+/J+ahjzLn42XPQGW2No+1ayKmIgvT9uXGmyPKLLUhbLV2QY0bVTQ==",
"version": "0.3.21",
"resolved": "https://registry.npmjs.org/@spyglassmc/mcdoc/-/mcdoc-0.3.21.tgz",
"integrity": "sha512-9BiM8RKgk9gMFvIef+TA7exCd/VTcF5CuQq5ZB9ufWlRZqEWUvjtdn3O06MPOZ3uASgS/owDgGK5XF+etsww+g==",
"dependencies": {
"@spyglassmc/core": "0.4.16",
"@spyglassmc/core": "0.4.17",
"@spyglassmc/locales": "0.3.10"
}
},
"node_modules/@spyglassmc/mcfunction": {
"version": "0.2.18",
"resolved": "https://registry.npmjs.org/@spyglassmc/mcfunction/-/mcfunction-0.2.18.tgz",
"integrity": "sha512-CS9OtJ79Gn0XhIVDZjQ0//8P0Tt8PzcW0wE7IAx/v/5bWSoBGrrn2Or4lsyyhvKXfIaBh6cNEjW2U5rTUb2asg==",
"version": "0.2.19",
"resolved": "https://registry.npmjs.org/@spyglassmc/mcfunction/-/mcfunction-0.2.19.tgz",
"integrity": "sha512-bq+Xa/tPZqhOR83aHQeMqo2YSzbVGP5eyBaLTEtUdbwTSRy61bbO1sz5wC1ODTqSvv9vw0dw/1wl5o4mu/5haQ==",
"dependencies": {
"@spyglassmc/core": "0.4.16",
"@spyglassmc/core": "0.4.17",
"@spyglassmc/locales": "0.3.10"
}
},
"node_modules/@spyglassmc/nbt": {
"version": "0.3.20",
"resolved": "https://registry.npmjs.org/@spyglassmc/nbt/-/nbt-0.3.20.tgz",
"integrity": "sha512-FiY47F5hfeFW+05C3zI2m9y/3uCX7nGf/3EmTFm/XFIrZvMYBVqcD4xcJUPnX17/N7iz0SMmpPhAUQ6kamkn2A==",
"version": "0.3.21",
"resolved": "https://registry.npmjs.org/@spyglassmc/nbt/-/nbt-0.3.21.tgz",
"integrity": "sha512-ImYlk7vyyJ1M4g9r4WHytUVoDmxvIUcawa6vc8bvfItqiOCvBkfc9BA4uE1pug7oNFM9+Z+TSAF5uNV41B4qAw==",
"dependencies": {
"@spyglassmc/core": "0.4.16",
"@spyglassmc/core": "0.4.17",
"@spyglassmc/locales": "0.3.10",
"@spyglassmc/mcdoc": "0.3.20"
"@spyglassmc/mcdoc": "0.3.21"
}
},
"node_modules/@types/diff": {
@@ -5185,9 +5185,9 @@
}
},
"@spyglassmc/core": {
"version": "0.4.16",
"resolved": "https://registry.npmjs.org/@spyglassmc/core/-/core-0.4.16.tgz",
"integrity": "sha512-OA8mPp8TZQ9QQ/tee33UQglD3hEsJ6cbASagjLCskd7CPr2TVncRcuoUvRS955+eS0TW9I/+inhfgm8x5bwKig==",
"version": "0.4.17",
"resolved": "https://registry.npmjs.org/@spyglassmc/core/-/core-0.4.17.tgz",
"integrity": "sha512-9i+TBilUGv00H3kdRd5C7cVTv4qPXuVo3TH4TKPELqEn1sKNu4HPZQXT83Ux6bSOpD3YOqGXoFX0XqnBIa/soQ==",
"requires": {
"@spyglassmc/locales": "0.3.10",
"base64-arraybuffer": "^1.0.2",
@@ -5203,26 +5203,26 @@
}
},
"@spyglassmc/java-edition": {
"version": "0.3.22",
"resolved": "https://registry.npmjs.org/@spyglassmc/java-edition/-/java-edition-0.3.22.tgz",
"integrity": "sha512-KGdK1flAmuebffQ5TioLF4+f7uSUlViL4cZM9MRaVou4In+8hvpvZ6Tnta7Xc3IGvJuvZbbnuMRRDhYVUTDa7g==",
"version": "0.3.23",
"resolved": "https://registry.npmjs.org/@spyglassmc/java-edition/-/java-edition-0.3.23.tgz",
"integrity": "sha512-yhkuMT7nMJjQbStNgDp7rAd1BoJj5dJwWQIsvklwpk67Upqd5lyu0H50uewCd3PfN7iG62V11hPpV9yOJ3wANA==",
"requires": {
"@spyglassmc/core": "0.4.16",
"@spyglassmc/json": "0.3.19",
"@spyglassmc/core": "0.4.17",
"@spyglassmc/json": "0.3.20",
"@spyglassmc/locales": "0.3.10",
"@spyglassmc/mcdoc": "0.3.20",
"@spyglassmc/mcfunction": "0.2.18",
"@spyglassmc/nbt": "0.3.20"
"@spyglassmc/mcdoc": "0.3.21",
"@spyglassmc/mcfunction": "0.2.19",
"@spyglassmc/nbt": "0.3.21"
}
},
"@spyglassmc/json": {
"version": "0.3.19",
"resolved": "https://registry.npmjs.org/@spyglassmc/json/-/json-0.3.19.tgz",
"integrity": "sha512-4sJN4OlX+/t3g2xSJjozUKy7PGPw008zX702B8I7NxzjHcNZAia5+BL1E1lbsmh6fF1j6IqitoBlVtEgP93lRw==",
"version": "0.3.20",
"resolved": "https://registry.npmjs.org/@spyglassmc/json/-/json-0.3.20.tgz",
"integrity": "sha512-vbu6hic7sYnvDpmM2yb1yyA9rMZku2CCl+DC9zrWFfd2WSB/PGiBGY4d+L9azbbX+VhVf+Fg9y9//cZ/ttQM0Q==",
"requires": {
"@spyglassmc/core": "0.4.16",
"@spyglassmc/core": "0.4.17",
"@spyglassmc/locales": "0.3.10",
"@spyglassmc/mcdoc": "0.3.20"
"@spyglassmc/mcdoc": "0.3.21"
}
},
"@spyglassmc/locales": {
@@ -5231,31 +5231,31 @@
"integrity": "sha512-FzwmnX9+/OXsgD+EhsTBsloOKAYoaKYR3vVlEReNXtJuxtP08dufkSvDJBSSssgsd4iqi3/cA5ODJy6bUgj4+w=="
},
"@spyglassmc/mcdoc": {
"version": "0.3.20",
"resolved": "https://registry.npmjs.org/@spyglassmc/mcdoc/-/mcdoc-0.3.20.tgz",
"integrity": "sha512-yc5EJZYHQYAXLenKlwdYoSKqLKJKdYExP+/J+ahjzLn42XPQGW2No+1ayKmIgvT9uXGmyPKLLUhbLV2QY0bVTQ==",
"version": "0.3.21",
"resolved": "https://registry.npmjs.org/@spyglassmc/mcdoc/-/mcdoc-0.3.21.tgz",
"integrity": "sha512-9BiM8RKgk9gMFvIef+TA7exCd/VTcF5CuQq5ZB9ufWlRZqEWUvjtdn3O06MPOZ3uASgS/owDgGK5XF+etsww+g==",
"requires": {
"@spyglassmc/core": "0.4.16",
"@spyglassmc/core": "0.4.17",
"@spyglassmc/locales": "0.3.10"
}
},
"@spyglassmc/mcfunction": {
"version": "0.2.18",
"resolved": "https://registry.npmjs.org/@spyglassmc/mcfunction/-/mcfunction-0.2.18.tgz",
"integrity": "sha512-CS9OtJ79Gn0XhIVDZjQ0//8P0Tt8PzcW0wE7IAx/v/5bWSoBGrrn2Or4lsyyhvKXfIaBh6cNEjW2U5rTUb2asg==",
"version": "0.2.19",
"resolved": "https://registry.npmjs.org/@spyglassmc/mcfunction/-/mcfunction-0.2.19.tgz",
"integrity": "sha512-bq+Xa/tPZqhOR83aHQeMqo2YSzbVGP5eyBaLTEtUdbwTSRy61bbO1sz5wC1ODTqSvv9vw0dw/1wl5o4mu/5haQ==",
"requires": {
"@spyglassmc/core": "0.4.16",
"@spyglassmc/core": "0.4.17",
"@spyglassmc/locales": "0.3.10"
}
},
"@spyglassmc/nbt": {
"version": "0.3.20",
"resolved": "https://registry.npmjs.org/@spyglassmc/nbt/-/nbt-0.3.20.tgz",
"integrity": "sha512-FiY47F5hfeFW+05C3zI2m9y/3uCX7nGf/3EmTFm/XFIrZvMYBVqcD4xcJUPnX17/N7iz0SMmpPhAUQ6kamkn2A==",
"version": "0.3.21",
"resolved": "https://registry.npmjs.org/@spyglassmc/nbt/-/nbt-0.3.21.tgz",
"integrity": "sha512-ImYlk7vyyJ1M4g9r4WHytUVoDmxvIUcawa6vc8bvfItqiOCvBkfc9BA4uE1pug7oNFM9+Z+TSAF5uNV41B4qAw==",
"requires": {
"@spyglassmc/core": "0.4.16",
"@spyglassmc/core": "0.4.17",
"@spyglassmc/locales": "0.3.10",
"@spyglassmc/mcdoc": "0.3.20"
"@spyglassmc/mcdoc": "0.3.21"
}
},
"@types/diff": {

View File

@@ -16,12 +16,12 @@
"license": "MIT",
"dependencies": {
"@giscus/react": "^2.2.3",
"@spyglassmc/core": "^0.4.16",
"@spyglassmc/java-edition": "^0.3.22",
"@spyglassmc/json": "^0.3.19",
"@spyglassmc/core": "^0.4.17",
"@spyglassmc/java-edition": "^0.3.23",
"@spyglassmc/json": "^0.3.20",
"@spyglassmc/locales": "^0.3.10",
"@spyglassmc/mcdoc": "^0.3.20",
"@spyglassmc/nbt": "^0.3.20",
"@spyglassmc/mcdoc": "^0.3.21",
"@spyglassmc/nbt": "^0.3.21",
"@zip.js/zip.js": "^2.4.5",
"brace": "^0.11.1",
"buffer": "^6.0.3",

View File

@@ -0,0 +1,106 @@
dispatch minecraft:resource[sky_aesthetics:sky] to struct SkyProperties {
world: #[id="dimension"] string,
id?: string,
cloud_settings: CloudSettings,
fog_settings?: FogSettings,
rain: boolean,
custom_vanilla_objects: CustomVanillaObjects,
stars: Star,
/// The R, G and B value for the color
sunrise_color?: [float] @ 3,
sunrise_alpha_modifier?: float,
sky_type: SkyType,
sky_color: struct {
custom_color: boolean,
/// The R, G, B and alpha value for the color
#[until="1.21.2"]
color: [float] @ 4,
/// The R, G and B value for the color
#[since="1.21.3"]
color: [float] @ 3 ,
},
sky_objects: [SkyObject],
constellations: [string],
condition: RenderCondition
}
struct CloudSettings {
cloud: boolean,
cloud_height: int,
/// The R, G and B value for the color
cloud_color?: struct CustomCloudColor {
base_color: [double] @ 3,
storm_color: [double] @ 3,
rain_color: [double] @ 3,
always_base_color: boolean
}
}
struct FogSettings {
fog: boolean,
/// The R, G, B and alpha value for the color
fog_color: [float] @ 4,
fog_density: [float] @ 2,
}
struct CustomVanillaObjects {
sun: boolean,
sun_texture: string,
sun_height: int,
sun_size: int,
moon: boolean,
moon_phase: boolean,
moon_texture: string,
moon_height: int,
moon_size: int,
}
struct Star {
vanilla: boolean,
moving_stars: boolean,
count: int,
all_days_visible: boolean,
scale: float,
/// The R, G and B value for the color
color: [float] @ 3,
shooting_stars? : struct shootingStars {
percentage: int,
random_lifetime: [double] @ 2,
scale: float,
speed: float,
color: [double] @ 3,
rotation?: int
}
}
struct SkyObject {
texture: string,
blend: boolean,
size: float,
height: int,
rotation: [float] @ 3,
rotation_type: RotationType
}
struct RenderCondition {
condition: boolean,
biome?: #[id="worldgen/biome"] string,
biomes?: #[id(registry="worldgen/biome",tags=allowed)] string,
}
enum(string) SkyType {
#[starred] Overworld = "OVERWORLD",
None = "NONE",
End = "END"
}
enum(string) RotationType {
Day = "DAY",
Night = "NIGHT",
Fixed = "FIXED"
}

View File

@@ -314,6 +314,7 @@ export class SpyglassService {
...Object.fromEntries(siteConfig.generators.filter(gen => gen.dependency).map(gen =>
[gen.path ?? gen.id, {
category: gen.id,
pack: gen.tags?.includes('assets') ? 'assets' : 'data',
}]
)),
},

View File

@@ -719,6 +719,15 @@
"dependency": "ohthetreesyoullgrow",
"minVersion": "1.20",
"wiki": "https://github.com/CorgiTaco/Oh-The-Trees-Youll-Grow/wiki/Generating-Your-Tree-With-Data-Packs!"
},
{
"id": "sky_aesthetics:sky",
"url": "sky-aesthetics/sky",
"path": "sky",
"tags": ["partners", "assets"],
"dependency": "sky_aesthetics",
"minVersion": "1.21.1",
"wiki": "https://github.com/TathanDev/SkyAesthetics/wiki/Custom-Sky"
}
],
"legacyGuides": [

View File

@@ -96,6 +96,7 @@
"generator.neoforge:structure_modifier": "Structure Modifier",
"generator.not_found": "Cannot find generator \"%0%\"",
"generator.ohthetreesyoullgrow:configured_feature": "OTTYG Feature",
"generator.sky_aesthetics:sky": "Custom Sky",
"generator.pack_mcmeta": "pack.mcmeta",
"generator.painting_variant": "Painting Variant",
"generator.post_effect": "Post Effect",
@@ -187,6 +188,7 @@
"partner.neoforge": "NeoForge",
"partner.obsidian": "Obsidian",
"partner.ohthetreesyoullgrow": "Oh The Trees You'll Grow",
"partner.sky_aesthetics": "Sky Aesthetics",
"presets": "Presets",
"preview": "Visualize",
"preview.auto_scroll": "Auto scroll",