@nodecraft/rendermite 1.7.4 → 1.8.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.
Files changed (72) hide show
  1. package/dist/blocks/cli.js +1 -1
  2. package/dist/blocks/ender-storage.d.ts +1 -1
  3. package/dist/blocks/entities.d.ts +1 -1
  4. package/dist/blocks/entity-models.d.ts +3 -3
  5. package/dist/blocks/entity-models.js +1 -1
  6. package/dist/blocks/export.d.ts +1 -1
  7. package/dist/blocks/export.js +1 -1
  8. package/dist/blocks/geo-blocks.d.ts +1 -1
  9. package/dist/blocks/item-sprites.d.ts +1 -1
  10. package/dist/blocks/light-bytecode.d.ts +174 -0
  11. package/dist/blocks/light-bytecode.js +2 -0
  12. package/dist/blocks/light-eval.d.ts +2 -0
  13. package/dist/blocks/light-eval.js +2 -0
  14. package/dist/blocks/light.d.ts +38 -0
  15. package/dist/blocks/light.js +2 -0
  16. package/dist/blocks/pack-format.d.ts +2 -2
  17. package/dist/blocks/sprite-sheet.d.ts +1 -1
  18. package/dist/{classfile-Bo7FUrrD.js → classfile-CiIDF3vc.js} +23 -1
  19. package/dist/{classfile-BdLIk4Pe.d.ts → classfile-CsLXlh5z.d.ts} +23 -0
  20. package/dist/{cli-DBNuCnry.js → cli-Dw1Q5CPR.js} +5 -4
  21. package/dist/cli.js +5 -5
  22. package/dist/{descriptor-JyXhfd-c.js → descriptor-CmkIkDKL.js} +2 -2
  23. package/dist/entities/classfile.d.ts +1 -1
  24. package/dist/entities/classfile.js +1 -1
  25. package/dist/entities/inherit.d.ts +2 -2
  26. package/dist/entities/inherit.js +1 -1
  27. package/dist/entities/jar-classes.js +1 -1
  28. package/dist/entities/link.d.ts +2 -2
  29. package/dist/entities/link.js +1 -1
  30. package/dist/entities/mappings.d.ts +2 -2
  31. package/dist/entities/mappings.js +2 -2
  32. package/dist/entities/model-bytecode.d.ts +7 -2
  33. package/dist/entities/model-bytecode.js +2 -2
  34. package/dist/entities/model-code.d.ts +1 -1
  35. package/dist/entities/model-code.js +1 -1
  36. package/dist/{entity-models-DUKiHpn1.js → entity-models-BGiy3pey.js} +5 -5
  37. package/dist/{export-B8tPsf4K.d.ts → export-J13L9Lqu.d.ts} +3 -1
  38. package/dist/{export-Ds1EelMa.js → export-t8X_oRws.js} +22 -2
  39. package/dist/index.d.ts +1 -1
  40. package/dist/index.js +6 -6
  41. package/dist/{inherit-BYLi3Q28.js → inherit-BUn0Cve9.js} +2 -2
  42. package/dist/{jar-W2cV2ZVO.js → jar-CBYPMbw7.js} +1 -1
  43. package/dist/{jar-classes-3GVCJZT7.js → jar-classes-CSm7qq1R.js} +2 -2
  44. package/dist/light-CyRhYulM.js +582 -0
  45. package/dist/light-bytecode-Cpyuxo9b.js +1749 -0
  46. package/dist/light-eval-BsJJoSv4.js +23 -0
  47. package/dist/light-eval-D9x0ufZx.d.ts +13 -0
  48. package/dist/{link-5GmBLTzk.js → link-Cuhyrz07.js} +1 -1
  49. package/dist/{mappings-BEPVaiwE.js → mappings-Ep6ko0rg.js} +77 -9
  50. package/dist/{mappings-DxX4KoZl.d.ts → mappings-USwcjtcH.d.ts} +28 -2
  51. package/dist/{model-bytecode-B43uSqet.js → model-bytecode-VaLUQfGO.js} +2 -2
  52. package/dist/{model-code-BY44ao27.d.ts → model-code-Csc3bs3h.d.ts} +1 -1
  53. package/dist/{model-code-1Vuk-zj_.js → model-code-DbN2uVhp.js} +1 -1
  54. package/dist/mods/prepare.js +1 -1
  55. package/dist/mods/tints.js +1 -1
  56. package/dist/{pack-format-Baoc_aSZ.d.ts → pack-format-BqWf-DNc.d.ts} +23 -1
  57. package/dist/pack.d.ts +3 -2
  58. package/dist/pack.js +2 -1
  59. package/dist/{prepare-D49Gu4Lv.js → prepare-C61BcwFA.js} +2 -2
  60. package/dist/{prepare-Myd_ec4v.js → prepare-DxPEu9mo.js} +2 -2
  61. package/dist/render/pipeline.js +1 -1
  62. package/dist/resources/descriptor.js +1 -1
  63. package/dist/resources/jar.js +1 -1
  64. package/dist/resources/zip-reader.js +1 -1
  65. package/dist/{run-Ctt_1iTd.js → run-DYcem_Vv.js} +2 -2
  66. package/dist/run.js +1 -1
  67. package/dist/versions/prepare.js +1 -1
  68. package/dist/workers/render-worker.js +2 -2
  69. package/package.json +6 -6
  70. package/dist/{pipeline-BTlk9-s5.js → pipeline-CRTQGba7.js} +1 -1
  71. package/dist/{tints-BspVCz2G.js → tints-CWQz6UkM.js} +1 -1
  72. package/dist/{zip-reader-BSbJKUT1.js → zip-reader-zx3kdSq4.js} +1 -1
