@nodecraft/rendermite 1.7.4 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -1
- package/dist/atlas/registry.d.ts +3 -3
- package/dist/atlas/sources.d.ts +1 -1
- package/dist/{atlas-pack-C56gzqAg.d.ts → atlas-pack-BUadroKy.d.ts} +1 -1
- package/dist/biomes-BGOF6gRM.js +1100 -0
- package/dist/biomes-CnnhDCnk.d.ts +59 -0
- package/dist/{blend-C5UYzink.d.ts → blend-mJAeQB3C.d.ts} +1 -1
- package/dist/block-behaviour-9Tj_GIUC.d.ts +632 -0
- package/dist/block-behaviour-D-SG2Xfp.js +155 -0
- package/dist/blocks/atlas-pack.d.ts +1 -1
- package/dist/blocks/biomes.d.ts +2 -2
- package/dist/blocks/biomes.js +2 -2
- package/dist/blocks/block-behaviour.d.ts +2 -0
- package/dist/blocks/block-behaviour.js +2 -0
- package/dist/blocks/block-entities.d.ts +3 -3
- package/dist/blocks/cli.js +1 -1
- package/dist/blocks/datapack.d.ts +2 -0
- package/dist/blocks/datapack.js +2 -0
- package/dist/blocks/ender-storage.d.ts +2 -2
- package/dist/blocks/entities.d.ts +3 -3
- package/dist/blocks/entity-geo.d.ts +1 -1
- package/dist/blocks/entity-models.d.ts +4 -4
- package/dist/blocks/entity-models.js +1 -1
- package/dist/blocks/entity-sizes.d.ts +25 -0
- package/dist/blocks/entity-sizes.js +2 -0
- package/dist/blocks/export.d.ts +1 -1
- package/dist/blocks/export.js +1 -1
- package/dist/blocks/game-rules.d.ts +2 -0
- package/dist/blocks/game-rules.js +2 -0
- package/dist/blocks/geo-blocks.d.ts +2 -2
- package/dist/blocks/item-sprites.d.ts +4 -4
- package/dist/blocks/light-bytecode.d.ts +2 -0
- package/dist/blocks/light-bytecode.js +2 -0
- package/dist/blocks/light-eval.d.ts +2 -0
- package/dist/blocks/light-eval.js +2 -0
- package/dist/blocks/light.d.ts +48 -0
- package/dist/blocks/light.js +2 -0
- package/dist/blocks/obj-mesh.d.ts +1 -1
- package/dist/blocks/pack-format.d.ts +2 -2
- package/dist/blocks/sprite-sheet.d.ts +3 -3
- package/dist/blocks/states.d.ts +2 -0
- package/dist/blocks/states.js +2 -0
- package/dist/blocks/tints.d.ts +1 -1
- package/dist/{classfile-Bo7FUrrD.js → classfile-CiIDF3vc.js} +23 -1
- package/dist/{classfile-BdLIk4Pe.d.ts → classfile-CsLXlh5z.d.ts} +23 -0
- package/dist/{cli-DBNuCnry.js → cli-xBcMuKA3.js} +11 -5
- package/dist/cli.js +7 -7
- package/dist/datapack-CmEg0Vko.d.ts +15 -0
- package/dist/datapack-D6eH46ay.js +71 -0
- package/dist/{descriptor-JyXhfd-c.js → descriptor-Dz2cR-BH.js} +2 -2
- package/dist/{discovery-Cmir3QfC.d.ts → discovery-DWe_kX8W.d.ts} +1 -1
- package/dist/dynamic/generators.d.ts +1 -1
- package/dist/{encode-Br_vPrd8.d.ts → encode-BNEYHHR0.d.ts} +1 -1
- package/dist/entities/classfile.d.ts +1 -1
- package/dist/entities/classfile.js +1 -1
- package/dist/entities/geo-model.d.ts +1 -1
- package/dist/entities/inherit.d.ts +2 -2
- package/dist/entities/inherit.js +1 -1
- package/dist/entities/jar-classes.js +1 -1
- package/dist/entities/link.d.ts +2 -2
- package/dist/entities/link.js +1 -1
- package/dist/entities/mappings.d.ts +2 -2
- package/dist/entities/mappings.js +2 -2
- package/dist/entities/model-bytecode.d.ts +7 -2
- package/dist/entities/model-bytecode.js +2 -2
- package/dist/entities/model-code.d.ts +1 -1
- package/dist/entities/model-code.js +1 -1
- package/dist/{entity-models-DUKiHpn1.js → entity-models-BYAxrTsk.js} +5 -5
- package/dist/entity-sizes-CpO1gA7p.js +194 -0
- package/dist/{export-Ds1EelMa.js → export-CbG2Rx3i.js} +73 -4
- package/dist/{export-B8tPsf4K.d.ts → export-HEoqcV-Y.d.ts} +19 -2
- package/dist/{face-DqEd9G_U.d.ts → face-uWXECGNr.d.ts} +2 -2
- package/dist/game-rules-DuLlFc7o.js +104 -0
- package/dist/game-rules-ThvdDG3B.d.ts +16 -0
- package/dist/{generators-BnIzAftW.d.ts → generators-hu_vk10m.d.ts} +1 -1
- package/dist/{geo-C9QYeLVN.d.ts → geo-DsWwuC5o.d.ts} +4 -4
- package/dist/index.d.ts +20 -20
- package/dist/index.js +8 -8
- package/dist/{inherit-BYLi3Q28.js → inherit-BUn0Cve9.js} +2 -2
- package/dist/items/blockstate.d.ts +1 -1
- package/dist/items/discovery.d.ts +1 -1
- package/dist/{jar-B5iRZQeL.d.ts → jar-4Jg7ufWK.d.ts} +1 -1
- package/dist/{jar-W2cV2ZVO.js → jar-DvofBm71.js} +2 -2
- package/dist/{jar-classes-3GVCJZT7.js → jar-classes-0wqWbTax.js} +2 -2
- package/dist/light-CC3VMsjl.js +614 -0
- package/dist/light-bytecode-DYxb6pJk.js +1799 -0
- package/dist/light-eval-BsJJoSv4.js +23 -0
- package/dist/light-eval-DMjK6xnb.d.ts +13 -0
- package/dist/{link-5GmBLTzk.js → link-Cuhyrz07.js} +1 -1
- package/dist/{loader-DSir1-P0.d.ts → loader-BYyPIs9f.d.ts} +1 -1
- package/dist/{loader-59_eMa8e.d.ts → loader-C4gsX_wO.d.ts} +1 -1
- package/dist/{manager-exOIcdyx.d.ts → manager-Ct0dEOMg.d.ts} +6 -0
- package/dist/{manager-BNibYkmI.js → manager-D6zXmFrO.js} +6 -0
- package/dist/{mappings-BEPVaiwE.js → mappings-DEl_7xxQ.js} +94 -9
- package/dist/{mappings-DxX4KoZl.d.ts → mappings-DhOPQTgV.d.ts} +33 -2
- package/dist/{model-bytecode-B43uSqet.js → model-bytecode-VaLUQfGO.js} +2 -2
- package/dist/{model-code-BY44ao27.d.ts → model-code-Csc3bs3h.d.ts} +1 -1
- package/dist/{model-code-1Vuk-zj_.js → model-code-DbN2uVhp.js} +1 -1
- package/dist/models/loader.d.ts +1 -1
- package/dist/{models-CZjCOjs4.js → models-BsYA-NZg.js} +1 -1
- package/dist/mods/models.d.ts +1 -1
- package/dist/mods/models.js +1 -1
- package/dist/mods/prepare.d.ts +1 -1
- package/dist/mods/prepare.js +1 -1
- package/dist/mods/synthesize.d.ts +2 -2
- package/dist/mods/tints.d.ts +2 -2
- package/dist/mods/tints.js +1 -1
- package/dist/{obj-mesh-ydhVfLKs.d.ts → obj-mesh-CzL0lOlJ.d.ts} +2 -2
- package/dist/output/encode.d.ts +1 -1
- package/dist/pack.d.ts +7 -5
- package/dist/pack.js +2 -1
- package/dist/{pipeline-DFuQa8ZT.d.ts → pipeline-DuPF3sap.d.ts} +3 -3
- package/dist/{pipeline-BTlk9-s5.js → pipeline-Q_185kY6.js} +1 -1
- package/dist/{prepare-OS7wL3jv.d.ts → prepare-BPzsZI_S.d.ts} +1 -1
- package/dist/{prepare-6pH3CNpg.d.ts → prepare-Ce5SpR7Y.d.ts} +1 -1
- package/dist/{prepare-D49Gu4Lv.js → prepare-DkJkZXuQ.js} +2 -2
- package/dist/{prepare-Myd_ec4v.js → prepare-sj36BP90.js} +4 -4
- package/dist/{rasterizer-C2wgJZ6J.d.ts → rasterizer-DjnurUgD.d.ts} +1 -1
- package/dist/render/blend.d.ts +1 -1
- package/dist/render/compose.d.ts +2 -2
- package/dist/render/entity-fallback.d.ts +6 -6
- package/dist/render/face.d.ts +1 -1
- package/dist/render/fluid-bucket.d.ts +2 -2
- package/dist/render/geo.d.ts +1 -1
- package/dist/render/legacy-tints.d.ts +2 -2
- package/dist/render/obj.d.ts +5 -5
- package/dist/render/pipeline.d.ts +1 -1
- package/dist/render/pipeline.js +1 -1
- package/dist/render/rasterizer.d.ts +1 -1
- package/dist/render/renderer.d.ts +1 -1
- package/dist/render/tints.d.ts +1 -1
- package/dist/{renderer-DbUmTFDb.d.ts → renderer-QgROYvPv.d.ts} +5 -5
- package/dist/resources/descriptor.d.ts +1 -1
- package/dist/resources/descriptor.js +1 -1
- package/dist/resources/entity-textures.d.ts +2 -2
- package/dist/resources/jar.d.ts +1 -1
- package/dist/resources/jar.js +1 -1
- package/dist/resources/manager.d.ts +1 -1
- package/dist/resources/manager.js +1 -1
- package/dist/resources/synthetic.d.ts +1 -1
- package/dist/resources/zip-reader.js +1 -1
- package/dist/{run-Ctt_1iTd.js → run-5yX5KRiI.js} +4 -4
- package/dist/{run-CLjF0N2d.d.ts → run-CxB1qabg.d.ts} +2 -2
- package/dist/run.d.ts +1 -1
- package/dist/run.js +1 -1
- package/dist/{sources-e5D09Jz_.d.ts → sources-sFtealLJ.d.ts} +1 -1
- package/dist/states-BvoZA-ql.js +40 -0
- package/dist/states-OzneeCTU.d.ts +25 -0
- package/dist/{synthetic-B3R7mW9k.d.ts → synthetic-CWtFtAkR.d.ts} +1 -1
- package/dist/textures/loader.d.ts +1 -1
- package/dist/textures/overlay.d.ts +1 -1
- package/dist/{tints-uLl1CIkC.d.ts → tints-B0a1K11c.d.ts} +2 -2
- package/dist/{tints-BspVCz2G.js → tints-CZeyKzMv.js} +2 -2
- package/dist/{tints-CQX8a1F0.d.ts → tints-DwFmEkf3.d.ts} +2 -2
- package/dist/versions/legacy-reshape.d.ts +1 -1
- package/dist/versions/prepare.d.ts +1 -1
- package/dist/versions/prepare.js +1 -1
- package/dist/workers/render-worker.d.ts +2 -2
- package/dist/workers/render-worker.js +2 -2
- package/dist/{zip-reader-BSbJKUT1.js → zip-reader-onwEVMea.js} +4 -4
- package/package.json +6 -6
- package/dist/biomes-5ZwYxMYe.js +0 -384
- package/dist/biomes-CJDJQqJb.d.ts +0 -38
- package/dist/pack-format-Baoc_aSZ.d.ts +0 -328
package/dist/biomes-5ZwYxMYe.js
DELETED
|
@@ -1,384 +0,0 @@
|
|
|
1
|
-
//#region src/blocks/biomes.ts
|
|
2
|
-
/** `effects.water_color` where a biome does not override it, which is most of them. */
|
|
3
|
-
const DEFAULT_WATER_COLOR = "#3f76e4";
|
|
4
|
-
/** Every vanilla biome's climate, by id. Ordered so a regenerated table diffs cleanly. */
|
|
5
|
-
const VANILLA_BIOME_CLIMATES = {
|
|
6
|
-
"minecraft:badlands": {
|
|
7
|
-
temperature: 2,
|
|
8
|
-
downfall: 0,
|
|
9
|
-
grass: "#90814d",
|
|
10
|
-
foliage: "#9e814d"
|
|
11
|
-
},
|
|
12
|
-
"minecraft:bamboo_jungle": {
|
|
13
|
-
temperature: .95,
|
|
14
|
-
downfall: .9
|
|
15
|
-
},
|
|
16
|
-
"minecraft:basalt_deltas": {
|
|
17
|
-
temperature: 2,
|
|
18
|
-
downfall: 0
|
|
19
|
-
},
|
|
20
|
-
"minecraft:beach": {
|
|
21
|
-
temperature: .8,
|
|
22
|
-
downfall: .4
|
|
23
|
-
},
|
|
24
|
-
"minecraft:birch_forest": {
|
|
25
|
-
temperature: .6,
|
|
26
|
-
downfall: .6
|
|
27
|
-
},
|
|
28
|
-
"minecraft:cherry_grove": {
|
|
29
|
-
temperature: .5,
|
|
30
|
-
downfall: .8,
|
|
31
|
-
water: "#5db7ef",
|
|
32
|
-
grass: "#b6db61",
|
|
33
|
-
foliage: "#b6db61"
|
|
34
|
-
},
|
|
35
|
-
"minecraft:cold_ocean": {
|
|
36
|
-
temperature: .5,
|
|
37
|
-
downfall: .5,
|
|
38
|
-
water: "#3d57d6"
|
|
39
|
-
},
|
|
40
|
-
"minecraft:crimson_forest": {
|
|
41
|
-
temperature: 2,
|
|
42
|
-
downfall: 0
|
|
43
|
-
},
|
|
44
|
-
"minecraft:dappled_forest": {
|
|
45
|
-
temperature: .6,
|
|
46
|
-
downfall: .6,
|
|
47
|
-
water: "#375154",
|
|
48
|
-
grass: "#df6827",
|
|
49
|
-
foliage: "#e68e30",
|
|
50
|
-
dryFoliage: "#8c3a04"
|
|
51
|
-
},
|
|
52
|
-
"minecraft:dark_forest": {
|
|
53
|
-
temperature: .7,
|
|
54
|
-
downfall: .8,
|
|
55
|
-
modifier: "dark_forest",
|
|
56
|
-
dryFoliage: "#7b5334"
|
|
57
|
-
},
|
|
58
|
-
"minecraft:deep_cold_ocean": {
|
|
59
|
-
temperature: .5,
|
|
60
|
-
downfall: .5,
|
|
61
|
-
water: "#3d57d6"
|
|
62
|
-
},
|
|
63
|
-
"minecraft:deep_dark": {
|
|
64
|
-
temperature: .8,
|
|
65
|
-
downfall: .4
|
|
66
|
-
},
|
|
67
|
-
"minecraft:deep_frozen_ocean": {
|
|
68
|
-
temperature: .5,
|
|
69
|
-
downfall: .5,
|
|
70
|
-
water: "#3938c9"
|
|
71
|
-
},
|
|
72
|
-
"minecraft:deep_lukewarm_ocean": {
|
|
73
|
-
temperature: .5,
|
|
74
|
-
downfall: .5,
|
|
75
|
-
water: "#45adf2"
|
|
76
|
-
},
|
|
77
|
-
"minecraft:deep_ocean": {
|
|
78
|
-
temperature: .5,
|
|
79
|
-
downfall: .5
|
|
80
|
-
},
|
|
81
|
-
"minecraft:desert": {
|
|
82
|
-
temperature: 2,
|
|
83
|
-
downfall: 0
|
|
84
|
-
},
|
|
85
|
-
"minecraft:dripstone_caves": {
|
|
86
|
-
temperature: .8,
|
|
87
|
-
downfall: .4
|
|
88
|
-
},
|
|
89
|
-
"minecraft:end_barrens": {
|
|
90
|
-
temperature: .5,
|
|
91
|
-
downfall: .5
|
|
92
|
-
},
|
|
93
|
-
"minecraft:end_highlands": {
|
|
94
|
-
temperature: .5,
|
|
95
|
-
downfall: .5
|
|
96
|
-
},
|
|
97
|
-
"minecraft:end_midlands": {
|
|
98
|
-
temperature: .5,
|
|
99
|
-
downfall: .5
|
|
100
|
-
},
|
|
101
|
-
"minecraft:eroded_badlands": {
|
|
102
|
-
temperature: 2,
|
|
103
|
-
downfall: 0,
|
|
104
|
-
grass: "#90814d",
|
|
105
|
-
foliage: "#9e814d"
|
|
106
|
-
},
|
|
107
|
-
"minecraft:flower_forest": {
|
|
108
|
-
temperature: .7,
|
|
109
|
-
downfall: .8
|
|
110
|
-
},
|
|
111
|
-
"minecraft:forest": {
|
|
112
|
-
temperature: .7,
|
|
113
|
-
downfall: .8
|
|
114
|
-
},
|
|
115
|
-
"minecraft:frozen_ocean": {
|
|
116
|
-
temperature: 0,
|
|
117
|
-
downfall: .5,
|
|
118
|
-
water: "#3938c9"
|
|
119
|
-
},
|
|
120
|
-
"minecraft:frozen_peaks": {
|
|
121
|
-
temperature: -.7,
|
|
122
|
-
downfall: .9
|
|
123
|
-
},
|
|
124
|
-
"minecraft:frozen_river": {
|
|
125
|
-
temperature: 0,
|
|
126
|
-
downfall: .5,
|
|
127
|
-
water: "#3938c9"
|
|
128
|
-
},
|
|
129
|
-
"minecraft:grove": {
|
|
130
|
-
temperature: -.2,
|
|
131
|
-
downfall: .8
|
|
132
|
-
},
|
|
133
|
-
"minecraft:ice_spikes": {
|
|
134
|
-
temperature: 0,
|
|
135
|
-
downfall: .5
|
|
136
|
-
},
|
|
137
|
-
"minecraft:jagged_peaks": {
|
|
138
|
-
temperature: -.7,
|
|
139
|
-
downfall: .9
|
|
140
|
-
},
|
|
141
|
-
"minecraft:jungle": {
|
|
142
|
-
temperature: .95,
|
|
143
|
-
downfall: .9
|
|
144
|
-
},
|
|
145
|
-
"minecraft:lukewarm_ocean": {
|
|
146
|
-
temperature: .5,
|
|
147
|
-
downfall: .5,
|
|
148
|
-
water: "#45adf2"
|
|
149
|
-
},
|
|
150
|
-
"minecraft:lush_caves": {
|
|
151
|
-
temperature: .5,
|
|
152
|
-
downfall: .5
|
|
153
|
-
},
|
|
154
|
-
"minecraft:mangrove_swamp": {
|
|
155
|
-
temperature: .8,
|
|
156
|
-
downfall: .9,
|
|
157
|
-
water: "#3a7a6a",
|
|
158
|
-
modifier: "swamp",
|
|
159
|
-
foliage: "#8db127",
|
|
160
|
-
dryFoliage: "#7b5334"
|
|
161
|
-
},
|
|
162
|
-
"minecraft:meadow": {
|
|
163
|
-
temperature: .5,
|
|
164
|
-
downfall: .8,
|
|
165
|
-
water: "#0e4ecf"
|
|
166
|
-
},
|
|
167
|
-
"minecraft:mushroom_fields": {
|
|
168
|
-
temperature: .9,
|
|
169
|
-
downfall: 1
|
|
170
|
-
},
|
|
171
|
-
"minecraft:nether_wastes": {
|
|
172
|
-
temperature: 2,
|
|
173
|
-
downfall: 0
|
|
174
|
-
},
|
|
175
|
-
"minecraft:ocean": {
|
|
176
|
-
temperature: .5,
|
|
177
|
-
downfall: .5
|
|
178
|
-
},
|
|
179
|
-
"minecraft:old_growth_birch_forest": {
|
|
180
|
-
temperature: .6,
|
|
181
|
-
downfall: .6
|
|
182
|
-
},
|
|
183
|
-
"minecraft:old_growth_pine_taiga": {
|
|
184
|
-
temperature: .3,
|
|
185
|
-
downfall: .8
|
|
186
|
-
},
|
|
187
|
-
"minecraft:old_growth_spruce_taiga": {
|
|
188
|
-
temperature: .25,
|
|
189
|
-
downfall: .8
|
|
190
|
-
},
|
|
191
|
-
"minecraft:pale_garden": {
|
|
192
|
-
temperature: .7,
|
|
193
|
-
downfall: .8,
|
|
194
|
-
water: "#76889d",
|
|
195
|
-
grass: "#778272",
|
|
196
|
-
foliage: "#878d76",
|
|
197
|
-
dryFoliage: "#a0a69c"
|
|
198
|
-
},
|
|
199
|
-
"minecraft:plains": {
|
|
200
|
-
temperature: .8,
|
|
201
|
-
downfall: .4
|
|
202
|
-
},
|
|
203
|
-
"minecraft:river": {
|
|
204
|
-
temperature: .5,
|
|
205
|
-
downfall: .5
|
|
206
|
-
},
|
|
207
|
-
"minecraft:savanna": {
|
|
208
|
-
temperature: 2,
|
|
209
|
-
downfall: 0
|
|
210
|
-
},
|
|
211
|
-
"minecraft:savanna_plateau": {
|
|
212
|
-
temperature: 2,
|
|
213
|
-
downfall: 0
|
|
214
|
-
},
|
|
215
|
-
"minecraft:small_end_islands": {
|
|
216
|
-
temperature: .5,
|
|
217
|
-
downfall: .5
|
|
218
|
-
},
|
|
219
|
-
"minecraft:snowy_beach": {
|
|
220
|
-
temperature: .05,
|
|
221
|
-
downfall: .3,
|
|
222
|
-
water: "#3d57d6"
|
|
223
|
-
},
|
|
224
|
-
"minecraft:snowy_plains": {
|
|
225
|
-
temperature: 0,
|
|
226
|
-
downfall: .5
|
|
227
|
-
},
|
|
228
|
-
"minecraft:snowy_slopes": {
|
|
229
|
-
temperature: -.3,
|
|
230
|
-
downfall: .9
|
|
231
|
-
},
|
|
232
|
-
"minecraft:snowy_taiga": {
|
|
233
|
-
temperature: -.5,
|
|
234
|
-
downfall: .4,
|
|
235
|
-
water: "#3d57d6"
|
|
236
|
-
},
|
|
237
|
-
"minecraft:soul_sand_valley": {
|
|
238
|
-
temperature: 2,
|
|
239
|
-
downfall: 0
|
|
240
|
-
},
|
|
241
|
-
"minecraft:sparse_jungle": {
|
|
242
|
-
temperature: .95,
|
|
243
|
-
downfall: .8
|
|
244
|
-
},
|
|
245
|
-
"minecraft:stony_peaks": {
|
|
246
|
-
temperature: 1,
|
|
247
|
-
downfall: .3
|
|
248
|
-
},
|
|
249
|
-
"minecraft:stony_shore": {
|
|
250
|
-
temperature: .2,
|
|
251
|
-
downfall: .3
|
|
252
|
-
},
|
|
253
|
-
"minecraft:sulfur_caves": {
|
|
254
|
-
temperature: .8,
|
|
255
|
-
downfall: .4,
|
|
256
|
-
water: "#34bf89",
|
|
257
|
-
grass: "#aba64f"
|
|
258
|
-
},
|
|
259
|
-
"minecraft:sunflower_plains": {
|
|
260
|
-
temperature: .8,
|
|
261
|
-
downfall: .4
|
|
262
|
-
},
|
|
263
|
-
"minecraft:swamp": {
|
|
264
|
-
temperature: .8,
|
|
265
|
-
downfall: .9,
|
|
266
|
-
water: "#617b64",
|
|
267
|
-
modifier: "swamp",
|
|
268
|
-
foliage: "#6a7039",
|
|
269
|
-
dryFoliage: "#7b5334"
|
|
270
|
-
},
|
|
271
|
-
"minecraft:taiga": {
|
|
272
|
-
temperature: .25,
|
|
273
|
-
downfall: .8
|
|
274
|
-
},
|
|
275
|
-
"minecraft:the_end": {
|
|
276
|
-
temperature: .5,
|
|
277
|
-
downfall: .5
|
|
278
|
-
},
|
|
279
|
-
"minecraft:the_void": {
|
|
280
|
-
temperature: .5,
|
|
281
|
-
downfall: .5
|
|
282
|
-
},
|
|
283
|
-
"minecraft:warm_ocean": {
|
|
284
|
-
temperature: .5,
|
|
285
|
-
downfall: .5,
|
|
286
|
-
water: "#43d5ee"
|
|
287
|
-
},
|
|
288
|
-
"minecraft:warped_forest": {
|
|
289
|
-
temperature: 2,
|
|
290
|
-
downfall: 0
|
|
291
|
-
},
|
|
292
|
-
"minecraft:windswept_forest": {
|
|
293
|
-
temperature: .2,
|
|
294
|
-
downfall: .3
|
|
295
|
-
},
|
|
296
|
-
"minecraft:windswept_gravelly_hills": {
|
|
297
|
-
temperature: .2,
|
|
298
|
-
downfall: .3
|
|
299
|
-
},
|
|
300
|
-
"minecraft:windswept_hills": {
|
|
301
|
-
temperature: .2,
|
|
302
|
-
downfall: .3
|
|
303
|
-
},
|
|
304
|
-
"minecraft:windswept_savanna": {
|
|
305
|
-
temperature: 2,
|
|
306
|
-
downfall: 0
|
|
307
|
-
},
|
|
308
|
-
"minecraft:wooded_badlands": {
|
|
309
|
-
temperature: 2,
|
|
310
|
-
downfall: 0,
|
|
311
|
-
grass: "#90814d",
|
|
312
|
-
foliage: "#9e814d"
|
|
313
|
-
}
|
|
314
|
-
};
|
|
315
|
-
/** Vanilla writes `grass_color_modifier` as one of two names; anything else is a mod's typo. */
|
|
316
|
-
const MODIFIERS = /* @__PURE__ */ new Set(["dark_forest", "swamp"]);
|
|
317
|
-
/**
|
|
318
|
-
* A colour as biome data spells it. Vanilla's own files use `#rrggbb` now, mod
|
|
319
|
-
* jars built against older versions write the same value as a decimal int, and
|
|
320
|
-
* both mean the same 24 bits.
|
|
321
|
-
*/
|
|
322
|
-
function biomeColor(value) {
|
|
323
|
-
if (typeof value === "string") {
|
|
324
|
-
const hex = /^#?([\da-f]{6})$/i.exec(value.trim());
|
|
325
|
-
return hex ? `#${hex[1].toLowerCase()}` : void 0;
|
|
326
|
-
}
|
|
327
|
-
if (typeof value === "number" && Number.isFinite(value)) return `#${(value & 16777215).toString(16).padStart(6, "0")}`;
|
|
328
|
-
}
|
|
329
|
-
/** One biome definition as a datapack states it, or `null` when it states no climate. */
|
|
330
|
-
function parseBiomeClimate(json) {
|
|
331
|
-
const biome = json;
|
|
332
|
-
if (typeof biome?.temperature !== "number" || typeof biome.downfall !== "number") return null;
|
|
333
|
-
const effects = biome.effects ?? {};
|
|
334
|
-
const modifier = typeof effects.grass_color_modifier === "string" && MODIFIERS.has(effects.grass_color_modifier) ? effects.grass_color_modifier : void 0;
|
|
335
|
-
const water = biomeColor(effects.water_color);
|
|
336
|
-
const grass = biomeColor(effects.grass_color);
|
|
337
|
-
const foliage = biomeColor(effects.foliage_color);
|
|
338
|
-
const dryFoliage = biomeColor(effects.dry_foliage_color);
|
|
339
|
-
return {
|
|
340
|
-
temperature: biome.temperature,
|
|
341
|
-
downfall: biome.downfall,
|
|
342
|
-
...water !== void 0 && water !== "#3f76e4" && { water },
|
|
343
|
-
...modifier && { modifier },
|
|
344
|
-
...grass !== void 0 && { grass },
|
|
345
|
-
...foliage !== void 0 && { foliage },
|
|
346
|
-
...dryFoliage !== void 0 && { dryFoliage }
|
|
347
|
-
};
|
|
348
|
-
}
|
|
349
|
-
/**
|
|
350
|
-
* Climates for the namespaces a pack exports: whatever their datapacks declare,
|
|
351
|
-
* plus vanilla's own table when `minecraft` is one of them.
|
|
352
|
-
*
|
|
353
|
-
* A mod pack carries only its own biomes. The vanilla pack is always fetched
|
|
354
|
-
* beside it, so repeating vanilla's would be the same bytes in every one of the
|
|
355
|
-
* hundreds of mod packs published.
|
|
356
|
-
*/
|
|
357
|
-
async function buildBiomeClimates(resources, namespaces) {
|
|
358
|
-
const pack = {};
|
|
359
|
-
const unreadable = [];
|
|
360
|
-
for (const namespace of namespaces) {
|
|
361
|
-
if (namespace === "minecraft") Object.assign(pack, VANILLA_BIOME_CLIMATES);
|
|
362
|
-
for (const locator of await resources.listResources("biome", namespace)) {
|
|
363
|
-
const raw = await resources.getResource("biome", locator);
|
|
364
|
-
if (raw === null) continue;
|
|
365
|
-
let climate;
|
|
366
|
-
try {
|
|
367
|
-
climate = parseBiomeClimate(JSON.parse(raw.toString("utf8")));
|
|
368
|
-
} catch {
|
|
369
|
-
climate = null;
|
|
370
|
-
}
|
|
371
|
-
if (climate === null) {
|
|
372
|
-
unreadable.push(locator.toString());
|
|
373
|
-
continue;
|
|
374
|
-
}
|
|
375
|
-
pack[locator.toString()] = climate;
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
return {
|
|
379
|
-
pack,
|
|
380
|
-
unreadable
|
|
381
|
-
};
|
|
382
|
-
}
|
|
383
|
-
//#endregion
|
|
384
|
-
export { parseBiomeClimate as i, VANILLA_BIOME_CLIMATES as n, buildBiomeClimates as r, DEFAULT_WATER_COLOR as t };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { a as ResourceManager } from "./manager-exOIcdyx.js";
|
|
2
|
-
//#region src/blocks/biomes.d.ts
|
|
3
|
-
/** Where a biome's colours come from. Colours are `#rrggbb`, as everywhere else in the pack. */
|
|
4
|
-
interface BiomeClimate {
|
|
5
|
-
/** As the biome declares it, unclamped: the peaks run to -0.7 and the deserts to 2. */
|
|
6
|
-
temperature: number;
|
|
7
|
-
downfall: number;
|
|
8
|
-
/** `effects.water_color`, when it is not the default. */
|
|
9
|
-
water?: string;
|
|
10
|
-
/** `effects.grass_color_modifier`, applied after the colormap lookup. */
|
|
11
|
-
modifier?: 'dark_forest' | 'swamp';
|
|
12
|
-
/** `effects.grass_color`, which replaces the colormap lookup outright. */
|
|
13
|
-
grass?: string;
|
|
14
|
-
foliage?: string;
|
|
15
|
-
dryFoliage?: string;
|
|
16
|
-
}
|
|
17
|
-
/** `biomes.json`: biome id → climate. */
|
|
18
|
-
type BiomeClimatePack = Record<string, BiomeClimate>;
|
|
19
|
-
/** `effects.water_color` where a biome does not override it, which is most of them. */
|
|
20
|
-
declare const DEFAULT_WATER_COLOR = "#3f76e4";
|
|
21
|
-
/** Every vanilla biome's climate, by id. Ordered so a regenerated table diffs cleanly. */
|
|
22
|
-
declare const VANILLA_BIOME_CLIMATES: BiomeClimatePack;
|
|
23
|
-
/** One biome definition as a datapack states it, or `null` when it states no climate. */
|
|
24
|
-
declare function parseBiomeClimate(json: unknown): BiomeClimate | null;
|
|
25
|
-
/**
|
|
26
|
-
* Climates for the namespaces a pack exports: whatever their datapacks declare,
|
|
27
|
-
* plus vanilla's own table when `minecraft` is one of them.
|
|
28
|
-
*
|
|
29
|
-
* A mod pack carries only its own biomes. The vanilla pack is always fetched
|
|
30
|
-
* beside it, so repeating vanilla's would be the same bytes in every one of the
|
|
31
|
-
* hundreds of mod packs published.
|
|
32
|
-
*/
|
|
33
|
-
declare function buildBiomeClimates(resources: ResourceManager, namespaces: readonly string[]): Promise<{
|
|
34
|
-
pack: BiomeClimatePack;
|
|
35
|
-
unreadable: string[];
|
|
36
|
-
}>;
|
|
37
|
-
//#endregion
|
|
38
|
-
export { buildBiomeClimates as a, VANILLA_BIOME_CLIMATES as i, BiomeClimatePack as n, parseBiomeClimate as o, DEFAULT_WATER_COLOR as r, BiomeClimate as t };
|