Skip to content

Commit 03d02a4

Browse files
authored
Adding deferred lightning schemas (#285)
1 parent 5844e7d commit 03d02a4

File tree

5 files changed

+223
-0
lines changed

5 files changed

+223
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"$id": "blockception.minecraft.behavior.lighting.atmospherics",
3+
"type": "object",
4+
"title": "Atmospherics",
5+
"description": "The properties of the atmosphere",
6+
"additionalProperties": false,
7+
"properties": {
8+
"horizon_blend_stops": {
9+
"type": "object",
10+
"title": "Horizon Blend Stops",
11+
"description": "How the atmosphere is divided up",
12+
"additionalProperties": false,
13+
"properties": {
14+
"min": {
15+
"title": "Minimum Horizon Height",
16+
"description": "The minimum horizon height",
17+
"type": "number"
18+
},
19+
"start": {
20+
"title": "Start",
21+
"description": "The height relative to the horizon where the zenith contribution will take over",
22+
"type": "number"
23+
},
24+
"mie_start": {
25+
"title": "Mie Start",
26+
"description": "The height relative to the horizon where mie scattering begins",
27+
"type": "number"
28+
},
29+
"max": {
30+
"title": "Maximum Horizon Height",
31+
"description": "The maximum horizon height",
32+
"type": "number"
33+
}
34+
}
35+
},
36+
"rayleigh_strength": {
37+
"title": "Rayleigh Strength",
38+
"description": "How strong the atmosphere's rayleigh scattering term is",
39+
"type": "number"
40+
},
41+
"sun_mie_strength": {
42+
"title": "Sun Mie Strength",
43+
"description": "How strong the sun's mie scattering term is",
44+
"type": "number"
45+
},
46+
"moon_mie_strength": {
47+
"title": "Moon Mie Strength",
48+
"description": "How strong the moon's mie scattering term is",
49+
"type": "number"
50+
},
51+
"sun_glare_shape": {
52+
"title": "Sun Glare Shape",
53+
"description": "How the lobe of the mie scattering is shaped",
54+
"type": "number"
55+
},
56+
"sky_zenith_color": {
57+
"title": "Sky Zenith Color",
58+
"description": "The RGB color of the zenith region of the atmosphere",
59+
"$ref": "./color.json"
60+
},
61+
"sky_horizon_color": {
62+
"title": "Sky Horizon Color",
63+
"description": "The RGB color of the horizon region of the atmosphere",
64+
"$ref": "./color.json"
65+
}
66+
}
67+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$id": "blockception.minecraft.behavior.lighting.color",
3+
"title": "Lighting Color",
4+
"description": "The color of the light emitted by the block, in RGB format or hex format.",
5+
"oneOf": [
6+
{
7+
"type": "string",
8+
"format": "color-hex",
9+
"examples": ["#FFFFFF", "#000000"]
10+
},
11+
{
12+
"type": "array",
13+
"items": [
14+
{ "title": "Red", "type": "integer", "minimum": 0, "maximum": 255 },
15+
{ "title": "Blue", "type": "integer", "minimum": 0, "maximum": 255 },
16+
{ "title": "Green", "type": "integer", "minimum": 0, "maximum": 255 }
17+
]
18+
}
19+
]
20+
}
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
{
2+
"$id": "blockception.minecraft.behavior.lighting.global",
3+
"type": "object",
4+
"additionalProperties": false,
5+
"properties": {
6+
"format_version": { "$ref": "../../general/format_version.json" },
7+
"directional_lights": {
8+
"type": "object",
9+
"additionalProperties": false,
10+
"title": "Directional Lights",
11+
"description": "The directional lights that affect the world",
12+
"properties": {
13+
"sun": {
14+
"type": "object",
15+
"title": "Sun",
16+
"description": "The sun directional light",
17+
"additionalProperties": false,
18+
"properties": {
19+
"illuminance": {
20+
"type": "number",
21+
"title": "Illuminance",
22+
"description": "How bright the sun is, measured in lux (lx)"
23+
},
24+
"color": {
25+
"title": "Color",
26+
"description": "The RGB color that the sun contributes to direct surface lighting; supports RGB array or HEX string",
27+
"$ref": "./color.json"
28+
}
29+
}
30+
},
31+
"moon": {
32+
"type": "object",
33+
"title": "Moon",
34+
"description": "The moon directional light",
35+
"additionalProperties": false,
36+
"properties": {
37+
"illuminance": {
38+
"type": "number",
39+
"title": "Illuminance",
40+
"description": "How bright the moon is, measured in lux (lx)"
41+
},
42+
"color": {
43+
"title": "Color",
44+
"description": "The RGB color that the moon contributes to direct surface lighting; supports RGB array or HEX string",
45+
"$ref": "./color.json"
46+
}
47+
}
48+
},
49+
"orbital_offset_degrees": {
50+
"type": "number",
51+
"title": "Orbital Offset Degrees",
52+
"description": "The rotational offset of the sun and moon from their standard orbital axis; measured in degrees"
53+
},
54+
"point_lights": {
55+
"type": "object",
56+
"title": "Point Lights",
57+
"description": "The point lights that affect the world",
58+
"additionalProperties": false,
59+
"properties": {
60+
"colors": {
61+
"type": "object",
62+
"title": "Colors",
63+
"description": "List of key-value pairs where the key is a namespace-qualified block name and the value is a color",
64+
"additionalProperties": {
65+
"$ref": "./color.json"
66+
},
67+
"examples": [
68+
{
69+
"minecraft:stone": "#ffffff",
70+
"minecraft:grass": [0, 255, 0]
71+
}
72+
]
73+
}
74+
}
75+
},
76+
"pbr": {
77+
"title": "PBR",
78+
"description": "The physically-based rendering properties for the world",
79+
"type": "object",
80+
"additionalProperties": false,
81+
"properties": {
82+
"blocks": {
83+
"title": "Blocks",
84+
"description": "The PBR properties for blocks",
85+
"type": "object",
86+
"additionalProperties": false,
87+
"properties": {
88+
"color": {
89+
"title": "Color",
90+
"description": "The default MER value to use for blocks when not defined via textureset; supports RGB array or HEX string",
91+
"$ref": "./color.json"
92+
}
93+
}
94+
},
95+
"actors": {
96+
"title": "Actors",
97+
"description": "The PBR properties for actors",
98+
"type": "object",
99+
"additionalProperties": false,
100+
"properties": {
101+
"color": {
102+
"title": "Color",
103+
"description": "The default MER value to use for actors/mobs when not defined via textureset; supports RGB array or HEX string",
104+
"$ref": "./color.json"
105+
}
106+
}
107+
},
108+
"particles": {
109+
"title": "Particles",
110+
"description": "The PBR properties for particles",
111+
"type": "object",
112+
"additionalProperties": false,
113+
"properties": {
114+
"color": {
115+
"title": "Color",
116+
"description": "The default MER value to use for particles when not defined via textureset; supports RGB array or HEX string",
117+
"$ref": "./color.json"
118+
}
119+
}
120+
}
121+
}
122+
}
123+
}
124+
}
125+
}
126+
}