@@ -0,0 +1,23 @@
1
+ //#region src/blocks/light-eval.ts
2
+ /**
3
+ * The light a block emits in the given state, 0–15.
4
+ *
5
+ * A case applies when every property it names has that value on the state; the first that does wins,
6
+ * and `default` answers for the rest. A block absent from `light.json` emits nothing, so `undefined`
7
+ * is a valid entry and answers 0.
8
+ */
9
+ function blockLightLevel(light, properties) {
10
+ if (light === void 0) return 0;
11
+ if (typeof light === "number") return light;
12
+ for (const entry of light.cases) {
13
+ let matches = true;
14
+ for (const [name, value] of Object.entries(entry.when)) if (properties?.[name] !== value) {
15
+ matches = false;
16
+ break;
17
+ }
18
+ if (matches) return entry.level;
19
+ }
20
+ return light.default;
21
+ }
22
+ //#endregion
23
+ export { blockLightLevel as t };
@@ -0,0 +1,13 @@
1
+ import { n as BlockProperties } from "./blockstate-eval-BzznRcVY.js";
2
+ import { d as BlockPackLight } from "./pack-format-BqWf-DNc.js";
3
+ //#region src/blocks/light-eval.d.ts
4
+ /**
5
+ * The light a block emits in the given state, 0–15.
6
+ *
7
+ * A case applies when every property it names has that value on the state; the first that does wins,
8
+ * and `default` answers for the rest. A block absent from `light.json` emits nothing, so `undefined`
9
+ * is a valid entry and answers 0.
10
+ */
11
+ declare function blockLightLevel(light: BlockPackLight | undefined, properties: BlockProperties | undefined): number;
12
+ //#endregion
13
+ export { blockLightLevel as t };
@@ -1,4 +1,4 @@
1
- import { t as parseClassFile } from "./classfile-Bo7FUrrD.js";
1
+ import { t as parseClassFile } from "./classfile-CiIDF3vc.js";
2
2
  //#region src/entities/link.ts
3
3
  /**
4
4
  * Which class holds a given entity's geometry.
@@ -27,6 +27,38 @@ import { existsSync } from "node:fs";
27
27
  * than worked around.
28
28
  */
29
29
  const VERSION_MANIFEST = "https://launchermeta.mojang.com/mc/game/version_manifest_v2.json";
