@nodecraft/rendermite 1.10.1 → 1.11.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 -7
- package/dist/{block-behaviour-CzK3KVLx.d.ts → block-behaviour-D1qC9_cc.d.ts} +5 -0
- package/dist/{block-overrides-XtxICunI.js → block-overrides-BhuJIxKC.js} +1 -1
- package/dist/blocks/block-behaviour.d.ts +1 -1
- package/dist/blocks/block-overrides.d.ts +1 -1
- package/dist/blocks/block-overrides.js +1 -1
- package/dist/blocks/cli.js +1 -1
- package/dist/blocks/ender-storage.d.ts +1 -1
- package/dist/blocks/ender-storage.js +1 -1
- package/dist/blocks/entities.d.ts +1 -1
- package/dist/blocks/entity-geo.js +1 -1
- package/dist/blocks/entity-models.d.ts +1 -1
- package/dist/blocks/entity-models.js +1 -1
- package/dist/blocks/entity-sizes.js +1 -1
- package/dist/blocks/export.d.ts +1 -1
- package/dist/blocks/export.js +1 -1
- package/dist/blocks/game-rules.js +1 -1
- package/dist/blocks/geo-blocks.d.ts +1 -1
- package/dist/blocks/geo-blocks.js +1 -1
- package/dist/blocks/item-sprites.d.ts +1 -1
- package/dist/blocks/light-bytecode.d.ts +1 -1
- package/dist/blocks/light-bytecode.js +1 -1
- package/dist/blocks/light-eval.d.ts +1 -1
- package/dist/blocks/light.d.ts +7 -2
- package/dist/blocks/light.js +2 -2
- package/dist/blocks/obj-mesh.js +1 -1
- package/dist/blocks/pack-format.d.ts +1 -1
- package/dist/blocks/sprite-sheet.d.ts +1 -1
- package/dist/blocks/sprite-sheet.js +1 -1
- package/dist/cached-BOX3n1Dl.js +54 -0
- package/dist/{cli-2mzPC8cy.js → cli-BsEk_aEv.js} +16 -2
- package/dist/cli.js +2 -2
- package/dist/{compose-BGsNFR12.js → compose-CuIKcRpx.js} +1 -1
- package/dist/{encode-LR9wxigC.js → encode-TzYXOEId.js} +5 -4
- package/dist/{ender-storage-Dgomp6r2.js → ender-storage-CKDiYgYc.js} +1 -1
- package/dist/entities/mappings.js +1 -1
- package/dist/entities/model-code.js +1 -1
- package/dist/{entity-fallback-BucEf6WB.js → entity-fallback-BEzCbJq0.js} +1 -1
- package/dist/{entity-geo-DbTtMlPL.js → entity-geo-DcrcN8TE.js} +1 -1
- package/dist/{entity-models-vFl_EwfA.js → entity-models-D6AMLAy6.js} +3 -3
- package/dist/{entity-sizes-DspxgSUA.js → entity-sizes-Dmr4w0vu.js} +4 -3
- package/dist/{export-DgB0e5sB.js → export-BdHar0ND.js} +36 -14
- package/dist/{export-CqeTinYL.d.ts → export-CnKiSTiu.d.ts} +8 -0
- package/dist/{face-DbyyYmzp.js → face-D6SfTISC.js} +1 -1
- package/dist/{game-rules-BDPTopVW.js → game-rules-Dehe210A.js} +4 -3
- package/dist/{geo-BoDxwvz5.js → geo-BOYYFFQn.js} +3 -3
- package/dist/{geo-blocks-W79q5A0f.js → geo-blocks-BQqFfAQT.js} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/{light-BnaYFouC.js → light-Culwie4W.js} +26 -10
- package/dist/{light-bytecode-hhkkjMVi.js → light-bytecode-Bx3XLTRI.js} +1 -1
- package/dist/{light-eval-B4q-aVcf.d.ts → light-eval-Cl2L3RBz.d.ts} +1 -1
- package/dist/{mappings-DEl_7xxQ.js → mappings-CTB7_uZa.js} +16 -1
- package/dist/{model-code-BmA5ilgt.js → model-code-C5Au_FKU.js} +4 -3
- package/dist/{obj-DPEK_xee.js → obj-NxBaySXt.js} +67 -33
- package/dist/{obj-mesh-BFhtTBXX.js → obj-mesh-BBSLG2Fv.js} +1 -1
- package/dist/output/encode.js +1 -1
- package/dist/output/item-styles.d.ts +1 -1
- package/dist/output/stylesheet.d.ts +1 -1
- package/dist/output/stylesheet.js +1 -1
- package/dist/pack.d.ts +2 -2
- package/dist/{pipeline-Q_185kY6.js → pipeline-CCfkRth7.js} +7 -6
- package/dist/{rasterizer-DcVJzkxz.js → rasterizer-M9Y7mn-W.js} +13 -5
- package/dist/read-ahead-BlSzTexs.js +31 -0
- package/dist/render/compose.js +1 -1
- package/dist/render/entity-fallback.js +1 -1
- package/dist/render/face.js +1 -1
- package/dist/render/geo.js +1 -1
- package/dist/render/obj.js +1 -1
- package/dist/render/pipeline.js +1 -1
- package/dist/render/rasterizer.js +1 -1
- package/dist/render/renderer.js +1 -1
- package/dist/resources/cached.d.ts +27 -0
- package/dist/resources/cached.js +2 -0
- package/dist/resources/read-ahead.d.ts +12 -0
- package/dist/resources/read-ahead.js +2 -0
- package/dist/{run-5yX5KRiI.js → run-Bf5TLTJw.js} +7 -6
- package/dist/run.js +1 -1
- package/dist/{sprite-sheet-LQAEtGkp.js → sprite-sheet-BWsLl0Vd.js} +4 -2
- package/dist/{stylesheet-CovT3B2S.js → stylesheet-C61VrCAV.js} +6 -4
- package/dist/{stylesheet-i-t_7sZ7.d.ts → stylesheet-DxHkk4qA.d.ts} +2 -0
- package/dist/workers/render-worker.js +1 -1
- package/package.json +1 -1
|
@@ -2,9 +2,9 @@ import { n as ResourceLocator } from "./locator-COMEtEn9.js";
|
|
|
2
2
|
import { l as toFloatTexture } from "./blend-KXMclcHk.js";
|
|
3
3
|
import { n as displayMatrix } from "./vector-CCxLae_T.js";
|
|
4
4
|
import { c as lightsForProfile } from "./lighting--5myudVu.js";
|
|
5
|
-
import { i as createFaceBuffer } from "./rasterizer-
|
|
6
|
-
import { t as combineFaceBuffers } from "./compose-
|
|
7
|
-
import { n as faceMaxZ, r as renderFace, t as createShadeCache } from "./face-
|
|
5
|
+
import { i as createFaceBuffer } from "./rasterizer-M9Y7mn-W.js";
|
|
6
|
+
import { t as combineFaceBuffers } from "./compose-CuIKcRpx.js";
|
|
7
|
+
import { n as faceMaxZ, r as renderFace, t as createShadeCache } from "./face-D6SfTISC.js";
|
|
8
8
|
//#region src/render/geo.ts
|
|
9
9
|
/**
|
|
10
10
|
* Bedrock-format geometry (`.geo.json`) rendering, best-effort. GeckoLib mods
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as ResourceLocator } from "./locator-COMEtEn9.js";
|
|
2
|
-
import { i as parseGeo, n as geoToFaces } from "./geo-
|
|
2
|
+
import { i as parseGeo, n as geoToFaces } from "./geo-BOYYFFQn.js";
|
|
3
3
|
//#region src/blocks/geo-blocks.ts
|
|
4
4
|
/** GeckoLib block geometry selected by a Java block-entity renderer rather than its placeholder JSON. */
|
|
5
5
|
/** Blocks whose ordinary cube model exists only for particles/breaking and is replaced in Java. */
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { a as BlockStateMultipartCase, d as matchesCondition, f as parseBlockSta
|
|
|
8
8
|
import { a as resolveTexture, n as ModelResolutionError, o as salvageJson, r as ResolvedModel, t as ModelLoader } from "./loader-BYyPIs9f.js";
|
|
9
9
|
import { i as buildObjMesh, n as ObjMesh, r as ObjMeshError, t as MeshGroup } from "./obj-mesh-CzL0lOlJ.js";
|
|
10
10
|
import { a as buildBlockTints, i as UNREGISTERED_TINTS, n as BlockTintPack, t as BlockTint } from "./tints-DwFmEkf3.js";
|
|
11
|
-
import { i as exportBlockPack, n as BlockPackResult, r as ExportBlockPackOptions, t as BlockPackFailure } from "./export-
|
|
11
|
+
import { i as exportBlockPack, n as BlockPackResult, r as ExportBlockPackOptions, t as BlockPackFailure } from "./export-CnKiSTiu.js";
|
|
12
12
|
import { s as builtinDynamicResources } from "./generators-hu_vk10m.js";
|
|
13
13
|
import { d as toFloatTexture, n as FloatTexture, u as toByteTexture } from "./blend-mJAeQB3C.js";
|
|
14
14
|
import { a as LightingProfileName, i as LightingProfile, r as LightSource, u as lightsForProfile } from "./lighting-3FGRC3Af.js";
|
|
@@ -20,7 +20,7 @@ import { i as EncodedIcon, n as EncodeOptions, o as encodeAnimatedIcon, r as Enc
|
|
|
20
20
|
import { t as minifyStylesheet } from "./minify-CIV6enbr.js";
|
|
21
21
|
import { a as compareVersions, o as eraForVersion, s as prepareVersionResources } from "./prepare-Ce5SpR7Y.js";
|
|
22
22
|
import { i as prepareModResources } from "./prepare-BPzsZI_S.js";
|
|
23
|
-
import { i as itemClass, n as StylesheetOptions, r as generateStylesheet, t as ItemStyle } from "./stylesheet-
|
|
23
|
+
import { i as itemClass, n as StylesheetOptions, r as generateStylesheet, t as ItemStyle } from "./stylesheet-DxHkk4qA.js";
|
|
24
24
|
import { i as run, n as RunOptions, r as RunResult, t as ItemFailure } from "./run-CxB1qabg.js";
|
|
25
25
|
import { n as UnsafeJarError, r as isUnsafeEntryPath, t as JarResourceManager } from "./jar-4Jg7ufWK.js";
|
|
26
26
|
export { type AnimatedEncodeOptions, AnimatedTexture, type AtlasResolver, type AtlasSource, AtlasSourceError, type BiomeClimate, type BiomeClimatePack, type BlockModelVariant, type BlockPackFailure, type BlockPackResult, type BlockProperties, type BlockStateDefinition, BlockStateError, type BlockStateMultipartCase, type BlockStateVariantCase, type BlockTint, type BlockTintPack, DEFAULT_WATER_COLOR, DYE_COLORS, type DiscoveredItem, type EncodeOptions, type EncodedAnimatedIcon, type EncodedIcon, type ExportBlockPackOptions, type FloatTexture, FolderResourceManager, InvalidItemDefinitionError, InvalidResourceLocatorError, InvalidTinterDefinitionError, type ItemDiscoveryOptions, type ItemFailure, type ItemProperties, ItemRenderError, type ItemRenderInstruction, ItemResolutionError, type ItemStyle, JarResourceManager, LEGACY_BIOMES, LayeredResourceManager, type LightSource, LightingProfile, type LightingProfileName, type MeshGroup, ModelLoader, ModelResolutionError, type MultipartCondition, type ObjMesh, ObjMeshError, PRE_JAR_BIOMES, type PackEntry, type PackOptions, type PackedAtlas, type PackedPage, type PackedRect, type RenderOptions, type RenderedFrames, type ResolvedModel, type ResolvedSprite, ResourceKind, type ResourceKindName, ResourceLocator, type ResourceManager, type RunOptions, type RunResult, type StylesheetOptions, type Texture, TextureLoader, type TextureMeta, TextureResolutionError, type TintDefinition, UNKNOWN_MODEL, UNREGISTERED_TINTS, UnsafeJarError, VANILLA_BIOME_CLIMATES, boxDownscale, buildBiomeClimates, buildBlockTints, buildObjMesh, builtinDynamicResources, collectModels, compareVersions, createAtlasResolver, defaultProperties, discoverItems, encodeAnimatedIcon, encodeIcon, eraForVersion, evaluateBlockState, evaluateItemModel, exportBlockPack, generateStylesheet, isUnsafeEntryPath, itemClass, lightsForProfile, matchesCondition, minifyStylesheet, packAtlas, parseAtlasSources, parseBiomeClimate, parseBlockState, parseTintValue, pointResize, prepareModResources, prepareVersionResources, renderModel, renderModelFrames, resolveItem, resolveTexture, resolveTint, resolveTints, run, salvageJson, toByteTexture, toFloatTexture, vanillaBiomesFor, weightedVariantIndex };
|
package/dist/index.js
CHANGED
|
@@ -7,20 +7,20 @@ import { a as parseBlockState, i as matchesCondition, n as collectModels, o as w
|
|
|
7
7
|
import { c as toByteTexture, l as toFloatTexture } from "./blend-KXMclcHk.js";
|
|
8
8
|
import { c as lightsForProfile, r as LightingProfile } from "./lighting--5myudVu.js";
|
|
9
9
|
import { a as salvageJson, i as resolveTexture, n as ModelResolutionError, t as ModelLoader } from "./loader-qOH0Jynq.js";
|
|
10
|
-
import { a as ItemRenderError, c as renderModel, l as renderModelFrames, o as boxDownscale, s as pointResize } from "./obj-
|
|
10
|
+
import { a as ItemRenderError, c as renderModel, l as renderModelFrames, o as boxDownscale, s as pointResize } from "./obj-NxBaySXt.js";
|
|
11
11
|
import { a as defaultProperties, i as UNKNOWN_MODEL, n as InvalidItemDefinitionError, o as evaluateItemModel } from "./definition-ColsvWrH.js";
|
|
12
12
|
import { i as resolveItem, n as discoverItems, t as ItemResolutionError } from "./discovery-CD0QqxSF.js";
|
|
13
13
|
import { a as resolveTints, i as resolveTint, n as InvalidTinterDefinitionError, r as parseTintValue, t as DYE_COLORS } from "./tints-B3WQcPtx.js";
|
|
14
|
-
import { n as buildObjMesh, t as ObjMeshError } from "./obj-mesh-
|
|
14
|
+
import { n as buildObjMesh, t as ObjMeshError } from "./obj-mesh-BBSLG2Fv.js";
|
|
15
15
|
import { t as packAtlas } from "./atlas-pack-CoOih7By.js";
|
|
16
16
|
import { n as buildBlockTints, t as UNREGISTERED_TINTS } from "./tints-Cl0r-Ol3.js";
|
|
17
17
|
import { o as createAtlasResolver, s as parseAtlasSources, t as AtlasSourceError } from "./sources-DYY5Qu-t.js";
|
|
18
18
|
import { n as TextureLoader, r as TextureResolutionError, t as AnimatedTexture } from "./loader-CsgtBuBo.js";
|
|
19
|
-
import { t as exportBlockPack } from "./export-
|
|
19
|
+
import { t as exportBlockPack } from "./export-BdHar0ND.js";
|
|
20
20
|
import { n as prepareModResources } from "./prepare-sj36BP90.js";
|
|
21
|
-
import { n as encodeIcon, t as encodeAnimatedIcon } from "./encode-
|
|
21
|
+
import { n as encodeIcon, t as encodeAnimatedIcon } from "./encode-TzYXOEId.js";
|
|
22
22
|
import { a as builtinDynamicResources } from "./generators-D6giKoab.js";
|
|
23
23
|
import { t as minifyStylesheet } from "./minify-bjMRmr5J.js";
|
|
24
|
-
import { n as itemClass, t as generateStylesheet } from "./stylesheet-
|
|
25
|
-
import { t as run } from "./run-
|
|
24
|
+
import { n as itemClass, t as generateStylesheet } from "./stylesheet-C61VrCAV.js";
|
|
25
|
+
import { t as run } from "./run-Bf5TLTJw.js";
|
|
26
26
|
export { AnimatedTexture, AtlasSourceError, BlockStateError, DEFAULT_WATER_COLOR, DYE_COLORS, FolderResourceManager, InvalidItemDefinitionError, InvalidResourceLocatorError, InvalidTinterDefinitionError, ItemRenderError, ItemResolutionError, JarResourceManager, LEGACY_BIOMES, LayeredResourceManager, LightingProfile, ModelLoader, ModelResolutionError, ObjMeshError, PRE_JAR_BIOMES, ResourceKind, ResourceLocator, TextureLoader, TextureResolutionError, UNKNOWN_MODEL, UNREGISTERED_TINTS, UnsafeJarError, VANILLA_BIOME_CLIMATES, boxDownscale, buildBiomeClimates, buildBlockTints, buildObjMesh, builtinDynamicResources, collectModels, compareVersions, createAtlasResolver, defaultProperties, discoverItems, encodeAnimatedIcon, encodeIcon, eraForVersion, evaluateBlockState, evaluateItemModel, exportBlockPack, generateStylesheet, isUnsafeEntryPath, itemClass, lightsForProfile, matchesCondition, minifyStylesheet, packAtlas, parseAtlasSources, parseBiomeClimate, parseBlockState, parseTintValue, pointResize, prepareModResources, prepareVersionResources, renderModel, renderModelFrames, resolveItem, resolveTexture, resolveTint, resolveTints, run, salvageJson, toByteTexture, toFloatTexture, vanillaBiomesFor, weightedVariantIndex };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { r as compareVersions } from "./prepare-DkJkZXuQ.js";
|
|
2
2
|
import { t as parseClassFile } from "./classfile-BJSs3JH0.js";
|
|
3
|
-
import { c as resolveMappings, s as remapDescriptor, t as MappingsUnavailableError } from "./mappings-
|
|
3
|
+
import { c as resolveMappings, s as remapDescriptor, t as MappingsUnavailableError } from "./mappings-CTB7_uZa.js";
|
|
4
|
+
import { t as readAhead } from "./read-ahead-BlSzTexs.js";
|
|
4
5
|
import { t as blockBehaviour } from "./block-behaviour-DVjqeSkv.js";
|
|
5
|
-
import { i as overrideOf, n as constantFluidOf, t as alwaysInvisible } from "./block-overrides-
|
|
6
|
-
import { t as extractBlockLight } from "./light-bytecode-
|
|
6
|
+
import { i as overrideOf, n as constantFluidOf, t as alwaysInvisible } from "./block-overrides-BhuJIxKC.js";
|
|
7
|
+
import { t as extractBlockLight } from "./light-bytecode-Bx3XLTRI.js";
|
|
7
8
|
//#region src/blocks/light.ts
|
|
8
9
|
/**
|
|
9
10
|
* Block light emission for the exported pack: `light.json`.
|
|
@@ -191,9 +192,15 @@ function findLightGetters(roots, propsClasses, resolve, notes) {
|
|
|
191
192
|
}
|
|
192
193
|
/** Reference renaming through the mappings: a mod's original names onto an obfuscated client's. */
|
|
193
194
|
function remapper(mappings, superOf = () => null) {
|
|
195
|
+
const remappedClasses = /* @__PURE__ */ new Map();
|
|
194
196
|
const remapClass = (internalName) => {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
+
let remapped = remappedClasses.get(internalName);
|
|
198
|
+
if (remapped === void 0) {
|
|
199
|
+
const mapped = mappings.obfuscatedOf.get(internalName.replaceAll("/", "."));
|
|
200
|
+
remapped = mapped ? mapped.replaceAll(".", "/") : internalName;
|
|
201
|
+
remappedClasses.set(internalName, remapped);
|
|
202
|
+
}
|
|
203
|
+
return remapped;
|
|
197
204
|
};
|
|
198
205
|
const remap = (reference, field) => {
|
|
199
206
|
const dotted = reference.owner.replaceAll("/", ".");
|
|
@@ -206,15 +213,24 @@ function remapper(mappings, superOf = () => null) {
|
|
|
206
213
|
descriptor: remapDescriptor(reference.descriptor, mappings.obfuscatedOf)
|
|
207
214
|
};
|
|
208
215
|
};
|
|
216
|
+
const memberNames = /* @__PURE__ */ new Map();
|
|
209
217
|
const nameOf = (reference, field) => {
|
|
218
|
+
const key = field ? `field ${reference.owner}.${reference.name}` : `method ${reference.owner}.${reference.name}${reference.descriptor}`;
|
|
219
|
+
let name = memberNames.get(key);
|
|
220
|
+
if (name !== void 0) return name;
|
|
221
|
+
name = reference.name;
|
|
210
222
|
let owner = reference.owner;
|
|
211
223
|
for (let hops = 0; owner && hops < 8; hops++) {
|
|
212
224
|
const dotted = owner.replaceAll("/", ".");
|
|
213
225
|
const found = mappings.nameOf?.get(field ? `${dotted}.${reference.name}` : `${dotted}.${reference.name}${reference.descriptor}`);
|
|
214
|
-
if (found)
|
|
226
|
+
if (found) {
|
|
227
|
+
name = found;
|
|
228
|
+
break;
|
|
229
|
+
}
|
|
215
230
|
owner = superOf(owner);
|
|
216
231
|
}
|
|
217
|
-
|
|
232
|
+
memberNames.set(key, name);
|
|
233
|
+
return name;
|
|
218
234
|
};
|
|
219
235
|
return {
|
|
220
236
|
remap,
|
|
@@ -243,8 +259,8 @@ async function collectBlockLight(options) {
|
|
|
243
259
|
const { remap, remapClass } = remapper(mappings);
|
|
244
260
|
const isClearJar = names.some((name) => name.replaceAll(".", "/") === "net/minecraft/world/level/block/Blocks");
|
|
245
261
|
const bytes = /* @__PURE__ */ new Map();
|
|
246
|
-
for (const name of names) {
|
|
247
|
-
const read = await
|
|
262
|
+
for (const [name, pending] of readAhead(names, (internal) => classes.read(internal))) {
|
|
263
|
+
const read = await pending;
|
|
248
264
|
if (read) bytes.set(name.replaceAll(".", "/"), read);
|
|
249
265
|
}
|
|
250
266
|
const parsed = /* @__PURE__ */ new Map();
|
|
@@ -622,4 +638,4 @@ for (const name of ["candle", ...[
|
|
|
622
638
|
VANILLA_LIGHT[`${name}_cake`] = lit(3);
|
|
623
639
|
}
|
|
624
640
|
//#endregion
|
|
625
|
-
export {
|
|
641
|
+
export { vanillaLightAt as i, VANILLA_LIGHT as n, collectBlockLight as r, NOT_BLOCKS as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as parseDescriptor } from "./model-bytecode-CXYAZ5dX.js";
|
|
2
|
-
import { n as instructions } from "./entity-sizes-
|
|
2
|
+
import { n as instructions } from "./entity-sizes-Dmr4w0vu.js";
|
|
3
3
|
import { n as statedMapColor } from "./block-behaviour-DVjqeSkv.js";
|
|
4
4
|
//#region src/blocks/light-bytecode.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as BlockProperties } from "./blockstate-eval-BzznRcVY.js";
|
|
2
|
-
import { j as BlockPackLight } from "./block-behaviour-
|
|
2
|
+
import { j as BlockPackLight } from "./block-behaviour-D1qC9_cc.js";
|
|
3
3
|
//#region src/blocks/light-eval.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* The light a block emits in the given state, 0–15.
|
|
@@ -160,8 +160,23 @@ function parseMappings(text) {
|
|
|
160
160
|
nameOf
|
|
161
161
|
};
|
|
162
162
|
}
|
|
163
|
+
/**
|
|
164
|
+
* The last file parsed. An export reads one version's mappings from light, entity sizes and entity
|
|
165
|
+
* geometry in turn, and each parse is most of a second; one slot keeps a seed across versions bounded.
|
|
166
|
+
*/
|
|
167
|
+
let lastParsed = null;
|
|
163
168
|
async function loadMappings(version, cacheDir) {
|
|
164
|
-
|
|
169
|
+
const file = await downloadClientMappings(version, cacheDir);
|
|
170
|
+
if (lastParsed?.file === file) return lastParsed.mappings;
|
|
171
|
+
const entry = {
|
|
172
|
+
file,
|
|
173
|
+
mappings: readFile(file, "utf8").then((text) => parseMappings(text))
|
|
174
|
+
};
|
|
175
|
+
lastParsed = entry;
|
|
176
|
+
entry.mappings.catch(() => {
|
|
177
|
+
if (lastParsed === entry) lastParsed = null;
|
|
178
|
+
});
|
|
179
|
+
return entry.mappings;
|
|
165
180
|
}
|
|
166
181
|
/**
|
|
167
182
|
* Mappings for a jar that was never obfuscated: every class maps to itself.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { t as parseClassFile } from "./classfile-BJSs3JH0.js";
|
|
2
|
+
import { t as readAhead } from "./read-ahead-BlSzTexs.js";
|
|
2
3
|
//#region src/entities/model-code.ts
|
|
3
4
|
/**
|
|
4
5
|
* Which classes in a jar count as model code, and their parsed form.
|
|
@@ -24,9 +25,9 @@ function isModelCode(name) {
|
|
|
24
25
|
*/
|
|
25
26
|
async function loadModelCode(names, read, originalOf) {
|
|
26
27
|
const code = /* @__PURE__ */ new Map();
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const bytes = await
|
|
28
|
+
const modelNames = Iterator.from(names).filter((name) => isModelCode(originalOf?.(name) ?? name));
|
|
29
|
+
for (const [name, pending] of readAhead(modelNames, read)) {
|
|
30
|
+
const bytes = await pending;
|
|
30
31
|
if (bytes) code.set(name.replaceAll(".", "/"), bytes);
|
|
31
32
|
}
|
|
32
33
|
const parsed = /* @__PURE__ */ new Map();
|
|
@@ -2,9 +2,9 @@ import { n as ResourceLocator } from "./locator-COMEtEn9.js";
|
|
|
2
2
|
import { l as toFloatTexture, n as cloneFloatTexture, r as darkenTexture, s as tintTexture, t as blendPixel } from "./blend-KXMclcHk.js";
|
|
3
3
|
import { c as normalize, g as transformVector, m as sub, n as displayMatrix, o as identity, r as dot, s as multiply, t as cross } from "./vector-CCxLae_T.js";
|
|
4
4
|
import { c as lightsForProfile } from "./lighting--5myudVu.js";
|
|
5
|
-
import { a as drawTexturedTriangle, i as createFaceBuffer, n as clearFaceBuffer, o as phpRound, t as RowCursor } from "./rasterizer-
|
|
6
|
-
import { t as combineFaceBuffers } from "./compose-
|
|
7
|
-
import { n as faceMaxZ, r as renderFace, t as createShadeCache } from "./face-
|
|
5
|
+
import { a as drawTexturedTriangle, i as createFaceBuffer, n as clearFaceBuffer, o as phpRound, t as RowCursor } from "./rasterizer-M9Y7mn-W.js";
|
|
6
|
+
import { t as combineFaceBuffers } from "./compose-CuIKcRpx.js";
|
|
7
|
+
import { n as faceMaxZ, r as renderFace, t as createShadeCache } from "./face-D6SfTISC.js";
|
|
8
8
|
import { t as paintBucketFluid } from "./fluid-bucket-B-I4ZYHl.js";
|
|
9
9
|
import { r as buildElementFaces } from "./geometry-bUDBhncX.js";
|
|
10
10
|
import { i as resolveTexture } from "./loader-qOH0Jynq.js";
|
|
@@ -226,10 +226,14 @@ async function renderGeneratedItemWith(model, supplier, renderSize, tints) {
|
|
|
226
226
|
const float = toFloatTexture(texture);
|
|
227
227
|
const tint = tints?.[layerIndex] ?? null;
|
|
228
228
|
if (tint) tintTexture(float, tint.r, tint.g, tint.b);
|
|
229
|
-
const
|
|
230
|
-
for (let
|
|
231
|
-
const
|
|
232
|
-
|
|
229
|
+
const srcXs = pointColumns(float.width, renderSize);
|
|
230
|
+
for (let y = 0; y < renderSize; y++) {
|
|
231
|
+
const srcRow = pointRow(float.height, renderSize, y) * float.width;
|
|
232
|
+
for (let x = 0; x < renderSize; x++) {
|
|
233
|
+
const src = (srcRow + srcXs[x]) * 4;
|
|
234
|
+
const alpha = float.data[src + 3];
|
|
235
|
+
if (alpha > 0) blendPixel(out, (y * renderSize + x) * 4, float.data[src], float.data[src + 1], float.data[src + 2], alpha);
|
|
236
|
+
}
|
|
233
237
|
}
|
|
234
238
|
}
|
|
235
239
|
return {
|
|
@@ -336,18 +340,29 @@ async function renderElementModelWith(model, supplier, renderSize, options, sess
|
|
|
336
340
|
}
|
|
337
341
|
return combineFaceBuffers(renderSize, renderSize, buffers);
|
|
338
342
|
}
|
|
339
|
-
/**
|
|
340
|
-
|
|
341
|
-
|
|
343
|
+
/**
|
|
344
|
+
* Source column for every destination column of a point resize. The mapping is
|
|
345
|
+
* identical for every row, so computing it once avoids width * height redundant
|
|
346
|
+
* Math.floor + division calls.
|
|
347
|
+
*/
|
|
348
|
+
function pointColumns(sourceWidth, width) {
|
|
342
349
|
const srcXs = new Int32Array(width);
|
|
343
350
|
for (let x = 0; x < width; x++) {
|
|
344
|
-
const srcX = Math.floor((x + .5) *
|
|
345
|
-
srcXs[x] = srcX >=
|
|
351
|
+
const srcX = Math.floor((x + .5) * sourceWidth / width);
|
|
352
|
+
srcXs[x] = srcX >= sourceWidth ? sourceWidth - 1 : srcX;
|
|
346
353
|
}
|
|
354
|
+
return srcXs;
|
|
355
|
+
}
|
|
356
|
+
function pointRow(sourceHeight, height, y) {
|
|
357
|
+
const srcY = Math.floor((y + .5) * sourceHeight / height);
|
|
358
|
+
return srcY >= sourceHeight ? sourceHeight - 1 : srcY;
|
|
359
|
+
}
|
|
360
|
+
/** Nearest-neighbour resize matching Imagick FILTER_POINT (destination-center sampling). */
|
|
361
|
+
function pointResize(texture, width, height) {
|
|
362
|
+
const data = new Float64Array(width * height * 4);
|
|
363
|
+
const srcXs = pointColumns(texture.width, width);
|
|
347
364
|
for (let y = 0; y < height; y++) {
|
|
348
|
-
|
|
349
|
-
srcY = srcY >= texture.height ? texture.height - 1 : srcY;
|
|
350
|
-
const srcRow = srcY * texture.width;
|
|
365
|
+
const srcRow = pointRow(texture.height, height, y) * texture.width;
|
|
351
366
|
const dstRow = y * width;
|
|
352
367
|
for (let x = 0; x < width; x++) {
|
|
353
368
|
const src = (srcRow + srcXs[x]) * 4;
|
|
@@ -371,29 +386,48 @@ function pointResize(texture, width, height) {
|
|
|
371
386
|
* Q16 quantum with round-half-up. Verified against Imagick FILTER_BOX output.
|
|
372
387
|
*/
|
|
373
388
|
function boxDownscale(texture, factor) {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
const
|
|
378
|
-
|
|
389
|
+
const { width: sourceWidth, height: sourceHeight, data: src } = texture;
|
|
390
|
+
const width = Math.round(sourceWidth / factor);
|
|
391
|
+
const height = Math.round(sourceHeight / factor);
|
|
392
|
+
const quanta = new Float64Array(width * sourceHeight * 4);
|
|
393
|
+
for (let y = 0; y < sourceHeight; y++) for (let x = 0; x < width; x++) {
|
|
394
|
+
const start = (y * sourceWidth + x * factor) * 4;
|
|
395
|
+
let alphaSum = 0;
|
|
396
|
+
for (let i = 0, srcOffset = start; i < factor; i++, srcOffset += 4) alphaSum += Math.round(src[srcOffset + 3] * 65535);
|
|
397
|
+
const dst = (y * width + x) * 4;
|
|
398
|
+
if (alphaSum > 0) {
|
|
399
|
+
let r = 0;
|
|
400
|
+
let g = 0;
|
|
401
|
+
let b = 0;
|
|
402
|
+
for (let i = 0, srcOffset = start; i < factor; i++, srcOffset += 4) {
|
|
403
|
+
const alpha = Math.round(src[srcOffset + 3] * 65535);
|
|
404
|
+
r += Math.round(src[srcOffset] * 65535) * alpha;
|
|
405
|
+
g += Math.round(src[srcOffset + 1] * 65535) * alpha;
|
|
406
|
+
b += Math.round(src[srcOffset + 2] * 65535) * alpha;
|
|
407
|
+
}
|
|
408
|
+
quanta[dst] = clampQuantum(r / alphaSum);
|
|
409
|
+
quanta[dst + 1] = clampQuantum(g / alphaSum);
|
|
410
|
+
quanta[dst + 2] = clampQuantum(b / alphaSum);
|
|
411
|
+
}
|
|
412
|
+
quanta[dst + 3] = clampQuantum(alphaSum / factor);
|
|
413
|
+
}
|
|
379
414
|
const data = new Float64Array(width * height * 4);
|
|
380
|
-
const
|
|
415
|
+
const rowStride = width * 4;
|
|
381
416
|
for (let y = 0; y < height; y++) for (let x = 0; x < width; x++) {
|
|
382
|
-
|
|
383
|
-
let g = 0;
|
|
384
|
-
let b = 0;
|
|
417
|
+
const start = (y * factor * width + x) * 4;
|
|
385
418
|
let alphaSum = 0;
|
|
386
|
-
for (let i = 0; i < factor; i
|
|
387
|
-
const srcX = isHorizontal ? x * factor + i : x;
|
|
388
|
-
const srcOffset = ((isHorizontal ? y : y * factor + i) * texture.width + srcX) * 4;
|
|
389
|
-
const alpha = Math.round(src[srcOffset + 3] * 65535);
|
|
390
|
-
r += Math.round(src[srcOffset] * 65535) * alpha;
|
|
391
|
-
g += Math.round(src[srcOffset + 1] * 65535) * alpha;
|
|
392
|
-
b += Math.round(src[srcOffset + 2] * 65535) * alpha;
|
|
393
|
-
alphaSum += alpha;
|
|
394
|
-
}
|
|
419
|
+
for (let i = 0, srcOffset = start; i < factor; i++, srcOffset += rowStride) alphaSum += quanta[srcOffset + 3];
|
|
395
420
|
const dst = (y * width + x) * 4;
|
|
396
421
|
if (alphaSum > 0) {
|
|
422
|
+
let r = 0;
|
|
423
|
+
let g = 0;
|
|
424
|
+
let b = 0;
|
|
425
|
+
for (let i = 0, srcOffset = start; i < factor; i++, srcOffset += rowStride) {
|
|
426
|
+
const alpha = quanta[srcOffset + 3];
|
|
427
|
+
r += quanta[srcOffset] * alpha;
|
|
428
|
+
g += quanta[srcOffset + 1] * alpha;
|
|
429
|
+
b += quanta[srcOffset + 2] * alpha;
|
|
430
|
+
}
|
|
397
431
|
data[dst] = clampQuantum(r / alphaSum) / 65535;
|
|
398
432
|
data[dst + 1] = clampQuantum(g / alphaSum) / 65535;
|
|
399
433
|
data[dst + 2] = clampQuantum(b / alphaSum) / 65535;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as ResourceLocator } from "./locator-COMEtEn9.js";
|
|
2
|
-
import { n as parseMtl, r as parseObj, t as materialTexture } from "./obj-
|
|
2
|
+
import { n as parseMtl, r as parseObj, t as materialTexture } from "./obj-NxBaySXt.js";
|
|
3
3
|
//#region src/blocks/obj-mesh.ts
|
|
4
4
|
/**
|
|
5
5
|
* OBJ geometry as pack data.
|
package/dist/output/encode.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as encodeIcon, r as encodeRasterAsset, t as encodeAnimatedIcon } from "../encode-
|
|
1
|
+
import { n as encodeIcon, r as encodeRasterAsset, t as encodeAnimatedIcon } from "../encode-TzYXOEId.js";
|
|
2
2
|
export { encodeAnimatedIcon, encodeIcon, encodeRasterAsset };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as itemClass, n as StylesheetOptions, r as generateStylesheet, t as ItemStyle } from "../stylesheet-
|
|
1
|
+
import { i as itemClass, n as StylesheetOptions, r as generateStylesheet, t as ItemStyle } from "../stylesheet-DxHkk4qA.js";
|
|
2
2
|
export { ItemStyle, StylesheetOptions, generateStylesheet, itemClass };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as itemClass, t as generateStylesheet } from "../stylesheet-
|
|
1
|
+
import { n as itemClass, t as generateStylesheet } from "../stylesheet-C61VrCAV.js";
|
|
2
2
|
export { generateStylesheet, itemClass };
|
package/dist/pack.d.ts
CHANGED
|
@@ -3,6 +3,6 @@ import { a as BlockStateMultipartCase, d as matchesCondition, n as BlockProperti
|
|
|
3
3
|
import { t as GameRule } from "./game-rules-ThvdDG3B.js";
|
|
4
4
|
import { n as ObjMesh, t as MeshGroup } from "./obj-mesh-CzL0lOlJ.js";
|
|
5
5
|
import { n as BlockTintPack, t as BlockTint } from "./tints-DwFmEkf3.js";
|
|
6
|
-
import { B as BlockPackStatesFile, C as BlockPackBlockState, F as BlockPackModelsFile, H as BlockPackTintsFile, I as BlockPackNamesFile, L as BlockPackRenderLayer, M as BlockPackLightFile, N as BlockPackMetaFile, O as BlockPackFace, P as BlockPackModel, R as BlockPackSprite, S as BlockPackBiomesFile, T as BlockPackElement, U as BlockPackVariant, V as BlockPackTagsFile, b as BlockPackAtlasPage, j as BlockPackLight, k as BlockPackGameRulesFile, n as PushReactionName, t as BlockBehaviour, v as BlockPackAdvancementsFile, w as BlockPackBlockStatesFile, x as BlockPackBehaviourFile, y as BlockPackAtlasFile, z as BlockPackSpriteFrame } from "./block-behaviour-
|
|
7
|
-
import { t as blockLightLevel } from "./light-eval-
|
|
6
|
+
import { B as BlockPackStatesFile, C as BlockPackBlockState, F as BlockPackModelsFile, H as BlockPackTintsFile, I as BlockPackNamesFile, L as BlockPackRenderLayer, M as BlockPackLightFile, N as BlockPackMetaFile, O as BlockPackFace, P as BlockPackModel, R as BlockPackSprite, S as BlockPackBiomesFile, T as BlockPackElement, U as BlockPackVariant, V as BlockPackTagsFile, b as BlockPackAtlasPage, j as BlockPackLight, k as BlockPackGameRulesFile, n as PushReactionName, t as BlockBehaviour, v as BlockPackAdvancementsFile, w as BlockPackBlockStatesFile, x as BlockPackBehaviourFile, y as BlockPackAtlasFile, z as BlockPackSpriteFrame } from "./block-behaviour-D1qC9_cc.js";
|
|
7
|
+
import { t as blockLightLevel } from "./light-eval-Cl2L3RBz.js";
|
|
8
8
|
export { type BiomeClimate, type BiomeClimatePack, type BlockBehaviour, type BlockModelVariant, type BlockPackAdvancementsFile, type BlockPackAtlasFile, type BlockPackAtlasPage, type BlockPackBehaviourFile, type BlockPackBiomesFile, type BlockPackBlockState, type BlockPackBlockStatesFile, type BlockPackElement, type BlockPackFace, type BlockPackGameRulesFile, type BlockPackLight, type BlockPackLightFile, type BlockPackMetaFile, type BlockPackModel, type BlockPackModelsFile, type BlockPackNamesFile, type BlockPackRenderLayer, type BlockPackSprite, type BlockPackSpriteFrame, type BlockPackStatesFile, type BlockPackTagsFile, type BlockPackTintsFile, type BlockPackVariant, type BlockProperties, type BlockStateDefinition, type BlockStateMultipartCase, type BlockStateVariantCase, type BlockTint, type BlockTintPack, type GameRule, type MeshGroup, type MultipartCondition, type ObjMesh, type PushReactionName, blockLightLevel, evaluateBlockState, matchesCondition, weightedVariantIndex };
|
|
@@ -2,16 +2,17 @@ import { n as ResourceLocator } from "./locator-COMEtEn9.js";
|
|
|
2
2
|
import { n as LayeredResourceManager, t as FolderResourceManager } from "./manager-D6zXmFrO.js";
|
|
3
3
|
import { l as toFloatTexture, t as blendPixel } from "./blend-KXMclcHk.js";
|
|
4
4
|
import { t as ModelLoader } from "./loader-qOH0Jynq.js";
|
|
5
|
-
import { c as renderModel, l as renderModelFrames, o as boxDownscale, s as pointResize } from "./obj-
|
|
6
|
-
import { a as renderGeo, t as findGeoForItem } from "./geo-
|
|
5
|
+
import { c as renderModel, l as renderModelFrames, o as boxDownscale, s as pointResize } from "./obj-NxBaySXt.js";
|
|
6
|
+
import { a as renderGeo, t as findGeoForItem } from "./geo-BOYYFFQn.js";
|
|
7
7
|
import { a as defaultProperties } from "./definition-ColsvWrH.js";
|
|
8
8
|
import { i as resolveItem } from "./discovery-CD0QqxSF.js";
|
|
9
9
|
import { a as resolveTints } from "./tints-B3WQcPtx.js";
|
|
10
10
|
import { t as loadAtlasResolver } from "./registry-DafxsAhG.js";
|
|
11
|
+
import { t as CachedListingResourceManager } from "./cached-BOX3n1Dl.js";
|
|
11
12
|
import { n as TextureLoader } from "./loader-CsgtBuBo.js";
|
|
12
|
-
import { t as encodeAnimatedIcon } from "./encode-
|
|
13
|
+
import { t as encodeAnimatedIcon } from "./encode-TzYXOEId.js";
|
|
13
14
|
import { a as builtinDynamicResources } from "./generators-D6giKoab.js";
|
|
14
|
-
import { a as spawnEggTints, i as renderEntityFallback, n as dyedVariantTint, r as renderDyedVariantFallback, t as dyeVariantName } from "./entity-fallback-
|
|
15
|
+
import { a as spawnEggTints, i as renderEntityFallback, n as dyedVariantTint, r as renderDyedVariantFallback, t as dyeVariantName } from "./entity-fallback-BEzCbJq0.js";
|
|
15
16
|
import { t as legacyTintsForChain } from "./legacy-tints-l-541wgI.js";
|
|
16
17
|
import { n as defaultBlockStateModel, t as blockStateTransform } from "./blockstate-DVb8Mhxc.js";
|
|
17
18
|
import path from "node:path";
|
|
@@ -27,11 +28,11 @@ import { mkdir, writeFile } from "node:fs/promises";
|
|
|
27
28
|
var ItemPipeline = class ItemPipeline {
|
|
28
29
|
static async create(base, settings) {
|
|
29
30
|
const dynamic = settings.builtin ? builtinDynamicResources() : null;
|
|
30
|
-
const resources = settings.builtin && dynamic ? new LayeredResourceManager([
|
|
31
|
+
const resources = new CachedListingResourceManager(settings.builtin && dynamic ? new LayeredResourceManager([
|
|
31
32
|
new FolderResourceManager(settings.builtin),
|
|
32
33
|
dynamic.layer,
|
|
33
34
|
base
|
|
34
|
-
]) : base;
|
|
35
|
+
]) : base);
|
|
35
36
|
const pipeline = new ItemPipeline(resources, dynamic?.items.map((item) => item.id) ?? null, settings);
|
|
36
37
|
pipeline.textures.setAtlasResolver(await loadAtlasResolver(resources, (locator) => pipeline.textures.load(locator)));
|
|
37
38
|
return pipeline;
|
|
@@ -48,12 +48,20 @@ function compactFaceBuffer(buffer) {
|
|
|
48
48
|
let minY = buffer.height;
|
|
49
49
|
let maxX = -1;
|
|
50
50
|
let maxY = -1;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
const source = buffer.colors;
|
|
52
|
+
const startX = Math.max(buffer.dirty.minX, 0);
|
|
53
|
+
const endX = Math.min(buffer.dirty.maxX, buffer.width - 1);
|
|
54
|
+
for (let y = Math.max(buffer.dirty.minY, 0); y <= Math.min(buffer.dirty.maxY, buffer.height - 1); y++) {
|
|
55
|
+
const row = y * buffer.width;
|
|
56
|
+
let first = startX;
|
|
57
|
+
while (first <= endX && source[(row + first) * 4 + 3] <= 0) first++;
|
|
58
|
+
if (first > endX) continue;
|
|
59
|
+
let last = endX;
|
|
60
|
+
while (last > first && source[(row + last) * 4 + 3] <= 0) last--;
|
|
61
|
+
minX = Math.min(minX, first);
|
|
62
|
+
maxX = Math.max(maxX, last);
|
|
54
63
|
minY = Math.min(minY, y);
|
|
55
|
-
|
|
56
|
-
maxY = Math.max(maxY, y);
|
|
64
|
+
maxY = y;
|
|
57
65
|
}
|
|
58
66
|
if (maxX < minX || maxY < minY) return null;
|
|
59
67
|
const width = maxX - minX + 1;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//#region src/resources/read-ahead.ts
|
|
2
|
+
/** Loads kept running ahead of the caller: enough to overlap one entry's decode with the next one's I/O. */
|
|
3
|
+
const WINDOW = 32;
|
|
4
|
+
/**
|
|
5
|
+
* Each item paired with its load, already started, in the order given; a fixed number of loads run
|
|
6
|
+
* ahead of the one the caller is awaiting.
|
|
7
|
+
*
|
|
8
|
+
* Whole-jar sweeps and atlas builds awaited one entry at a time, so every read paid its disk round trip
|
|
9
|
+
* and decode in series. The caller still awaits each load in order, so results, progress and the first
|
|
10
|
+
* failure land exactly where the one-at-a-time loop put them.
|
|
11
|
+
*/
|
|
12
|
+
function* readAhead(items, load) {
|
|
13
|
+
const iterator = items[Symbol.iterator]();
|
|
14
|
+
const pending = [];
|
|
15
|
+
const fill = () => {
|
|
16
|
+
while (pending.length < WINDOW) {
|
|
17
|
+
const next = iterator.next();
|
|
18
|
+
if (next.done) return;
|
|
19
|
+
const result = Promise.try(load, next.value);
|
|
20
|
+
result.catch(() => {});
|
|
21
|
+
pending.push([next.value, result]);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
fill();
|
|
25
|
+
for (let entry = pending.shift(); entry; entry = pending.shift()) {
|
|
26
|
+
yield entry;
|
|
27
|
+
fill();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { readAhead as t };
|
package/dist/render/compose.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as combineFaceBuffers } from "../compose-
|
|
1
|
+
import { t as combineFaceBuffers } from "../compose-CuIKcRpx.js";
|
|
2
2
|
export { combineFaceBuffers };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as spawnEggTints, i as renderEntityFallback, n as dyedVariantTint, r as renderDyedVariantFallback, t as dyeVariantName } from "../entity-fallback-
|
|
1
|
+
import { a as spawnEggTints, i as renderEntityFallback, n as dyedVariantTint, r as renderDyedVariantFallback, t as dyeVariantName } from "../entity-fallback-BEzCbJq0.js";
|
|
2
2
|
export { dyeVariantName, dyedVariantTint, renderDyedVariantFallback, renderEntityFallback, spawnEggTints };
|
package/dist/render/face.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as faceMaxZ, r as renderFace, t as createShadeCache } from "../face-
|
|
1
|
+
import { n as faceMaxZ, r as renderFace, t as createShadeCache } from "../face-D6SfTISC.js";
|
|
2
2
|
export { createShadeCache, faceMaxZ, renderFace };
|
package/dist/render/geo.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as renderGeo, i as parseGeo, n as geoToFaces, r as nameTokens, t as findGeoForItem } from "../geo-
|
|
1
|
+
import { a as renderGeo, i as parseGeo, n as geoToFaces, r as nameTokens, t as findGeoForItem } from "../geo-BOYYFFQn.js";
|
|
2
2
|
export { findGeoForItem, geoToFaces, nameTokens, parseGeo, renderGeo };
|
package/dist/render/obj.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as renderObjModel, n as parseMtl, r as parseObj, t as materialTexture } from "../obj-
|
|
1
|
+
import { i as renderObjModel, n as parseMtl, r as parseObj, t as materialTexture } from "../obj-NxBaySXt.js";
|
|
2
2
|
export { materialTexture, parseMtl, parseObj, renderObjModel };
|
package/dist/render/pipeline.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as ItemPipeline } from "../pipeline-
|
|
1
|
+
import { t as ItemPipeline } from "../pipeline-CCfkRth7.js";
|
|
2
2
|
export { ItemPipeline };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as drawTexturedTriangle, i as createFaceBuffer, n as clearFaceBuffer, o as phpRound, r as compactFaceBuffer, t as RowCursor } from "../rasterizer-
|
|
1
|
+
import { a as drawTexturedTriangle, i as createFaceBuffer, n as clearFaceBuffer, o as phpRound, r as compactFaceBuffer, t as RowCursor } from "../rasterizer-M9Y7mn-W.js";
|
|
2
2
|
export { RowCursor, clearFaceBuffer, compactFaceBuffer, createFaceBuffer, drawTexturedTriangle, phpRound };
|
package/dist/render/renderer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ItemRenderError, c as renderModel, l as renderModelFrames, o as boxDownscale, s as pointResize } from "../obj-
|
|
1
|
+
import { a as ItemRenderError, c as renderModel, l as renderModelFrames, o as boxDownscale, s as pointResize } from "../obj-NxBaySXt.js";
|
|
2
2
|
export { ItemRenderError, boxDownscale, pointResize, renderModel, renderModelFrames };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { n as ResourceLocator } from "../locator-jDbdUeTd.js";
|
|
2
|
+
import { a as ResourceManager, i as ResourceKindName, s as ResourceDescriptor } from "../manager-Ct0dEOMg.js";
|
|
3
|
+
//#region src/resources/cached.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Remembers directory listings for the lifetime of one render or export.
|
|
6
|
+
*
|
|
7
|
+
* Fallback lookups (mob heads, chests, geo files, sprite fallbacks) scan a
|
|
8
|
+
* whole namespace per item, and every scan re-walked the jar index, re-read
|
|
9
|
+
* the builtin pack from disk and re-deduplicated thousands of locators across
|
|
10
|
+
* layers: one block export listed `minecraft` textures 849 times. The model
|
|
11
|
+
* and texture caches beside it already assume the tree is fixed for the run,
|
|
12
|
+
* so this assumes the same and no more. Reads pass straight through.
|
|
13
|
+
*/
|
|
14
|
+
declare class CachedListingResourceManager implements ResourceManager {
|
|
15
|
+
private readonly inner;
|
|
16
|
+
private readonly listings;
|
|
17
|
+
private namespaces;
|
|
18
|
+
constructor(inner: ResourceManager);
|
|
19
|
+
getResource(kind: ResourceKindName, locator: ResourceLocator): Promise<Buffer | null>;
|
|
20
|
+
getAllResources(kind: ResourceKindName, locator: ResourceLocator): Promise<Buffer[]>;
|
|
21
|
+
hasResource(kind: ResourceKindName, locator: ResourceLocator): Promise<boolean>;
|
|
22
|
+
listResources(kind: ResourceKindName, namespace: string): Promise<ResourceLocator[]>;
|
|
23
|
+
listNamespaces(): Promise<string[]>;
|
|
24
|
+
describe(): ResourceDescriptor | null;
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { CachedListingResourceManager };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/resources/read-ahead.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Each item paired with its load, already started, in the order given; a fixed number of loads run
|
|
4
|
+
* ahead of the one the caller is awaiting.
|
|
5
|
+
*
|
|
6
|
+
* Whole-jar sweeps and atlas builds awaited one entry at a time, so every read paid its disk round trip
|
|
7
|
+
* and decode in series. The caller still awaits each load in order, so results, progress and the first
|
|
8
|
+
* failure land exactly where the one-at-a-time loop put them.
|
|
9
|
+
*/
|
|
10
|
+
declare function readAhead<Item, Result>(items: Iterable<Item>, load: (item: Item) => Promise<Result>): Generator<[Item, Promise<Result>]>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { readAhead };
|