@nodecraft/rendermite 1.8.0 → 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/{pack-format-BqWf-DNc.d.ts → block-behaviour-9Tj_GIUC.d.ts} +287 -5
- 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 +3 -3
- 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 -174
- package/dist/blocks/light-bytecode.js +1 -1
- package/dist/blocks/light-eval.d.ts +1 -1
- package/dist/blocks/light.d.ts +11 -1
- package/dist/blocks/light.js +1 -1
- 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/{cli-Dw1Q5CPR.js → cli-xBcMuKA3.js} +10 -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-CmkIkDKL.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/geo-model.d.ts +1 -1
- package/dist/entities/inherit.d.ts +1 -1
- package/dist/entities/jar-classes.js +1 -1
- package/dist/entities/link.d.ts +1 -1
- package/dist/entities/mappings.d.ts +1 -1
- package/dist/entities/mappings.js +1 -1
- package/dist/entities/model-bytecode.d.ts +1 -1
- package/dist/{entity-models-BGiy3pey.js → entity-models-BYAxrTsk.js} +1 -1
- package/dist/entity-sizes-CpO1gA7p.js +194 -0
- package/dist/{export-t8X_oRws.js → export-CbG2Rx3i.js} +54 -5
- package/dist/{export-J13L9Lqu.d.ts → export-HEoqcV-Y.d.ts} +17 -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/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-CBYPMbw7.js → jar-DvofBm71.js} +2 -2
- package/dist/{jar-classes-CSm7qq1R.js → jar-classes-0wqWbTax.js} +2 -2
- package/dist/{light-CyRhYulM.js → light-CC3VMsjl.js} +37 -5
- package/dist/{light-bytecode-Cpyuxo9b.js → light-bytecode-DYxb6pJk.js} +80 -30
- package/dist/{light-eval-D9x0ufZx.d.ts → light-eval-DMjK6xnb.d.ts} +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-Ep6ko0rg.js → mappings-DEl_7xxQ.js} +18 -1
- package/dist/{mappings-USwcjtcH.d.ts → mappings-DhOPQTgV.d.ts} +5 -0
- 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 -6
- package/dist/{pipeline-DFuQa8ZT.d.ts → pipeline-DuPF3sap.d.ts} +3 -3
- package/dist/{pipeline-CRTQGba7.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-C61BcwFA.js → prepare-DkJkZXuQ.js} +2 -2
- package/dist/{prepare-DxPEu9mo.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-DYcem_Vv.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-CWQz6UkM.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-zx3kdSq4.js → zip-reader-onwEVMea.js} +4 -4
- package/package.json +1 -1
- package/dist/biomes-5ZwYxMYe.js +0 -384
- package/dist/biomes-CJDJQqJb.d.ts +0 -38
package/dist/render/pipeline.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as ItemPipeline } from "../pipeline-
|
|
1
|
+
import { t as ItemPipeline } from "../pipeline-Q_185kY6.js";
|
|
2
2
|
export { ItemPipeline };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as clearFaceBuffer, c as drawTexturedTriangle, i as RowCursor, l as phpRound, n as FaceBuffer, o as compactFaceBuffer, r as RasterPoint, s as createFaceBuffer, t as DirtyRect } from "../rasterizer-
|
|
1
|
+
import { a as clearFaceBuffer, c as drawTexturedTriangle, i as RowCursor, l as phpRound, n as FaceBuffer, o as compactFaceBuffer, r as RasterPoint, s as createFaceBuffer, t as DirtyRect } from "../rasterizer-DjnurUgD.js";
|
|
2
2
|
export { DirtyRect, FaceBuffer, RasterPoint, RowCursor, clearFaceBuffer, compactFaceBuffer, createFaceBuffer, drawTexturedTriangle, phpRound };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as RenderedFrames, c as renderModel, i as RenderOptions, l as renderModelFrames, n as AnimationLimits, o as boxDownscale, r as ItemRenderError, s as pointResize, t as AnimationDiagnostics } from "../renderer-
|
|
1
|
+
import { a as RenderedFrames, c as renderModel, i as RenderOptions, l as renderModelFrames, n as AnimationLimits, o as boxDownscale, r as ItemRenderError, s as pointResize, t as AnimationDiagnostics } from "../renderer-QgROYvPv.js";
|
|
2
2
|
export { AnimationDiagnostics, AnimationLimits, ItemRenderError, RenderOptions, RenderedFrames, boxDownscale, pointResize, renderModel, renderModelFrames };
|
package/dist/render/tints.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as resolveTint, i as parseTintValue, n as InvalidTinterDefinitionError, o as resolveTints, r as TintContext, t as DYE_COLORS } from "../tints-
|
|
1
|
+
import { a as resolveTint, i as parseTintValue, n as InvalidTinterDefinitionError, o as resolveTints, r as TintContext, t as DYE_COLORS } from "../tints-B0a1K11c.js";
|
|
2
2
|
export { DYE_COLORS, InvalidTinterDefinitionError, TintContext, parseTintValue, resolveTint, resolveTints };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as ResourceManager } from "./manager-
|
|
2
|
-
import { i as TextureLoader } from "./loader-
|
|
3
|
-
import { r as ResolvedModel } from "./loader-
|
|
4
|
-
import { n as FloatTexture } from "./blend-
|
|
1
|
+
import { a as ResourceManager } from "./manager-Ct0dEOMg.js";
|
|
2
|
+
import { i as TextureLoader } from "./loader-C4gsX_wO.js";
|
|
3
|
+
import { r as ResolvedModel } from "./loader-BYyPIs9f.js";
|
|
4
|
+
import { n as FloatTexture } from "./blend-mJAeQB3C.js";
|
|
5
5
|
import { t as Mat4 } from "./vector-DRKRi4--.js";
|
|
6
6
|
import { a as LightingProfileName } from "./lighting-3FGRC3Af.js";
|
|
7
|
-
import { r as TintColor } from "./face-
|
|
7
|
+
import { r as TintColor } from "./face-uWXECGNr.js";
|
|
8
8
|
//#region src/render/renderer.d.ts
|
|
9
9
|
interface AnimationLimits {
|
|
10
10
|
/** Emitted frames per icon (default 128). */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as describeResources, l as restoreResources, o as DescribableResourceManager, s as ResourceDescriptor } from "../manager-
|
|
1
|
+
import { c as describeResources, l as restoreResources, o as DescribableResourceManager, s as ResourceDescriptor } from "../manager-Ct0dEOMg.js";
|
|
2
2
|
export { DescribableResourceManager, ResourceDescriptor, describeResources, restoreResources };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as restoreResources, t as describeResources } from "../descriptor-
|
|
1
|
+
import { n as restoreResources, t as describeResources } from "../descriptor-Dz2cR-BH.js";
|
|
2
2
|
export { describeResources, restoreResources };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as ResourceLocator } from "../locator-jDbdUeTd.js";
|
|
2
|
-
import { a as ResourceManager } from "../manager-
|
|
3
|
-
import { i as TextureLoader } from "../loader-
|
|
2
|
+
import { a as ResourceManager } from "../manager-Ct0dEOMg.js";
|
|
3
|
+
import { i as TextureLoader } from "../loader-C4gsX_wO.js";
|
|
4
4
|
//#region src/resources/entity-textures.d.ts
|
|
5
5
|
declare function tokens(name: string): string[];
|
|
6
6
|
/** Vanilla DyeColor diffuse colors, keyed by the dye name mods prefix with. */
|
package/dist/resources/jar.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as UnsafeJarError, r as isUnsafeEntryPath, t as JarResourceManager } from "../jar-
|
|
1
|
+
import { n as UnsafeJarError, r as isUnsafeEntryPath, t as JarResourceManager } from "../jar-4Jg7ufWK.js";
|
|
2
2
|
export { JarResourceManager, UnsafeJarError, isUnsafeEntryPath };
|
package/dist/resources/jar.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as UnsafeJarError, r as isUnsafeEntryPath, t as JarResourceManager } from "../jar-
|
|
1
|
+
import { n as UnsafeJarError, r as isUnsafeEntryPath, t as JarResourceManager } from "../jar-DvofBm71.js";
|
|
2
2
|
export { JarResourceManager, UnsafeJarError, isUnsafeEntryPath };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ResourceManager, i as ResourceKindName, n as LayeredResourceManager, r as ResourceKind, t as FolderResourceManager } from "../manager-
|
|
1
|
+
import { a as ResourceManager, i as ResourceKindName, n as LayeredResourceManager, r as ResourceKind, t as FolderResourceManager } from "../manager-Ct0dEOMg.js";
|
|
2
2
|
export { FolderResourceManager, LayeredResourceManager, ResourceKind, ResourceKindName, ResourceManager };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as LayeredResourceManager, r as ResourceKind, t as FolderResourceManager } from "../manager-
|
|
1
|
+
import { n as LayeredResourceManager, r as ResourceKind, t as FolderResourceManager } from "../manager-D6zXmFrO.js";
|
|
2
2
|
export { FolderResourceManager, LayeredResourceManager, ResourceKind };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as MapResourceManager, t as KindFilteredResourceManager } from "../synthetic-
|
|
1
|
+
import { n as MapResourceManager, t as KindFilteredResourceManager } from "../synthetic-CWtFtAkR.js";
|
|
2
2
|
export { KindFilteredResourceManager, MapResourceManager };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as openZip } from "../zip-reader-
|
|
1
|
+
import { t as openZip } from "../zip-reader-onwEVMea.js";
|
|
2
2
|
export { openZip };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { n as ResourceLocator } from "./locator-COMEtEn9.js";
|
|
2
|
+
import { n as LayeredResourceManager } from "./manager-D6zXmFrO.js";
|
|
2
3
|
import { n as discoverItems } from "./discovery-CD0QqxSF.js";
|
|
3
|
-
import {
|
|
4
|
-
import { t as curatedModelOverrides } from "./models-CZjCOjs4.js";
|
|
4
|
+
import { t as curatedModelOverrides } from "./models-BsYA-NZg.js";
|
|
5
5
|
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-
|
|
10
|
-
import { t as describeResources } from "./descriptor-
|
|
9
|
+
import { t as ItemPipeline } from "./pipeline-Q_185kY6.js";
|
|
10
|
+
import { t as describeResources } from "./descriptor-Dz2cR-BH.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";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as ResourceManager } from "./manager-
|
|
1
|
+
import { a as ResourceManager } from "./manager-Ct0dEOMg.js";
|
|
2
2
|
import { a as LightingProfileName } from "./lighting-3FGRC3Af.js";
|
|
3
|
-
import { n as AnimationLimits } from "./renderer-
|
|
3
|
+
import { n as AnimationLimits } from "./renderer-QgROYvPv.js";
|
|
4
4
|
//#region src/run.d.ts
|
|
5
5
|
interface RunOptions {
|
|
6
6
|
resources: ResourceManager;
|
package/dist/run.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { l as evaluateItemModel } from "./definition-ricL7Jqf.js";
|
|
2
|
-
import { i as run, n as RunOptions, r as RunResult, t as ItemFailure } from "./run-
|
|
2
|
+
import { i as run, n as RunOptions, r as RunResult, t as ItemFailure } from "./run-CxB1qabg.js";
|
|
3
3
|
export { ItemFailure, RunOptions, RunResult, evaluateItemModel, run };
|
package/dist/run.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as ResourceLocator } from "./locator-jDbdUeTd.js";
|
|
2
|
-
import { r as Texture } from "./loader-
|
|
2
|
+
import { r as Texture } from "./loader-C4gsX_wO.js";
|
|
3
3
|
//#region src/atlas/sources.d.ts
|
|
4
4
|
declare class AtlasSourceError extends Error {}
|
|
5
5
|
interface AtlasSource {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
//#region src/blocks/states.ts
|
|
4
|
+
/**
|
|
5
|
+
* Every block's full property set and default state, from Minecraft's own data generator.
|
|
6
|
+
*
|
|
7
|
+
* `blockstates.json` only names the properties that change a model, so it cannot say that stairs are
|
|
8
|
+
* `waterlogged`, or which value a freshly placed block takes. The generator's `blocks.json` report
|
|
9
|
+
* lists every property with its values in the game's order, and marks the default state. Nothing in
|
|
10
|
+
* the client jar says either, so the report is read when the caller has one (`--reports`); the
|
|
11
|
+
* generator needs a JDK, which this package deliberately does not.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Reads `blocks.json` out of a generator `reports` directory, or null when there is none there: a
|
|
15
|
+
* caller with no reports gets a pack without `states.json` rather than a failed export.
|
|
16
|
+
*/
|
|
17
|
+
async function readBlockStates(reportsDir) {
|
|
18
|
+
let report;
|
|
19
|
+
try {
|
|
20
|
+
report = JSON.parse(await readFile(path.join(reportsDir, "blocks.json"), "utf8"));
|
|
21
|
+
} catch (err) {
|
|
22
|
+
if (err.code === "ENOENT") return null;
|
|
23
|
+
throw err;
|
|
24
|
+
}
|
|
25
|
+
const pack = {};
|
|
26
|
+
for (const [id, block] of Object.entries(report)) {
|
|
27
|
+
if (!block.properties || Object.keys(block.properties).length === 0) {
|
|
28
|
+
pack[id] = {};
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
const defaultState = block.states?.find((state) => state.default) ?? block.states?.[0];
|
|
32
|
+
pack[id] = {
|
|
33
|
+
properties: block.properties,
|
|
34
|
+
default: defaultState?.properties ?? {}
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
return pack;
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { readBlockStates as t };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region src/blocks/states.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Every block's full property set and default state, from Minecraft's own data generator.
|
|
4
|
+
*
|
|
5
|
+
* `blockstates.json` only names the properties that change a model, so it cannot say that stairs are
|
|
6
|
+
* `waterlogged`, or which value a freshly placed block takes. The generator's `blocks.json` report
|
|
7
|
+
* lists every property with its values in the game's order, and marks the default state. Nothing in
|
|
8
|
+
* the client jar says either, so the report is read when the caller has one (`--reports`); the
|
|
9
|
+
* generator needs a JDK, which this package deliberately does not.
|
|
10
|
+
*/
|
|
11
|
+
/** One block's properties: each name with its values in the game's order, and the default state. */
|
|
12
|
+
interface BlockStateSpec {
|
|
13
|
+
/** Absent for a block with no properties, which is most of them. */
|
|
14
|
+
properties?: Record<string, string[]>;
|
|
15
|
+
default?: Record<string, string>;
|
|
16
|
+
}
|
|
17
|
+
/** `states.json`: block id → its properties and default state. */
|
|
18
|
+
type BlockStatesPack = Record<string, BlockStateSpec>;
|
|
19
|
+
/**
|
|
20
|
+
* Reads `blocks.json` out of a generator `reports` directory, or null when there is none there: a
|
|
21
|
+
* caller with no reports gets a pack without `states.json` rather than a failed export.
|
|
22
|
+
*/
|
|
23
|
+
declare function readBlockStates(reportsDir: string): Promise<BlockStatesPack | null>;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { BlockStatesPack as n, readBlockStates as r, BlockStateSpec as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as ResourceLocator } from "./locator-jDbdUeTd.js";
|
|
2
|
-
import { a as ResourceManager, i as ResourceKindName, s as ResourceDescriptor } from "./manager-
|
|
2
|
+
import { a as ResourceManager, i as ResourceKindName, s as ResourceDescriptor } from "./manager-Ct0dEOMg.js";
|
|
3
3
|
//#region src/resources/synthetic.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* In-memory resources, used for era shims (synthesized `models/item/generated.json`,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as TextureMeta, i as TextureLoader, n as AtlasResolverLike, o as TextureResolutionError, r as Texture, t as AnimatedTexture } from "../loader-
|
|
1
|
+
import { a as TextureMeta, i as TextureLoader, n as AtlasResolverLike, o as TextureResolutionError, r as Texture, t as AnimatedTexture } from "../loader-C4gsX_wO.js";
|
|
2
2
|
export { AnimatedTexture, AtlasResolverLike, Texture, TextureLoader, TextureMeta, TextureResolutionError };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as ResourceLocator } from "../locator-jDbdUeTd.js";
|
|
2
|
-
import { i as TextureLoader } from "../loader-
|
|
2
|
+
import { i as TextureLoader } from "../loader-C4gsX_wO.js";
|
|
3
3
|
//#region src/textures/overlay.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Compose `accent` over `base` and return the locator the result is registered
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as TextureLoader } from "./loader-
|
|
2
|
-
import { r as TintColor } from "./face-
|
|
1
|
+
import { i as TextureLoader } from "./loader-C4gsX_wO.js";
|
|
2
|
+
import { r as TintColor } from "./face-uWXECGNr.js";
|
|
3
3
|
import { o as TintDefinition } from "./definition-ricL7Jqf.js";
|
|
4
4
|
//#region src/render/tints.d.ts
|
|
5
5
|
declare class InvalidTinterDefinitionError extends Error {}
|
|
@@ -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
|
-
import { a as defaultProperties, o as evaluateItemModel } from "./definition-ColsvWrH.js";
|
|
4
3
|
import { n as MapResourceManager } from "./synthetic-rc9BPT4P.js";
|
|
5
|
-
import { t as FolderResourceManager } from "./manager-
|
|
4
|
+
import { t as FolderResourceManager } from "./manager-D6zXmFrO.js";
|
|
5
|
+
import { a as defaultProperties, o as evaluateItemModel } from "./definition-ColsvWrH.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,5 +1,5 @@
|
|
|
1
|
-
import { a as ResourceManager } from "./manager-
|
|
2
|
-
import { i as TextureLoader } from "./loader-
|
|
1
|
+
import { a as ResourceManager } from "./manager-Ct0dEOMg.js";
|
|
2
|
+
import { i as TextureLoader } from "./loader-C4gsX_wO.js";
|
|
3
3
|
//#region src/blocks/tints.d.ts
|
|
4
4
|
type BlockTint =
|
|
5
5
|
/** Sample the named colormap at the block's biome climate. */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as compareVersions, i as PrepareOptions, n as EraName, o as eraForVersion, r as GEOMETRY_DONOR_VERSIONS, s as prepareVersionResources, t as Era } from "../prepare-
|
|
1
|
+
import { a as compareVersions, i as PrepareOptions, n as EraName, o as eraForVersion, r as GEOMETRY_DONOR_VERSIONS, s as prepareVersionResources, t as Era } from "../prepare-Ce5SpR7Y.js";
|
|
2
2
|
export { Era, EraName, GEOMETRY_DONOR_VERSIONS, PrepareOptions, compareVersions, eraForVersion, prepareVersionResources };
|
package/dist/versions/prepare.js
CHANGED
|
@@ -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-
|
|
1
|
+
import { a as prepareVersionResources, i as eraForVersion, n as GEOMETRY_DONOR_VERSIONS, r as compareVersions, t as Era } from "../prepare-DkJkZXuQ.js";
|
|
2
2
|
export { Era, GEOMETRY_DONOR_VERSIONS, compareVersions, eraForVersion, prepareVersionResources };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as ResourceDescriptor } from "../manager-
|
|
2
|
-
import { n as ItemRenderOutcome, r as PipelineSettings } from "../pipeline-
|
|
1
|
+
import { s as ResourceDescriptor } from "../manager-Ct0dEOMg.js";
|
|
2
|
+
import { n as ItemRenderOutcome, r as PipelineSettings } from "../pipeline-DuPF3sap.js";
|
|
3
3
|
//#region src/workers/render-worker.d.ts
|
|
4
4
|
interface RenderWorkerData {
|
|
5
5
|
resources: ResourceDescriptor;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as ItemPipeline } from "../pipeline-
|
|
2
|
-
import { n as restoreResources } from "../descriptor-
|
|
1
|
+
import { t as ItemPipeline } from "../pipeline-Q_185kY6.js";
|
|
2
|
+
import { n as restoreResources } from "../descriptor-Dz2cR-BH.js";
|
|
3
3
|
import sharp from "sharp";
|
|
4
4
|
import { parentPort, workerData } from "node:worker_threads";
|
|
5
5
|
//#region src/workers/render-worker.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { RandomAccessReader, fromRandomAccessReader, open } from "yauzl";
|
|
2
|
+
import { close, createReadStream, fstat, open as open$1, read } from "node:fs";
|
|
3
3
|
import { Readable } from "node:stream";
|
|
4
4
|
//#region src/resources/zip-reader.ts
|
|
5
5
|
/**
|
|
@@ -101,7 +101,7 @@ var BufferedDirectoryReader = class extends RandomAccessReader {
|
|
|
101
101
|
};
|
|
102
102
|
async function openZip(zipPath) {
|
|
103
103
|
const fallback = async () => new Promise((resolve, reject) => {
|
|
104
|
-
open
|
|
104
|
+
open(zipPath, {
|
|
105
105
|
lazyEntries: true,
|
|
106
106
|
autoClose: false
|
|
107
107
|
}, (err, zip) => {
|
|
@@ -115,7 +115,7 @@ async function openZip(zipPath) {
|
|
|
115
115
|
let fd;
|
|
116
116
|
try {
|
|
117
117
|
fd = await new Promise((resolve, reject) => {
|
|
118
|
-
open(zipPath, "r", (err, handle) => err ? reject(err) : resolve(handle));
|
|
118
|
+
open$1(zipPath, "r", (err, handle) => err ? reject(err) : resolve(handle));
|
|
119
119
|
});
|
|
120
120
|
} catch {
|
|
121
121
|
return fallback();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nodecraft/rendermite",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.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",
|