30
+ const PRIMITIVE_DESCRIPTORS = {
31
+ void: "V",
32
+ boolean: "Z",
33
+ byte: "B",
34
+ char: "C",
35
+ short: "S",
36
+ int: "I",
37
+ long: "J",
38
+ float: "F",
39
+ double: "D"
40
+ };
41
+ /** A ProGuard type (`java.util.function.ToIntFunction`, `int[]`) as a JVM descriptor, class names untouched. */
42
+ function typeDescriptor(type) {
43
+ let dimensions = 0;
44
+ let base = type;
45
+ while (base.endsWith("[]")) {
46
+ base = base.slice(0, -2);
47
+ dimensions++;
48
+ }
49
+ const scalar = PRIMITIVE_DESCRIPTORS[base] ?? `L${base.replaceAll(".", "/")};`;
50
+ return `${"[".repeat(dimensions)}${scalar}`;
51
+ }
52
+ /**
53
+ * A descriptor with every class in it renamed through the map: `(Lnet/minecraft/…/Block;)V` on an
54
+ * obfuscated jar is `(Ldfy;)V`. Unmapped classes — `java/lang/String`, a mod's own — stay as they are.
55
+ */
56
+ function remapDescriptor(descriptor, obfuscatedOf) {
57
+ return descriptor.replaceAll(/L([^;]+);/g, (whole, name) => {
58
+ const mapped = obfuscatedOf.get(name.replaceAll("/", "."));
59
+ return mapped ? `L${mapped.replaceAll(".", "/")};` : whole;
60
+ });
61
+ }
30
62
  var MappingsUnavailableError = class extends Error {
31
63
  constructor(message, options) {
32
64
  super(message, options);
@@ -58,23 +90,57 @@ async function downloadClientMappings(version, cacheDir) {
58
90
  await rename(partial, target);
59
91
  return target;
60
92
  }
61
- /** Parses the class lines of a ProGuard mapping file. */
93
+ /**
94
+ * Parses a ProGuard mapping file: the class lines, and the member lines under each.
95
+ *
96
+ * Members were skipped for years because the geometry extractor works on descriptor shape rather
97
+ * than member names. Block light needs them: it follows a mod's `Blocks.TORCH` into the client jar,
98
+ * and that is a field rename the class map alone cannot make.
99
+ *
100
+ * A method line is `[start:end:]returnType name(paramTypes) -> obf`; the line numbers are dropped
101
+ * and the types become a JVM descriptor in the *original* names, which is how a mod's constant pool
102
+ * spells the reference and so is the key a lookup arrives with.
103
+ */
62
104
  function parseMappings(text) {
63
105
  const obfuscatedOf = /* @__PURE__ */ new Map();
64
106
  const originalOf = /* @__PURE__ */ new Map();
107
+ const fieldOf = /* @__PURE__ */ new Map();
108
+ const methodOf = /* @__PURE__ */ new Map();
109
+ let owner = "";
65
110
  for (const line of text.split("\n")) {
66
- if (line.length === 0 || line.startsWith(" ") || line.startsWith(" ") || line.startsWith("#")) continue;
111
+ if (line.length === 0 || line.startsWith("#")) continue;
67
112
  const divider = line.indexOf(" -> ");
68
113
  if (divider === -1) continue;
69
- const original = line.slice(0, divider).trim();
70
114
  const obfuscated = line.slice(divider + 4).trim().replace(/:$/, "");
71
- if (original.length === 0 || obfuscated.length === 0) continue;
72
- obfuscatedOf.set(original, obfuscated);
73
- originalOf.set(obfuscated, original);
115
+ if (obfuscated.length === 0) continue;
116
+ if (!line.startsWith(" ") && !line.startsWith(" ")) {
117
+ owner = line.slice(0, divider).trim();
118
+ if (owner.length > 0) {
119
+ obfuscatedOf.set(owner, obfuscated);
120
+ originalOf.set(obfuscated, owner);
121
+ }
122
+ continue;
123
+ }
124
+ const member = line.slice(0, divider).trim().replace(/^\d+:\d+:/, "");
125
+ const space = member.indexOf(" ");
126
+ if (space === -1 || owner.length === 0) continue;
127
+ const returnType = member.slice(0, space);
128
+ const signature = member.slice(space + 1);
129
+ const open = signature.indexOf("(");
130
+ if (open === -1) {
131
+ fieldOf.set(`${owner}.${signature}`, obfuscated);
132
+ continue;
133
+ }
134
+ const name = signature.slice(0, open);
135
+ const params = signature.slice(open + 1, -1);
136
+ const descriptor = `(${params.length === 0 ? "" : params.split(",").map((param) => typeDescriptor(param.trim())).join("")})${typeDescriptor(returnType)}`;
137
+ methodOf.set(`${owner}.${name}${descriptor}`, obfuscated);
74
138
  }
75
139
  return {
76
140
  obfuscatedOf,
77
- originalOf
141
+ originalOf,
142
+ fieldOf,
143
+ methodOf
78
144
  };
79
145
  }
80
146
  async function loadMappings(version, cacheDir) {
@@ -96,7 +162,9 @@ function identityMappings(internalNames) {
96
162
  }
97
163
  return {
98
164
  obfuscatedOf,
99
- originalOf
165
+ originalOf,
166
+ fieldOf: /* @__PURE__ */ new Map(),
167
+ methodOf: /* @__PURE__ */ new Map()
100
168
  };
101
169
  }
102
170
  /**
@@ -136,4 +204,4 @@ async function resolveMappings(version, cacheDir, listClasses) {
136
204
  }
137
205
  }
138
206
  //#endregion
139
- export { loadMappings as a, isObfuscated as i, downloadClientMappings as n, parseMappings as o, identityMappings as r, resolveMappings as s, MappingsUnavailableError as t };
207
+ export { loadMappings as a, resolveMappings as c, isObfuscated as i, downloadClientMappings as n, parseMappings as o, identityMappings as r, remapDescriptor as s, MappingsUnavailableError as t };
@@ -29,7 +29,23 @@ interface Mappings {
29
29
  obfuscatedOf: Map<string, string>;
30
30
  /** `fvd` → `net.minecraft.client.model.CowModel`. */
31
31
  originalOf: Map<string, string>;
32
+ /**
33
+ * Members, for code that names the game's classes by their *original* names against a jar that
34
+ * does not: a mod compiled against Mojang mappings calls `BlockBehaviour$Properties.ofFullCopy` and
35
+ * reads `Blocks.TORCH`, and following either into an obfuscated client means renaming both.
36
+ *
37
+ * Fields by `owner.name`, methods by `owner.name(descriptor)` — original names throughout, the
38
+ * descriptor in JVM form with original class names. Empty for an identity mapping, where nothing
39
+ * needs renaming.
40
+ */
41
+ fieldOf: Map<string, string>;
42
+ methodOf: Map<string, string>;
32
43
  }
44
+ /**
45
+ * A descriptor with every class in it renamed through the map: `(Lnet/minecraft/…/Block;)V` on an
46
+ * obfuscated jar is `(Ldfy;)V`. Unmapped classes — `java/lang/String`, a mod's own — stay as they are.
47
+ */
48
+ declare function remapDescriptor(descriptor: string, obfuscatedOf: Map<string, string>): string;
33
49
  declare class MappingsUnavailableError extends Error {
34
50
  constructor(message: string, options?: ErrorOptions);
35
51
  }
@@ -40,7 +56,17 @@ declare class MappingsUnavailableError extends Error {
40
56
  * and the difference between "this version publishes none" and "the network failed" is worth keeping.
41
57
  */
42
58
  declare function downloadClientMappings(version: string, cacheDir: string): Promise<string>;
43
- /** Parses the class lines of a ProGuard mapping file. */
59
+ /**
60
+ * Parses a ProGuard mapping file: the class lines, and the member lines under each.
61
+ *
62
+ * Members were skipped for years because the geometry extractor works on descriptor shape rather
63
+ * than member names. Block light needs them: it follows a mod's `Blocks.TORCH` into the client jar,
64
+ * and that is a field rename the class map alone cannot make.
65
+ *
66
+ * A method line is `[start:end:]returnType name(paramTypes) -> obf`; the line numbers are dropped
67
+ * and the types become a JVM descriptor in the *original* names, which is how a mod's constant pool
68
+ * spells the reference and so is the key a lookup arrives with.
69
+ */
44
70
  declare function parseMappings(text: string): Mappings;
45
71
  declare function loadMappings(version: string, cacheDir: string): Promise<Mappings>;
46
72
  /**
@@ -72,4 +98,4 @@ declare function resolveMappings(version: string, cacheDir: string, listClasses:
72
98
  obfuscated: boolean;
73
99
  }>;
74
100
  //#endregion
75
- export { isObfuscated as a, resolveMappings as c, identityMappings as i, MappingsUnavailableError as n, loadMappings as o, downloadClientMappings as r, parseMappings as s, Mappings as t };
101
+ export { isObfuscated as a, remapDescriptor as c, identityMappings as i, resolveMappings as l, MappingsUnavailableError as n, loadMappings as o, downloadClientMappings as r, parseMappings as s, Mappings as t };
@@ -1,4 +1,4 @@
1
- import { t as parseClassFile } from "./classfile-Bo7FUrrD.js";
1
+ import { t as parseClassFile } from "./classfile-CiIDF3vc.js";
2
2
  import { a as mergeModels, r as cubesOf, t as buildsOwnMesh } from "./merge-DeHruviG.js";
3
3
  //#region src/entities/model-bytecode.ts
4
4
  /**
@@ -870,4 +870,4 @@ function extractModel(bytes, following) {
870
870
  return model;
871
871
  }
872
872
  //#endregion
873
- export { extractModel as n, extractArmourMesh as t };
873
+ export { extractModel as n, parseDescriptor as r, extractArmourMesh as t };
@@ -1,4 +1,4 @@
1
- import { t as ClassFile } from "./classfile-BdLIk4Pe.js";
1
+ import { t as ClassFile } from "./classfile-CsLXlh5z.js";
2
2
  //#region src/entities/model-code.d.ts
3
3
  interface ModelCode {
4
4
  /** The parsed class, when it is model code a call may be followed into. */
@@ -1,4 +1,4 @@
1
- import { t as parseClassFile } from "./classfile-Bo7FUrrD.js";
1
+ import { t as parseClassFile } from "./classfile-CiIDF3vc.js";
2
2
  //#region src/entities/model-code.ts
3
3
  /**
4
4
  * Which classes in a jar count as model code, and their parsed form.
@@ -1,2 +1,2 @@
1
- import { n as prepareModResources, t as LOADER_NAMESPACES } from "../prepare-Myd_ec4v.js";
1
+ import { n as prepareModResources, t as LOADER_NAMESPACES } from "../prepare-DxPEu9mo.js";
2
2
  export { LOADER_NAMESPACES, prepareModResources };
@@ -1,2 +1,2 @@
1
- import { n as harvestTintOverrides, t as curatedTintOverrides } from "../tints-BspVCz2G.js";
1
+ import { n as harvestTintOverrides, t as curatedTintOverrides } from "../tints-CWQz6UkM.js";
2
2
  export { curatedTintOverrides, harvestTintOverrides };
@@ -113,6 +113,26 @@ type BlockPackBlockState = {
113
113
  };
114
114
  /** `tints.json`. */
115
115
  type BlockPackTintsFile = BlockTintPack;
116
+ /**
117
+ * How much light a block emits, 0–15.
118
+ *
119
+ * A number when every state of the block emits the same. Otherwise the commonest level is `default`
120
+ * and each other level is a case naming only the properties that decide it: a redstone lamp is
121
+ * `{ default: 0, cases: [{ when: { lit: 'true' }, level: 15 }] }`. The first case whose every
122
+ * property matches the state applies; `blockLightLevel` in `light-eval.ts` does that lookup.
123
+ */
124
+ type BlockPackLight = number | {
125
+ default: number;
126
+ cases: Array<{
127
+ when: Record<string, string>;
128
+ level: number;
129
+ }>;
130
+ };
131
+ /**
132
+ * `light.json`, by block id, holding only the blocks that emit: absent means 0. Present only when the
133
+ * pack has emitters and the export could read the code for them — an `--assets` run has none.
134
+ */
135
+ type BlockPackLightFile = Record<string, BlockPackLight>;
116
136
  /**
117
137
  * `biomes.json`, present only when the pack has biomes to describe: vanilla's
118
138
  * whole table, or the ones a mod's datapack declares. Absent is not empty — a
@@ -319,10 +339,12 @@ interface BlockPackMetaFile {
319
339
  entities: number;
320
340
  /** Distinct entity models in `entity-models.json`; `0` means the file is absent. */
321
341
  entityModels: number;
342
+ /** Emitting blocks in `light.json`; `0` means the file is absent. */
343
+ light: number;
322
344
  failures: number;
323
345
  };
324
346
  /** sha256 per file, enough to verify a cached copy without refetching it. */
325
347
  hashes: Record<string, string>;
326
348
  }
