@nodecraft/rendermite 1.3.1 → 1.3.2

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.
@@ -1,2 +1,2 @@
1
- import { t as runBlocksCli } from "../cli-BaoVzDGo.js";
1
+ import { t as runBlocksCli } from "../cli-Dq4CFSPi.js";
2
2
  export { runBlocksCli };
@@ -1,2 +1,2 @@
1
- import { t as exportBlockPack } from "../export-BNvYiw6i.js";
1
+ import { t as exportBlockPack } from "../export-B9lH7Tek.js";
2
2
  export { exportBlockPack };
@@ -1,6 +1,6 @@
1
1
  import { n as builtinPackPath } from "./builtin-WkWjATeh.js";
2
2
  import { n as LayeredResourceManager, t as FolderResourceManager } from "./manager-CYbAkWuT.js";
3
- import { t as exportBlockPack } from "./export-BNvYiw6i.js";
3
+ import { t as exportBlockPack } from "./export-B9lH7Tek.js";
4
4
  import { n as prepareModResources } from "./prepare-B8oPdGYz.js";
5
5
  import { t as downloadClientJar } from "./download-1wAfrGKx.js";
6
6
  import { a as prepareVersionResources, r as compareVersions } from "./prepare-C95vjt_o.js";
package/dist/cli.js CHANGED
@@ -6,7 +6,7 @@ import { n as harvestTintOverrides, t as curatedTintOverrides } from "./tints-nx
6
6
  import { t as JarResourceManager } from "./jar-5aLDI0nT.js";
7
7
  import { t as downloadClientJar } from "./download-1wAfrGKx.js";
8
8
  import { a as prepareVersionResources, i as eraForVersion, n as GEOMETRY_DONOR_VERSIONS } from "./prepare-C95vjt_o.js";
9
- import { t as runBlocksCli } from "./cli-BaoVzDGo.js";
9
+ import { t as runBlocksCli } from "./cli-Dq4CFSPi.js";
10
10
  import { t as run } from "./run-Diql5y56.js";
11
11
  import path from "node:path";
12
12
  import os from "node:os";
@@ -558,10 +558,24 @@ async function exportBlockPack(options) {
558
558
  return model === void 0 || model.elements.length === 0 && !model.mesh?.length;
559
559
  });
560
560
  if (empty.length === 0) continue;
561
+ const definition = definitions.get(id);
562
+ if (definition?.kind === "multipart") {
563
+ const drawable = definition.cases.filter((part) => part.apply.some((variant) => !empty.includes(variant.model)));
564
+ if (drawable.length > 0) {
565
+ definition.cases = drawable;
566
+ blockModels.set(id, references.filter((reference) => !empty.includes(reference)));
567
+ failures.push({
568
+ id,
569
+ kind: "geometry",
570
+ reason: `the game draws ${empty.join(", ")} in code; the pack drops those parts and keeps the ${drawable.length} that do draw, since a multipart part laid over them would draw as well as them rather than instead`
571
+ });
572
+ continue;
573
+ }
574
+ }
561
575
  const substitute = await itemModelSubstitute(id, resources, models);
562
576
  if (substitute === null) continue;
563
577
  const stood = adoptSubstitute(substitute);
564
- for (const part of definitions.get(id)?.cases ?? []) for (const variant of part.apply) if (empty.includes(variant.model)) variant.model = stood;
578
+ for (const part of definition?.cases ?? []) for (const variant of part.apply) if (empty.includes(variant.model)) variant.model = stood;
565
579
  blockModels.set(id, [...references.filter((reference) => !empty.includes(reference)), stood]);
566
580
  const drawnInCode = empty.length === references.length ? "this block" : empty.join(", ");
567
581
  failures.push({
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ import { t as buildBlockTints } from "./tints-a9FWZLma.js";
10
10
  import { o as createAtlasResolver, s as parseAtlasSources, t as AtlasSourceError } from "./sources-BlUriDCs.js";
11
11
  import { n as LayeredResourceManager, r as ResourceKind, t as FolderResourceManager } from "./manager-CYbAkWuT.js";
12
12
  import { n as TextureLoader, r as TextureResolutionError, t as AnimatedTexture } from "./loader-C18GpurU.js";
13
- import { t as exportBlockPack } from "./export-BNvYiw6i.js";
13
+ import { t as exportBlockPack } from "./export-B9lH7Tek.js";
14
14
  import { a as defaultProperties, i as UNKNOWN_MODEL, n as InvalidItemDefinitionError, o as evaluateItemModel } from "./definition-ColsvWrH.js";
15
15
  import { n as UnsafeJarError, r as isUnsafeEntryPath, t as JarResourceManager } from "./jar-5aLDI0nT.js";
16
16
  import { n as prepareModResources } from "./prepare-B8oPdGYz.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nodecraft/rendermite",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
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",