@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
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
//#region src/blocks/block-behaviour.ts
|
|
2
|
+
const PUSH_REACTIONS = /* @__PURE__ */ new Set([
|
|
3
|
+
"destroy",
|
|
4
|
+
"block",
|
|
5
|
+
"ignore",
|
|
6
|
+
"push_only"
|
|
7
|
+
]);
|
|
8
|
+
function num(value) {
|
|
9
|
+
return value?.kind === "number" ? value.value : null;
|
|
10
|
+
}
|
|
11
|
+
function field(handle, name) {
|
|
12
|
+
return handle.fields.get(`mapped:${name}`) ?? handle.fields.get(name);
|
|
13
|
+
}
|
|
14
|
+
/** A `MapColor` (`MaterialColor` before 1.20) is constructed as `(id, rgb)`; its id is the first. */
|
|
15
|
+
function mapColorId(value) {
|
|
16
|
+
if (value?.kind !== "object") return null;
|
|
17
|
+
const args = value.handle.ctorArgs ?? [];
|
|
18
|
+
const id = num(args[0]);
|
|
19
|
+
if (args.length === 2 && id !== null && num(args[1]) !== null && id >= 0 && id < 64) return id;
|
|
20
|
+
if (args[0]?.kind !== "string" || args[1]?.kind !== "number") return null;
|
|
21
|
+
for (const arg of args) {
|
|
22
|
+
const nested = arg.kind === "object" && arg.handle !== value.handle ? mapColorId(arg) : null;
|
|
23
|
+
if (nested !== null) return nested;
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
/** An enum constant's serialized name: the lower-cased constant name it was constructed with. */
|
|
28
|
+
function enumName(value) {
|
|
29
|
+
const name = value?.kind === "object" ? value.handle.ctorArgs?.[0] : void 0;
|
|
30
|
+
return name?.kind === "string" ? name.value.toLowerCase() : null;
|
|
31
|
+
}
|
|
32
|
+
/** The chain of `Properties` a block's came from, oldest copy first, so later calls win. */
|
|
33
|
+
function lineage(props) {
|
|
34
|
+
const chain = [];
|
|
35
|
+
for (let at = props; at && !chain.includes(at); at = at.copyOf) chain.unshift(at);
|
|
36
|
+
return chain;
|
|
37
|
+
}
|
|
38
|
+
/** The `Material` a pre-1.20 `Properties` was constructed with, when it was. */
|
|
39
|
+
function materialOf(props) {
|
|
40
|
+
for (const handle of lineage(props)) for (const arg of handle.ctorArgs ?? []) if (arg.kind === "object" && field(arg.handle, "replaceable") !== void 0) return arg.handle;
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The colour a block's `Properties` state: a `mapColor` call, the colour a pre-1.20 `Properties` was
|
|
45
|
+
* constructed with, or its `Material`'s, latest first. A constant or a function of state.
|
|
46
|
+
*/
|
|
47
|
+
function statedMapColor(props) {
|
|
48
|
+
const material = materialOf(props);
|
|
49
|
+
let colour = material ? field(material, "color") : void 0;
|
|
50
|
+
for (const handle of lineage(props)) {
|
|
51
|
+
colour = (handle.ctorArgs ?? []).find((arg) => arg.kind === "lambda" || mapColorId(arg) !== null) ?? colour;
|
|
52
|
+
for (const call of handle.calls ?? []) if (call.name === "mapColor") colour = call.args[0];
|
|
53
|
+
}
|
|
54
|
+
return colour;
|
|
55
|
+
}
|
|
56
|
+
/** A float as Java wrote it: `0.3F` is 0.30000001192092896 as a double, and 0.3 is what the code says. */
|
|
57
|
+
function float32(value) {
|
|
58
|
+
for (let digits = 1; digits < 10; digits++) {
|
|
59
|
+
const candidate = Number(value.toPrecision(digits));
|
|
60
|
+
if (Math.fround(candidate) === Math.fround(value)) return candidate;
|
|
61
|
+
}
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
function blockBehaviour(registration, extraction) {
|
|
65
|
+
const props = registration.props;
|
|
66
|
+
if (!props) return null;
|
|
67
|
+
const failures = [];
|
|
68
|
+
const behaviour = {
|
|
69
|
+
hardness: 0,
|
|
70
|
+
resistance: 0
|
|
71
|
+
};
|
|
72
|
+
const mapColor = statedMapColor(props);
|
|
73
|
+
const material = materialOf(props);
|
|
74
|
+
if (material) {
|
|
75
|
+
if (num(field(material, "replaceable")) === 1) behaviour.replaceable = true;
|
|
76
|
+
if (num(field(material, "liquid")) === 1) behaviour.liquid = true;
|
|
77
|
+
if (num(field(material, "flammable")) === 1) behaviour.flammable = true;
|
|
78
|
+
if (num(field(material, "alwaysDestroyable")) === 0) behaviour.requiresTool = true;
|
|
79
|
+
const reaction = enumName(field(material, "pushReaction"));
|
|
80
|
+
if (reaction && PUSH_REACTIONS.has(reaction)) behaviour.pushReaction = reaction;
|
|
81
|
+
}
|
|
82
|
+
for (const handle of lineage(props)) for (const call of handle.calls ?? []) {
|
|
83
|
+
const [first, second] = call.args;
|
|
84
|
+
switch (call.name) {
|
|
85
|
+
case "strength":
|
|
86
|
+
behaviour.hardness = float32(num(first) ?? behaviour.hardness);
|
|
87
|
+
behaviour.resistance = float32(num(second ?? first) ?? behaviour.resistance);
|
|
88
|
+
break;
|
|
89
|
+
case "destroyTime":
|
|
90
|
+
behaviour.hardness = float32(num(first) ?? behaviour.hardness);
|
|
91
|
+
break;
|
|
92
|
+
case "explosionResistance":
|
|
93
|
+
behaviour.resistance = float32(num(first) ?? behaviour.resistance);
|
|
94
|
+
break;
|
|
95
|
+
case "instabreak":
|
|
96
|
+
behaviour.hardness = 0;
|
|
97
|
+
behaviour.resistance = 0;
|
|
98
|
+
break;
|
|
99
|
+
case "noCollission":
|
|
100
|
+
case "noCollision":
|
|
101
|
+
behaviour.collision = false;
|
|
102
|
+
behaviour.occludes = false;
|
|
103
|
+
break;
|
|
104
|
+
case "noOcclusion":
|
|
105
|
+
behaviour.occludes = false;
|
|
106
|
+
break;
|
|
107
|
+
case "replaceable":
|
|
108
|
+
behaviour.replaceable = true;
|
|
109
|
+
break;
|
|
110
|
+
case "air":
|
|
111
|
+
behaviour.air = true;
|
|
112
|
+
break;
|
|
113
|
+
case "liquid":
|
|
114
|
+
behaviour.liquid = true;
|
|
115
|
+
break;
|
|
116
|
+
case "ignitedByLava":
|
|
117
|
+
behaviour.flammable = true;
|
|
118
|
+
break;
|
|
119
|
+
case "requiresCorrectToolForDrops":
|
|
120
|
+
behaviour.requiresTool = true;
|
|
121
|
+
break;
|
|
122
|
+
case "randomTicks":
|
|
123
|
+
behaviour.randomTicks = true;
|
|
124
|
+
break;
|
|
125
|
+
case "pushReaction": {
|
|
126
|
+
const reaction = enumName(first);
|
|
127
|
+
if (reaction === "normal") delete behaviour.pushReaction;
|
|
128
|
+
else if (reaction && PUSH_REACTIONS.has(reaction)) behaviour.pushReaction = reaction;
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
case "friction":
|
|
132
|
+
case "speedFactor":
|
|
133
|
+
case "jumpFactor": {
|
|
134
|
+
const value = num(first);
|
|
135
|
+
if (value !== null) behaviour[call.name] = float32(value);
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
if (mapColor?.kind === "lambda") {
|
|
141
|
+
const folded = extraction.tabulate(mapColor, mapColorId);
|
|
142
|
+
if ("failure" in folded) failures.push(`map colour: ${folded.failure}`);
|
|
143
|
+
else behaviour.mapColor = folded.value;
|
|
144
|
+
} else if (mapColor !== void 0) {
|
|
145
|
+
const id = mapColorId(mapColor);
|
|
146
|
+
if (id === null) failures.push("map colour is a value the interpreter could not identify");
|
|
147
|
+
else behaviour.mapColor = id;
|
|
148
|
+
}
|
|
149
|
+
return {
|
|
150
|
+
behaviour,
|
|
151
|
+
failures
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
//#endregion
|
|
155
|
+
export { statedMapColor as n, blockBehaviour as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PackedRect, i as PackedPage, n as PackOptions, o as packAtlas, r as PackedAtlas, t as PackEntry } from "../atlas-pack-
|
|
1
|
+
import { a as PackedRect, i as PackedPage, n as PackOptions, o as packAtlas, r as PackedAtlas, t as PackEntry } from "../atlas-pack-BUadroKy.js";
|
|
2
2
|
export { PackEntry, PackOptions, PackedAtlas, PackedPage, PackedRect, packAtlas };
|
package/dist/blocks/biomes.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as buildBiomeClimates, i as
|
|
2
|
-
export { BiomeClimate, BiomeClimatePack, DEFAULT_WATER_COLOR, VANILLA_BIOME_CLIMATES, buildBiomeClimates, parseBiomeClimate };
|
|
1
|
+
import { a as LegacyBiome, c as buildBiomeClimates, i as LEGACY_BIOMES, l as parseBiomeClimate, n as BiomeClimatePack, o as PRE_JAR_BIOMES, r as DEFAULT_WATER_COLOR, s as VANILLA_BIOME_CLIMATES, t as BiomeClimate, u as vanillaBiomesFor } from "../biomes-CnnhDCnk.js";
|
|
2
|
+
export { BiomeClimate, BiomeClimatePack, DEFAULT_WATER_COLOR, LEGACY_BIOMES, LegacyBiome, PRE_JAR_BIOMES, VANILLA_BIOME_CLIMATES, buildBiomeClimates, parseBiomeClimate, vanillaBiomesFor };
|
package/dist/blocks/biomes.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
export { DEFAULT_WATER_COLOR, VANILLA_BIOME_CLIMATES, buildBiomeClimates, parseBiomeClimate };
|
|
1
|
+
import { a as buildBiomeClimates, i as VANILLA_BIOME_CLIMATES, n as LEGACY_BIOMES, o as parseBiomeClimate, r as PRE_JAR_BIOMES, s as vanillaBiomesFor, t as DEFAULT_WATER_COLOR } from "../biomes-BGOF6gRM.js";
|
|
2
|
+
export { DEFAULT_WATER_COLOR, LEGACY_BIOMES, PRE_JAR_BIOMES, VANILLA_BIOME_CLIMATES, buildBiomeClimates, parseBiomeClimate, vanillaBiomesFor };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as ResourceManager } from "../manager-
|
|
2
|
-
import { i as TextureLoader } from "../loader-
|
|
3
|
-
import { t as ModelLoader } from "../loader-
|
|
1
|
+
import { a as ResourceManager } from "../manager-Ct0dEOMg.js";
|
|
2
|
+
import { i as TextureLoader } from "../loader-C4gsX_wO.js";
|
|
3
|
+
import { t as ModelLoader } from "../loader-BYyPIs9f.js";
|
|
4
4
|
//#region src/blocks/block-entities.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* What the table is allowed to look at. The vanilla families are a lookup, but
|
package/dist/blocks/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as runBlocksCli } from "../cli-
|
|
1
|
+
import { t as runBlocksCli } from "../cli-xBcMuKA3.js";
|
|
2
2
|
export { runBlocksCli };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as ResourceManager } from "../manager-
|
|
2
|
-
import {
|
|
1
|
+
import { a as ResourceManager } from "../manager-Ct0dEOMg.js";
|
|
2
|
+
import { P as BlockPackModel } from "../block-behaviour-9Tj_GIUC.js";
|
|
3
3
|
//#region src/blocks/ender-storage.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Ender Storage feeds this OBJ through CodeChickenLib's `swapYZ`, translates it almost exactly onto
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as ResourceManager } from "../manager-
|
|
2
|
-
import { i as TextureLoader } from "../loader-
|
|
3
|
-
import {
|
|
1
|
+
import { a as ResourceManager } from "../manager-Ct0dEOMg.js";
|
|
2
|
+
import { i as TextureLoader } from "../loader-C4gsX_wO.js";
|
|
3
|
+
import { K as EntityPackEntry } from "../block-behaviour-9Tj_GIUC.js";
|
|
4
4
|
//#region src/blocks/entities.d.ts
|
|
5
5
|
interface EntityPackResult {
|
|
6
6
|
entities: Record<string, EntityPackEntry>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as ResourceManager } from "../manager-
|
|
2
|
-
import { C as EntityPackModel, T as EquipmentPack } from "../pack-format-Baoc_aSZ.js";
|
|
1
|
+
import { a as ResourceManager } from "../manager-Ct0dEOMg.js";
|
|
3
2
|
import { t as ClassSource } from "../jar-classes-CSRrPAUy.js";
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
3
|
+
import { Y as EquipmentPack, q as EntityPackModel } from "../block-behaviour-9Tj_GIUC.js";
|
|
4
|
+
import { t as Mappings } from "../mappings-DhOPQTgV.js";
|
|
5
|
+
import { t as ModelCode } from "../model-code-Csc3bs3h.js";
|
|
6
6
|
//#region src/blocks/entity-models.d.ts
|
|
7
7
|
interface EntityGeometryResult {
|
|
8
8
|
/** Model id (the class it came from) → geometry. */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as collectEntityGeometry, r as collectEquipment, t as collectArmourTrims } from "../entity-models-
|
|
1
|
+
import { n as collectEntityGeometry, r as collectEquipment, t as collectArmourTrims } from "../entity-models-BYAxrTsk.js";
|
|
2
2
|
export { collectArmourTrims, collectEntityGeometry, collectEquipment };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { t as ClassSource } from "../jar-classes-CSRrPAUy.js";
|
|
2
|
+
//#region src/blocks/entity-sizes.d.ts
|
|
3
|
+
interface Instruction {
|
|
4
|
+
op: number;
|
|
5
|
+
/** The pool index a two-byte operand names, for the loads and invokes this reads. */
|
|
6
|
+
index: number;
|
|
7
|
+
}
|
|
8
|
+
/** Every instruction of a method, in order. */
|
|
9
|
+
declare function instructions(code: Uint8Array): Generator<Instruction>;
|
|
10
|
+
interface EntitySizeResult {
|
|
11
|
+
/** Entity id → [width, height], in blocks. */
|
|
12
|
+
sizes: Map<string, [number, number]>;
|
|
13
|
+
failures: Array<{
|
|
14
|
+
id: string;
|
|
15
|
+
reason: string;
|
|
16
|
+
}>;
|
|
17
|
+
}
|
|
18
|
+
declare function collectEntitySizes(options: {
|
|
19
|
+
classes: ClassSource;
|
|
20
|
+
version: string;
|
|
21
|
+
cacheDir: string;
|
|
22
|
+
entityIds: readonly string[];
|
|
23
|
+
}): Promise<EntitySizeResult>;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { EntitySizeResult, collectEntitySizes, instructions };
|
package/dist/blocks/export.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as exportBlockPack, n as BlockPackResult, r as ExportBlockPackOptions, t as BlockPackFailure } from "../export-
|
|
1
|
+
import { i as exportBlockPack, n as BlockPackResult, r as ExportBlockPackOptions, t as BlockPackFailure } from "../export-HEoqcV-Y.js";
|
|
2
2
|
export { BlockPackFailure, BlockPackResult, ExportBlockPackOptions, exportBlockPack };
|
package/dist/blocks/export.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as exportBlockPack } from "../export-
|
|
1
|
+
import { t as exportBlockPack } from "../export-CbG2Rx3i.js";
|
|
2
2
|
export { exportBlockPack };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as ResourceManager } from "../manager-
|
|
2
|
-
import {
|
|
1
|
+
import { a as ResourceManager } from "../manager-Ct0dEOMg.js";
|
|
2
|
+
import { P as BlockPackModel } from "../block-behaviour-9Tj_GIUC.js";
|
|
3
3
|
//#region src/blocks/geo-blocks.d.ts
|
|
4
4
|
interface GeoBlockOverride {
|
|
5
5
|
model: BlockPackModel;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as ResourceManager } from "../manager-
|
|
2
|
-
import { i as TextureLoader } from "../loader-
|
|
3
|
-
import { t as ModelLoader } from "../loader-
|
|
4
|
-
import {
|
|
1
|
+
import { a as ResourceManager } from "../manager-Ct0dEOMg.js";
|
|
2
|
+
import { i as TextureLoader } from "../loader-C4gsX_wO.js";
|
|
3
|
+
import { t as ModelLoader } from "../loader-BYyPIs9f.js";
|
|
4
|
+
import { Z as ItemPackEntry } from "../block-behaviour-9Tj_GIUC.js";
|
|
5
5
|
//#region src/blocks/item-sprites.d.ts
|
|
6
6
|
interface ItemSpriteFailure {
|
|
7
7
|
id: string;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { _ as extractBlockLight, a as Handle, c as LightExtraction, d as MemberReference, f as PropertyDomain, g as Value, h as StateProbe, l as LightGetter, m as Registration, o as LambdaValue, p as PropsCall, s as LightCodeSource, u as LightSpec } from "../block-behaviour-9Tj_GIUC.js";
|
|
2
|
+
export { Handle, LambdaValue, LightCodeSource, LightExtraction, LightGetter, LightSpec, MemberReference, PropertyDomain, PropsCall, Registration, StateProbe, Value, extractBlockLight };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { t as ClassSource } from "../jar-classes-CSRrPAUy.js";
|
|
2
|
+
import { j as BlockPackLight, t as BlockBehaviour } from "../block-behaviour-9Tj_GIUC.js";
|
|
3
|
+
//#region src/blocks/light.d.ts
|
|
4
|
+
interface CollectBlockLightOptions {
|
|
5
|
+
version: string;
|
|
6
|
+
/** Where mappings cache; the jar cache directory. */
|
|
7
|
+
cacheDir: string;
|
|
8
|
+
classes: ClassSource;
|
|
9
|
+
/** Every block the pack describes, fully qualified; each gets an answer or a failure. */
|
|
10
|
+
blockIds: readonly string[];
|
|
11
|
+
/** Blocks to describe in `notes` — what was registered and with which light — for chasing a failure. */
|
|
12
|
+
trace?: readonly string[];
|
|
13
|
+
onProgress?: (done: number, total: number) => void;
|
|
14
|
+
}
|
|
15
|
+
interface BlockLightResult {
|
|
16
|
+
/** Only the blocks that emit; absent is 0. */
|
|
17
|
+
light: Record<string, BlockPackLight>;
|
|
18
|
+
/**
|
|
19
|
+
* What each block does, from the same run: hardness, collision, map colour. Empty on a version with
|
|
20
|
+
* no mappings (1.13), whose builder calls have no names to read.
|
|
21
|
+
*/
|
|
22
|
+
behaviour: Record<string, BlockBehaviour>;
|
|
23
|
+
failures: Array<{
|
|
24
|
+
id: string;
|
|
25
|
+
reason: string;
|
|
26
|
+
}>;
|
|
27
|
+
/** Blocks whose behaviour was partly unreadable, kept apart from light's so each file owns its gaps. */
|
|
28
|
+
behaviourFailures: Array<{
|
|
29
|
+
id: string;
|
|
30
|
+
reason: string;
|
|
31
|
+
}>;
|
|
32
|
+
/** What the interpreter gave up on along the way, for a person reading a failure. */
|
|
33
|
+
notes: string[];
|
|
34
|
+
}
|
|
35
|
+
declare function collectBlockLight(options: CollectBlockLightOptions): Promise<BlockLightResult>;
|
|
36
|
+
/**
|
|
37
|
+
* Vanilla's emitters, transcribed from `Blocks.java` across 1.13 → 26.2 and checked against the wiki.
|
|
38
|
+
*
|
|
39
|
+
* By path, as a superset across versions: a block a version does not have never comes up in one of its
|
|
40
|
+
* worlds, and none of these levels has changed since the block was added. Cases are in the folded form
|
|
41
|
+
* the extractor emits — the commonest level as `default`, the rest as the fewest properties that
|
|
42
|
+
* decide them — so the two can be compared directly.
|
|
43
|
+
*/
|
|
44
|
+
declare const VANILLA_LIGHT: Record<string, BlockPackLight>;
|
|
45
|
+
/** The vanilla table as it stood at a version: `VANILLA_LIGHT` with the history applied. */
|
|
46
|
+
declare function vanillaLightAt(version: string): Record<string, BlockPackLight>;
|
|
47
|
+
//#endregion
|
|
48
|
+
export { BlockLightResult, CollectBlockLightOptions, VANILLA_LIGHT, collectBlockLight, vanillaLightAt };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as buildObjMesh, n as ObjMesh, r as ObjMeshError, t as MeshGroup } from "../obj-mesh-
|
|
1
|
+
import { i as buildObjMesh, n as ObjMesh, r as ObjMeshError, t as MeshGroup } from "../obj-mesh-CzL0lOlJ.js";
|
|
2
2
|
export { MeshGroup, ObjMesh, ObjMeshError, buildObjMesh };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
export { BlockPackAtlasFile, BlockPackAtlasPage, BlockPackBiomesFile, BlockPackBlockState, BlockPackBlockStatesFile, BlockPackElement, BlockPackEntitiesFile, BlockPackEntityModelsFile, BlockPackFace, BlockPackItemsFile, BlockPackMetaFile, BlockPackModel, BlockPackModelsFile, BlockPackRenderLayer, BlockPackSprite, BlockPackSpriteFrame, BlockPackTintsFile, BlockPackVariant, EQUIPMENT_SLOTS, EntityPackCube, EntityPackCubeFace, EntityPackEntry, EntityPackModel, EntityPackPart, EquipmentPack, EquipmentSlot, ItemPackEntry, ItemPackLayer };
|
|
1
|
+
import { A as BlockPackItemsFile, B as BlockPackTagsFile, C as BlockPackBlockState, D as BlockPackEntityModelsFile, E as BlockPackEntitiesFile, F as BlockPackModelsFile, G as EntityPackCubeFace, H as BlockPackVariant, I as BlockPackRenderLayer, J as EntityPackPart, K as EntityPackEntry, L as BlockPackSprite, M as BlockPackLightFile, N as BlockPackMetaFile, O as BlockPackFace, P as BlockPackModel, Q as ItemPackLayer, R as BlockPackSpriteFrame, S as BlockPackBiomesFile, T as BlockPackElement, U as EQUIPMENT_SLOTS, V as BlockPackTintsFile, W as EntityPackCube, X as EquipmentSlot, Y as EquipmentPack, Z as ItemPackEntry, b as BlockPackAtlasPage, j as BlockPackLight, k as BlockPackGameRulesFile, q as EntityPackModel, v as BlockPackAdvancementsFile, w as BlockPackBlockStatesFile, x as BlockPackBehaviourFile, y as BlockPackAtlasFile, z as BlockPackStatesFile } from "../block-behaviour-9Tj_GIUC.js";
|
|
2
|
+
export { BlockPackAdvancementsFile, BlockPackAtlasFile, BlockPackAtlasPage, BlockPackBehaviourFile, BlockPackBiomesFile, BlockPackBlockState, BlockPackBlockStatesFile, BlockPackElement, BlockPackEntitiesFile, BlockPackEntityModelsFile, BlockPackFace, BlockPackGameRulesFile, BlockPackItemsFile, BlockPackLight, BlockPackLightFile, BlockPackMetaFile, BlockPackModel, BlockPackModelsFile, BlockPackRenderLayer, BlockPackSprite, BlockPackSpriteFrame, BlockPackStatesFile, BlockPackTagsFile, BlockPackTintsFile, BlockPackVariant, EQUIPMENT_SLOTS, EntityPackCube, EntityPackCubeFace, EntityPackEntry, EntityPackModel, EntityPackPart, EquipmentPack, EquipmentSlot, ItemPackEntry, ItemPackLayer };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as TextureLoader, r as Texture } from "../loader-
|
|
2
|
-
import { i as PackedPage } from "../atlas-pack-
|
|
3
|
-
import {
|
|
1
|
+
import { i as TextureLoader, r as Texture } from "../loader-C4gsX_wO.js";
|
|
2
|
+
import { i as PackedPage } from "../atlas-pack-BUadroKy.js";
|
|
3
|
+
import { I as BlockPackRenderLayer, L as BlockPackSprite } from "../block-behaviour-9Tj_GIUC.js";
|
|
4
4
|
//#region src/blocks/sprite-sheet.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Vanilla's own id for the missing-texture sprite. A face whose texture does
|
package/dist/blocks/tints.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as buildBlockTints, i as UNREGISTERED_TINTS, n as BlockTintPack, r as BuiltBlockTints, t as BlockTint } from "../tints-
|
|
1
|
+
import { a as buildBlockTints, i as UNREGISTERED_TINTS, n as BlockTintPack, r as BuiltBlockTints, t as BlockTint } from "../tints-DwFmEkf3.js";
|
|
2
2
|
export { BlockTint, BlockTintPack, BuiltBlockTints, UNREGISTERED_TINTS, buildBlockTints };
|
|
@@ -272,6 +272,26 @@ function parseClassFile(bytes) {
|
|
|
272
272
|
}
|
|
273
273
|
return null;
|
|
274
274
|
};
|
|
275
|
+
const bootstrap = (index) => {
|
|
276
|
+
const entry = constants[index];
|
|
277
|
+
const row = entry?.bootstrapIndex === void 0 ? void 0 : bootstraps[entry.bootstrapIndex];
|
|
278
|
+
if (!row) return null;
|
|
279
|
+
const handle = constants[row.handleIndex];
|
|
280
|
+
return {
|
|
281
|
+
factory: handle?.tag === "methodHandle" && handle.referenceIndex !== void 0 ? reference(handle.referenceIndex) : null,
|
|
282
|
+
args: row.argumentIndexes.map((argument) => literal(argument))
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
const invokeDynamic = (index) => {
|
|
286
|
+
const entry = constants[index];
|
|
287
|
+
if (entry?.tag !== "invokeDynamic" || entry.nameAndTypeIndex === void 0) return null;
|
|
288
|
+
const nameAndType = constants[entry.nameAndTypeIndex];
|
|
289
|
+
if (!nameAndType?.nameIndex || !nameAndType.descriptorIndex) return null;
|
|
290
|
+
return {
|
|
291
|
+
name: utf8(nameAndType.nameIndex),
|
|
292
|
+
descriptor: utf8(nameAndType.descriptorIndex)
|
|
293
|
+
};
|
|
294
|
+
};
|
|
275
295
|
return {
|
|
276
296
|
thisClass,
|
|
277
297
|
superClass,
|
|
@@ -280,7 +300,9 @@ function parseClassFile(bytes) {
|
|
|
280
300
|
utf8,
|
|
281
301
|
reference,
|
|
282
302
|
literal,
|
|
283
|
-
lambdaTarget
|
|
303
|
+
lambdaTarget,
|
|
304
|
+
bootstrap,
|
|
305
|
+
invokeDynamic
|
|
284
306
|
};
|
|
285
307
|
}
|
|
286
308
|
//#endregion
|
|
@@ -61,6 +61,29 @@ interface ClassFile {
|
|
|
61
61
|
name: string;
|
|
62
62
|
descriptor: string;
|
|
63
63
|
} | null;
|
|
64
|
+
/**
|
|
65
|
+
* An `invokedynamic`'s bootstrap row: the factory it calls and the constant arguments it was given.
|
|
66
|
+
*
|
|
67
|
+
* A lambda is one shape of this; string concatenation is another. `makeConcatWithConstants` takes
|
|
68
|
+
* a recipe string with a placeholder per operand, and a name built as `prefix + "_stairs"` is only
|
|
69
|
+
* recoverable by reading that recipe back.
|
|
70
|
+
*/
|
|
71
|
+
bootstrap: (index: number) => {
|
|
72
|
+
factory: {
|
|
73
|
+
owner: string;
|
|
74
|
+
name: string;
|
|
75
|
+
descriptor: string;
|
|
76
|
+
} | null;
|
|
77
|
+
args: Array<string | number | bigint | null>;
|
|
78
|
+
} | null;
|
|
79
|
+
/**
|
|
80
|
+
* An `invokedynamic`'s own name and descriptor: what it pops (the values the lambda captured) and
|
|
81
|
+
* what it leaves. `reference` cannot answer for one, since the pool entry names no owner class.
|
|
82
|
+
*/
|
|
83
|
+
invokeDynamic: (index: number) => {
|
|
84
|
+
name: string;
|
|
85
|
+
descriptor: string;
|
|
86
|
+
} | null;
|
|
64
87
|
}
|
|
65
88
|
declare function parseClassFile(bytes: Uint8Array): ClassFile;
|
|
66
89
|
//#endregion
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as builtinPackPath } from "./builtin-WkWjATeh.js";
|
|
2
|
-
import { n as LayeredResourceManager, t as FolderResourceManager } from "./manager-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { n as
|
|
2
|
+
import { n as LayeredResourceManager, t as FolderResourceManager } from "./manager-D6zXmFrO.js";
|
|
3
|
+
import { a as prepareVersionResources, r as compareVersions } from "./prepare-DkJkZXuQ.js";
|
|
4
|
+
import { t as exportBlockPack } from "./export-CbG2Rx3i.js";
|
|
5
|
+
import { n as layeredClasses, t as JarClassReader } from "./jar-classes-0wqWbTax.js";
|
|
6
|
+
import { n as prepareModResources } from "./prepare-sj36BP90.js";
|
|
6
7
|
import { t as downloadClientJar } from "./download-1wAfrGKx.js";
|
|
7
|
-
import { a as prepareVersionResources, r as compareVersions } from "./prepare-D49Gu4Lv.js";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import os from "node:os";
|
|
10
10
|
import { parseArgs } from "node:util";
|
|
@@ -38,6 +38,8 @@ Options:
|
|
|
38
38
|
--no-items do not export items.json (flat sprites for non-block items)
|
|
39
39
|
--no-entities do not export entities.json (entity names and marker colours)
|
|
40
40
|
--no-entity-geometry do not read the jar's code for entity model geometry
|
|
41
|
+
--reports <dir> data generator reports for this version (blocks.json
|
|
42
|
+
becomes states.json: every property and default state)
|
|
41
43
|
--cache-dir <dir> jar download cache (default ~/.rendermite)
|
|
42
44
|
`;
|
|
43
45
|
/**
|
|
@@ -92,6 +94,7 @@ async function runBlocksCli(argv) {
|
|
|
92
94
|
"padding": { type: "string" },
|
|
93
95
|
"max-page-size": { type: "string" },
|
|
94
96
|
"cache-dir": { type: "string" },
|
|
97
|
+
"reports": { type: "string" },
|
|
95
98
|
"builtin": { type: "string" },
|
|
96
99
|
"no-builtin": {
|
|
97
100
|
type: "boolean",
|
|
@@ -173,6 +176,7 @@ async function runBlocksCli(argv) {
|
|
|
173
176
|
entities: !values["no-entities"],
|
|
174
177
|
classes: classes ?? void 0,
|
|
175
178
|
cacheDir,
|
|
179
|
+
reports: values.reports,
|
|
176
180
|
onProgress: (stage, done, total) => {
|
|
177
181
|
if (done === total || done % 250 === 0) console.log(`${stage}: ${done}/${total}`);
|
|
178
182
|
}
|
|
@@ -181,7 +185,9 @@ async function runBlocksCli(argv) {
|
|
|
181
185
|
console.log(result.items > 0 ? `${result.items} flat items described in items.json.` : "No flat item sprites exported.");
|
|
182
186
|
console.log(result.entities > 0 ? `${result.entities} entity types described in entities.json.` : "No entity types exported.");
|
|
183
187
|
console.log(result.entityModels > 0 ? `${result.entityModels} entity models recovered from the jar's own code.` : "No entity geometry recovered.");
|
|
188
|
+
console.log(result.light > 0 ? `${result.light} light-emitting blocks described in light.json.` : "No block light read; light.json not written.");
|
|
184
189
|
console.log(result.biomes > 0 ? `${result.biomes} biomes described in biomes.json.` : "No biomes to describe; biomes.json not written.");
|
|
190
|
+
console.log(`${result.tags} tags, ${result.advancements} advancements${result.states > 0 ? `, ${result.states} block state definitions` : ""}.`);
|
|
185
191
|
console.log(`${result.failures.length} entries in failures.json.`);
|
|
186
192
|
return 0;
|
|
187
193
|
} finally {
|
package/dist/cli.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { n as builtinPackPath, t as bedCompatPath } from "./builtin-WkWjATeh.js";
|
|
3
|
-
import { n as LayeredResourceManager, t as FolderResourceManager } from "./manager-
|
|
4
|
-
import { t as JarResourceManager } from "./jar-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { n as LayeredResourceManager, t as FolderResourceManager } from "./manager-D6zXmFrO.js";
|
|
4
|
+
import { t as JarResourceManager } from "./jar-DvofBm71.js";
|
|
5
|
+
import { a as prepareVersionResources, i as eraForVersion, n as GEOMETRY_DONOR_VERSIONS } from "./prepare-DkJkZXuQ.js";
|
|
6
|
+
import { t as curatedModelOverrides } from "./models-BsYA-NZg.js";
|
|
7
|
+
import { n as harvestTintOverrides, t as curatedTintOverrides } from "./tints-CZeyKzMv.js";
|
|
7
8
|
import { t as downloadClientJar } from "./download-1wAfrGKx.js";
|
|
8
|
-
import {
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as run } from "./run-Ctt_1iTd.js";
|
|
9
|
+
import { t as runBlocksCli } from "./cli-xBcMuKA3.js";
|
|
10
|
+
import { t as run } from "./run-5yX5KRiI.js";
|
|
11
11
|
import path from "node:path";
|
|
12
12
|
import os from "node:os";
|
|
13
13
|
import { parseArgs } from "node:util";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { a as ResourceManager } from "./manager-Ct0dEOMg.js";
|
|
2
|
+
//#region src/blocks/datapack.d.ts
|
|
3
|
+
/** `tags.json`: registry (`block`, `item`, `worldgen/biome`, …) → tag id → its values, unexpanded. */
|
|
4
|
+
type TagPack = Record<string, Record<string, string[]>>;
|
|
5
|
+
/** `advancements.json`: advancement id → the names of its criteria. Recipe unlocks are left out. */
|
|
6
|
+
type AdvancementPack = Record<string, string[]>;
|
|
7
|
+
interface DatapackResult {
|
|
8
|
+
tags: TagPack;
|
|
9
|
+
advancements: AdvancementPack;
|
|
10
|
+
/** Files that were listed but would not parse, by `namespace:path`. */
|
|
11
|
+
unreadable: string[];
|
|
12
|
+
}
|
|
13
|
+
declare function collectDatapack(resources: ResourceManager, namespaces: readonly string[]): Promise<DatapackResult>;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { collectDatapack as i, DatapackResult as n, TagPack as r, AdvancementPack as t };
|