327
349
  //#endregion
328
- export { EntityPackModel as C, ItemPackEntry as D, EquipmentSlot as E, ItemPackLayer as O, EntityPackEntry as S, EquipmentPack as T, BlockPackTintsFile as _, BlockPackBlockStatesFile as a, EntityPackCube as b, BlockPackEntityModelsFile as c, BlockPackMetaFile as d, BlockPackModel as f, BlockPackSpriteFrame as g, BlockPackSprite as h, BlockPackBlockState as i, BlockPackFace as l, BlockPackRenderLayer as m, BlockPackAtlasPage as n, BlockPackElement as o, BlockPackModelsFile as p, BlockPackBiomesFile as r, BlockPackEntitiesFile as s, BlockPackAtlasFile as t, BlockPackItemsFile as u, BlockPackVariant as v, EntityPackPart as w, EntityPackCubeFace as x, EQUIPMENT_SLOTS as y };
350
+ export { ItemPackLayer as A, EntityPackCubeFace as C, EquipmentPack as D, EntityPackPart as E, EquipmentSlot as O, EntityPackCube as S, EntityPackModel as T, BlockPackSprite as _, BlockPackBlockStatesFile as a, BlockPackVariant as b, BlockPackEntityModelsFile as c, BlockPackLight as d, BlockPackLightFile as f, BlockPackRenderLayer as g, BlockPackModelsFile as h, BlockPackBlockState as i, ItemPackEntry as k, BlockPackFace as l, BlockPackModel as m, BlockPackAtlasPage as n, BlockPackElement as o, BlockPackMetaFile as p, BlockPackBiomesFile as r, BlockPackEntitiesFile as s, BlockPackAtlasFile as t, BlockPackItemsFile as u, BlockPackSpriteFrame as v, EntityPackEntry as w, EQUIPMENT_SLOTS as x, BlockPackTintsFile as y };
package/dist/pack.d.ts CHANGED
@@ -2,5 +2,6 @@ import { n as BiomeClimatePack, t as BiomeClimate } from "./biomes-CJDJQqJb.js";
2
2
  import { a as BlockStateMultipartCase, d as matchesCondition, n as BlockProperties, o as BlockStateVariantCase, p as weightedVariantIndex, r as BlockStateDefinition, s as MultipartCondition, t as BlockModelVariant, u as evaluateBlockState } from "./blockstate-eval-BzznRcVY.js";