source/compress_specification.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
{ "Source": "./behavior/features/features.json", "Destination": "../behavior/features/features.json" },
1313
{ "Source": "./behavior/functions/tick.json", "Destination": "../behavior/functions/tick.json" },
1414
{ "Source": "./behavior/items/items.json", "Destination": "../behavior/items/items.json" },
15+
{ "Source": "./behavior/lighting/global.json", "Destination": "../behavior/lighting/global.json" },
16+
{ "Source": "./behavior/lighting/atmospherics.json", "Destination": "../behavior/lighting/atmospherics.json" },
1517
{ "Source": "./behavior/loot_tables/loot_tables.json", "Destination": "../behavior/loot_tables/loot_tables.json" },
1618
{ "Source": "./behavior/recipes/recipes.json", "Destination": "../behavior/recipes/recipes.json" },
1719
{ "Source": "./behavior/spawn_rules/spawn_rules.json", "Destination": "../behavior/spawn_rules/spawn_rules.json" },

vscode-settings.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,14 @@
295295
],
296296
"url": "https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/behavior/feature_rules/feature_rules.json"
297297
},
298+
{
299+
"fileMatch": ["lighting/global.json"],
300+
"url": "https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/behavior/lighting/global.json"
301+
},
302+
{
303+
"fileMatch": ["lighting/atmospherics.json"],
304+
"url": "https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/behavior/lighting/atmospherics.json"
305+
},
298306
{
299307
"fileMatch": [
300308
"behavior_packs/*/items/*.{json,jsonc,json5}",

0 commit comments

Comments
 (0)