3
3
  import { n as ObjMesh, t as MeshGroup } from "./obj-mesh-ydhVfLKs.js";
4
4
  import { n as BlockTintPack, t as BlockTint } from "./tints-CQX8a1F0.js";
5
- import { _ as BlockPackTintsFile, a as BlockPackBlockStatesFile, d as BlockPackMetaFile, f as BlockPackModel, g as BlockPackSpriteFrame, h as BlockPackSprite, i as BlockPackBlockState, l as BlockPackFace, m as BlockPackRenderLayer, n as BlockPackAtlasPage, o as BlockPackElement, p as BlockPackModelsFile, r as BlockPackBiomesFile, t as BlockPackAtlasFile, v as BlockPackVariant } from "./pack-format-Baoc_aSZ.js";
6
- export { type BiomeClimate, type BiomeClimatePack, type BlockModelVariant, type BlockPackAtlasFile, type BlockPackAtlasPage, type BlockPackBiomesFile, type BlockPackBlockState, type BlockPackBlockStatesFile, type BlockPackElement, type BlockPackFace, type BlockPackMetaFile, type BlockPackModel, type BlockPackModelsFile, type BlockPackRenderLayer, type BlockPackSprite, type BlockPackSpriteFrame, type BlockPackTintsFile, type BlockPackVariant, type BlockProperties, type BlockStateDefinition, type BlockStateMultipartCase, type BlockStateVariantCase, type BlockTint, type BlockTintPack, type MeshGroup, type MultipartCondition, type ObjMesh, evaluateBlockState, matchesCondition, weightedVariantIndex };
5
+ import { _ as BlockPackSprite, a as BlockPackBlockStatesFile, b as BlockPackVariant, d as BlockPackLight, f as BlockPackLightFile, g as BlockPackRenderLayer, h as BlockPackModelsFile, i as BlockPackBlockState, l as BlockPackFace, m as BlockPackModel, n as BlockPackAtlasPage, o as BlockPackElement, p as BlockPackMetaFile, r as BlockPackBiomesFile, t as BlockPackAtlasFile, v as BlockPackSpriteFrame, y as BlockPackTintsFile } from "./pack-format-BqWf-DNc.js";
6
+ import { t as blockLightLevel } from "./light-eval-D9x0ufZx.js";
7
+ export { type BiomeClimate, type BiomeClimatePack, type BlockModelVariant, type BlockPackAtlasFile, type BlockPackAtlasPage, type BlockPackBiomesFile, type BlockPackBlockState, type BlockPackBlockStatesFile, type BlockPackElement, type BlockPackFace, type BlockPackLight, type BlockPackLightFile, type BlockPackMetaFile, type BlockPackModel, type BlockPackModelsFile, type BlockPackRenderLayer, type BlockPackSprite, type BlockPackSpriteFrame, type BlockPackTintsFile, type BlockPackVariant, type BlockProperties, type BlockStateDefinition, type BlockStateMultipartCase, type BlockStateVariantCase, type BlockTint, type BlockTintPack, type MeshGroup, type MultipartCondition, type ObjMesh, blockLightLevel, evaluateBlockState, matchesCondition, weightedVariantIndex };
package/dist/pack.js CHANGED
@@ -1,2 +1,3 @@
1
1
  import { i as matchesCondition, o as weightedVariantIndex, r as evaluateBlockState } from "./blockstate-eval-CV_LwUwj.js";
2
- export { evaluateBlockState, matchesCondition, weightedVariantIndex };
2
+ import { t as blockLightLevel } from "./light-eval-BsJJoSv4.js";
3
+ export { blockLightLevel, evaluateBlockState, matchesCondition, weightedVariantIndex };
@@ -1,8 +1,8 @@
1
1
  import { n as ResourceLocator } from "./locator-COMEtEn9.js";
2
- import { n as LayeredResourceManager, t as FolderResourceManager } from "./manager-BNibYkmI.js";
3
- import { t as JarResourceManager } from "./jar-W2cV2ZVO.js";
4
2
  import { n as MapResourceManager, t as KindFilteredResourceManager } from "./synthetic-rc9BPT4P.js";
5
3
  import { t as reshapeLegacyAssets } from "./legacy-reshape-CcdstKyI.js";
4
+ import { n as LayeredResourceManager, t as FolderResourceManager } from "./manager-BNibYkmI.js";
5
+ import { t as JarResourceManager } from "./jar-CBYPMbw7.js";
6
6
  //#region src/versions/prepare.ts
7
7
  /**
8
8
  * Version-era detection and asset preparation, replacing the file-tree surgery
@@ -1,8 +1,8 @@
1
1
  import { n as LayeredResourceManager } from "./manager-BNibYkmI.js";
2
- import { n as UnsafeJarError, t as JarResourceManager } from "./jar-W2cV2ZVO.js";
2
+ import { n as UnsafeJarError, t as JarResourceManager } from "./jar-CBYPMbw7.js";
3
3
  import { t as curatedModelOverrides } from "./models-CZjCOjs4.js";
4
4
  import { t as synthesizeItemModels } from "./synthesize-jTjVjPAt.js";
5
- import { n as harvestTintOverrides, t as curatedTintOverrides } from "./tints-BspVCz2G.js";
5
+ import { n as harvestTintOverrides, t as curatedTintOverrides } from "./tints-CWQz6UkM.js";
6
6
  //#region src/mods/prepare.ts
7
7
  /**
8
8
  * Mod asset composition: mod jars layered under the vanilla base (vanilla wins
@@ -1,2 +1,2 @@
1
- import { t as ItemPipeline } from "../pipeline-BTlk9-s5.js";
1
+ import { t as ItemPipeline } from "../pipeline-CRTQGba7.js";
2
2
  export { ItemPipeline };
@@ -1,2 +1,2 @@
1
- import { n as restoreResources, t as describeResources } from "../descriptor-JyXhfd-c.js";
1
+ import { n as restoreResources, t as describeResources } from "../descriptor-CmkIkDKL.js";
2
2
  export { describeResources, restoreResources };
@@ -1,2 +1,2 @@
1
- import { n as UnsafeJarError, r as isUnsafeEntryPath, t as JarResourceManager } from "../jar-W2cV2ZVO.js";
1
+ import { n as UnsafeJarError, r as isUnsafeEntryPath, t as JarResourceManager } from "../jar-CBYPMbw7.js";
2
2
  export { JarResourceManager, UnsafeJarError, isUnsafeEntryPath };
@@ -1,2 +1,2 @@
1
- import { t as openZip } from "../zip-reader-BSbJKUT1.js";
1
+ import { t as openZip } from "../zip-reader-zx3kdSq4.js";
2
2
  export { openZip };
@@ -6,8 +6,8 @@ import { r as encodeRasterAsset } from "./encode-LR9wxigC.js";
6
6
  import { t as classifyItemStyle } from "./item-styles-BAeneY1R.js";
7
7
  import { t as minifyStylesheet } from "./minify-bjMRmr5J.js";
8
8
  import { t as generateStylesheet } from "./stylesheet-CovT3B2S.js";
9
- import { t as ItemPipeline } from "./pipeline-BTlk9-s5.js";
10
- import { t as describeResources } from "./descriptor-JyXhfd-c.js";
9
+ import { t as ItemPipeline } from "./pipeline-CRTQGba7.js";
10
+ import { t as describeResources } from "./descriptor-CmkIkDKL.js";
11
11
  import { t as WorkerRenderPool } from "./pool-CKGp1qup.js";
12
12
  import path from "node:path";
13
13
  import os from "node:os";
package/dist/run.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import { o as evaluateItemModel } from "./definition-ColsvWrH.js";
2
- import { t as run } from "./run-Ctt_1iTd.js";
2
+ import { t as run } from "./run-DYcem_Vv.js";
3
3
  export { evaluateItemModel, run };
@@ -1,2 +1,2 @@
1
- import { a as prepareVersionResources, i as eraForVersion, n as GEOMETRY_DONOR_VERSIONS, r as compareVersions, t as Era } from "../prepare-D49Gu4Lv.js";
1
+ import { a as prepareVersionResources, i as eraForVersion, n as GEOMETRY_DONOR_VERSIONS, r as compareVersions, t as Era } from "../prepare-C61BcwFA.js";
2
2
  export { Era, GEOMETRY_DONOR_VERSIONS, compareVersions, eraForVersion, prepareVersionResources };
@@ -1,5 +1,5 @@
1
- import { t as ItemPipeline } from "../pipeline-BTlk9-s5.js";
2
- import { n as restoreResources } from "../descriptor-JyXhfd-c.js";
1
+ import { t as ItemPipeline } from "../pipeline-CRTQGba7.js";
2
+ import { n as restoreResources } from "../descriptor-CmkIkDKL.js";
3
3
  import sharp from "sharp";
4
4
  import { parentPort, workerData } from "node:worker_threads";
5
5
  //#region src/workers/render-worker.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nodecraft/rendermite",
3
- "version": "1.7.4",
3
+ "version": "1.8.0",
4
4
  "description": "Minecraft item icon renderer: renders inventory-identical item icons from vanilla and modded assets across game versions, outputting optimized PNG/WebP/AVIF plus CSS and a JSON item library.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -58,7 +58,7 @@
58
58
  },
59
59
  "dependencies": {
60
60
  "lightningcss": "1.33.0",
61
- "sharp": "0.35.3",
61
+ "sharp": "0.35.4",
62
62
  "yauzl": "3.4.0"
63
63
  },
64
64
  "devDependencies": {
@@ -67,14 +67,14 @@
67
67
  "@types/node": "24.13.3",
68
68
  "@types/yauzl": "3.4.0",
69
69
  "@types/yazl": "3.3.1",
70
- "eslint": "10.8.0",
70
+ "eslint": "10.9.1",
71
71
  "rimraf": "6.1.3",
72
- "rolldown": "1.2.3",
72
+ "rolldown": "1.2.6",
73
73
  "semantic-release": "25.0.9",
74
74
  "tsdown": "0.22.14",
75
75
  "typescript": "6.0.3",
76
- "typescript-eslint": "8.66.0",
77
- "vitest": "4.1.10",
76
+ "typescript-eslint": "8.68.0",
77
+ "vitest": "4.1.11",
78
78
  "yazl": "3.3.1"
79
79
  }
80
80
  }
@@ -6,8 +6,8 @@ import { a as renderGeo, t as findGeoForItem } from "./geo-BoDxwvz5.js";
6
6
  import { a as defaultProperties } from "./definition-ColsvWrH.js";
7
7
  import { i as resolveItem } from "./discovery-CD0QqxSF.js";
8
8
  import { a as resolveTints } from "./tints-B3WQcPtx.js";
9
- import { t as loadAtlasResolver } from "./registry-DafxsAhG.js";
10
9
  import { n as LayeredResourceManager, t as FolderResourceManager } from "./manager-BNibYkmI.js";
10
+ import { t as loadAtlasResolver } from "./registry-DafxsAhG.js";
11
11
  import { n as TextureLoader } from "./loader-CsgtBuBo.js";
12
12
  import { t as encodeAnimatedIcon } from "./encode-LR9wxigC.js";
13
13
  import { a as builtinDynamicResources } from "./generators-D6giKoab.js";
@@ -1,8 +1,8 @@
1
1
  import { i as modTintPackPath } from "./builtin-WkWjATeh.js";
2
2
  import { n as ResourceLocator } from "./locator-COMEtEn9.js";
3
3
  import { a as defaultProperties, o as evaluateItemModel } from "./definition-ColsvWrH.js";
4
- import { t as FolderResourceManager } from "./manager-BNibYkmI.js";
5
4
  import { n as MapResourceManager } from "./synthetic-rc9BPT4P.js";
5
+ import { t as FolderResourceManager } from "./manager-BNibYkmI.js";
6
6
  //#region src/mods/tints.ts
7
7
  /**
8
8
  * Tints for mod items whose colors live in client code rather than asset JSON.
@@ -1,6 +1,6 @@
1
1
  import { close, createReadStream, fstat, open, read } from "node:fs";
2
- import { Readable } from "node:stream";
3
2
  import { RandomAccessReader, fromRandomAccessReader, open as open$1 } from "yauzl";
3
+ import { Readable } from "node:stream";
4
4
  //#region src/resources/zip-reader.ts
5
5
  /**
6
6
  * Opens a zip with its central directory held in memory.