@nodecraft/rendermite 1.7.1 → 1.7.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.
- package/dist/atlas/registry.d.ts +2 -2
- package/dist/atlas/sources.d.ts +1 -1
- package/dist/{atlas-pack-D8745_wo.d.ts → atlas-pack-C56gzqAg.d.ts} +1 -1
- package/dist/{blend-eT64Z6qm.d.ts → blend-C5UYzink.d.ts} +1 -1
- package/dist/{block-entities-CPQeb5dV.js → block-entities-C807EY2I.js} +25 -8
- package/dist/blocks/atlas-pack.d.ts +1 -1
- package/dist/blocks/block-entities.d.ts +1 -1
- package/dist/blocks/block-entities.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 +2 -2
- package/dist/blocks/entities.js +1 -1
- package/dist/blocks/entity-models.d.ts +1 -1
- package/dist/blocks/export.js +1 -1
- package/dist/blocks/geo-blocks.d.ts +1 -1
- package/dist/blocks/item-sprites.d.ts +2 -2
- package/dist/blocks/item-sprites.js +1 -1
- package/dist/blocks/obj-mesh.js +1 -1
- package/dist/blocks/pack-format.d.ts +1 -1
- package/dist/blocks/sprite-sheet.d.ts +3 -3
- package/dist/blocks/tints.d.ts +1 -1
- package/dist/{cache-Cr2ON3RQ.js → cache-D-_gSxhp.js} +6 -0
- package/dist/{cli-CpTNd7pv.js → cli-BvKFacki.js} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{encode-Cf8hI5OY.d.ts → encode-Br_vPrd8.d.ts} +1 -1
- package/dist/{ender-storage-C8i6Rxlq.js → ender-storage-Dgomp6r2.js} +1 -1
- package/dist/entities/geo-model.d.ts +1 -1
- package/dist/{entities-DubtdM11.js → entities-rQ4TZjEo.js} +1 -1
- package/dist/{entity-fallback-BRMFKPlM.js → entity-fallback-BucEf6WB.js} +4 -4
- package/dist/{entity-textures-4XXT8jVI.js → entity-textures-DG6NUNyp.js} +67 -2
- package/dist/{export-RUcb-TdF.js → export-DFEIL7yt.js} +11 -11
- package/dist/{face-1cIObOfs.d.ts → face-DqEd9G_U.d.ts} +2 -2
- package/dist/{geo-BjvgFB90.d.ts → geo-C9QYeLVN.d.ts} +3 -3
- package/dist/index.d.ts +9 -9
- package/dist/index.js +6 -6
- package/dist/{item-sprites-CnCH8YFv.js → item-sprites-CwiEBEAJ.js} +1 -1
- package/dist/{loader-DUlx29PC.d.ts → loader-59_eMa8e.d.ts} +10 -0
- package/dist/{loader-C18GpurU.js → loader-CsgtBuBo.js} +22 -1
- package/dist/{loader-C-NuJaEi.js → loader-qOH0Jynq.js} +1 -1
- package/dist/models/loader.js +1 -1
- package/dist/{obj-LWuJIAIM.js → obj-DPEK_xee.js} +1 -1
- package/dist/{obj-mesh-CZsmCk-p.js → obj-mesh-BFhtTBXX.js} +1 -1
- package/dist/output/encode.d.ts +1 -1
- package/dist/overlay-BdHHd5WR.js +49 -0
- package/dist/{pack-format-D5IgQjcD.d.ts → pack-format-Baoc_aSZ.d.ts} +1 -1
- package/dist/pack.d.ts +2 -2
- package/dist/{pipeline-CWRQQ9DM.js → pipeline-Cci24Kb4.js} +4 -4
- package/dist/{pipeline-C7pN0yko.d.ts → pipeline-DFuQa8ZT.d.ts} +2 -2
- package/dist/{rasterizer-BFAHGtdT.d.ts → rasterizer-C2wgJZ6J.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 +4 -4
- package/dist/render/entity-fallback.js +1 -1
- package/dist/render/face.d.ts +1 -1
- package/dist/render/fluid-bucket.d.ts +1 -1
- package/dist/render/geo.d.ts +1 -1
- package/dist/render/legacy-tints.d.ts +2 -2
- package/dist/render/obj.d.ts +3 -3
- package/dist/render/obj.js +1 -1
- 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/renderer.js +1 -1
- package/dist/render/tints.d.ts +1 -1
- package/dist/{renderer-CjreM6tk.d.ts → renderer-DbUmTFDb.d.ts} +3 -3
- package/dist/resources/cache.d.ts +1 -0
- package/dist/resources/cache.js +1 -1
- package/dist/resources/entity-textures.d.ts +39 -2
- package/dist/resources/entity-textures.js +2 -2
- package/dist/{run-CQXJCo8u.js → run--oW_h01E.js} +1 -1
- package/dist/{run-BgXZp8VQ.d.ts → run-CLjF0N2d.d.ts} +1 -1
- package/dist/run.d.ts +1 -1
- package/dist/run.js +1 -1
- package/dist/{sources-BFuYpSSD.d.ts → sources-DYYiyvRW.d.ts} +1 -1
- package/dist/textures/loader.d.ts +1 -1
- package/dist/textures/loader.js +1 -1
- package/dist/textures/overlay.d.ts +12 -0
- package/dist/textures/overlay.js +2 -0
- package/dist/{tints-DoBv5S9v.d.ts → tints-CQX8a1F0.d.ts} +1 -1
- package/dist/{tints-iPf8hSKX.d.ts → tints-uLl1CIkC.d.ts} +2 -2
- package/dist/workers/render-worker.d.ts +1 -1
- package/dist/workers/render-worker.js +1 -1
- package/package.json +1 -1
package/dist/atlas/registry.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as ResourceLocator } from "../locator-jDbdUeTd.js";
|
|
2
2
|
import { a as ResourceManager } from "../manager-exOIcdyx.js";
|
|
3
|
-
import { r as Texture } from "../loader-
|
|
4
|
-
import { t as AtlasResolver } from "../sources-
|
|
3
|
+
import { r as Texture } from "../loader-59_eMa8e.js";
|
|
4
|
+
import { t as AtlasResolver } from "../sources-DYYiyvRW.js";
|
|
5
5
|
//#region src/atlas/registry.d.ts
|
|
6
6
|
declare function loadAtlasResolver(resources: ResourceManager, loadTexture: (locator: ResourceLocator) => Promise<Texture | null>, onWarning?: (message: string) => void): Promise<AtlasResolver>;
|
|
7
7
|
//#endregion
|
package/dist/atlas/sources.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as HasTexture, c as SingleAtlasSource, d as parseAtlasSources, i as DirectoryAtlasSource, l as UnstitchAtlasSource, n as AtlasSource, o as PalettedPermutationsSource, r as AtlasSourceError, s as ResolvedSprite, t as AtlasResolver, u as createAtlasResolver } from "../sources-
|
|
1
|
+
import { a as HasTexture, c as SingleAtlasSource, d as parseAtlasSources, i as DirectoryAtlasSource, l as UnstitchAtlasSource, n as AtlasSource, o as PalettedPermutationsSource, r as AtlasSourceError, s as ResolvedSprite, t as AtlasResolver, u as createAtlasResolver } from "../sources-DYYiyvRW.js";
|
|
2
2
|
export { AtlasResolver, AtlasSource, AtlasSourceError, DirectoryAtlasSource, HasTexture, PalettedPermutationsSource, ResolvedSprite, SingleAtlasSource, UnstitchAtlasSource, createAtlasResolver, parseAtlasSources };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { n as ResourceLocator } from "./locator-COMEtEn9.js";
|
|
2
|
-
import {
|
|
2
|
+
import { t as overlaySheets } from "./overlay-BdHHd5WR.js";
|
|
3
|
+
import { c as findEntityTexture, d as findMobTexture, l as findFluidSibling, m as resolveChestSheets, n as HEAD_LAYOUTS, o as findBedTexture, p as layerAccentSheet, t as DYE_COLORS, u as findFluidStill } from "./entity-textures-DG6NUNyp.js";
|
|
3
4
|
//#region src/blocks/block-entities.ts
|
|
4
5
|
/**
|
|
5
6
|
* Geometry for blocks the game draws from Java rather than from a model.
|
|
@@ -172,14 +173,14 @@ async function chestGeometry(blockId, context) {
|
|
|
172
173
|
const [namespace, name] = blockId.split(":", 2);
|
|
173
174
|
const variant = CHEST_VARIANTS[blockId];
|
|
174
175
|
const searchable = /chest|crate/.test(name) && !name.includes("chestplate");
|
|
175
|
-
const found = variant === void 0 && searchable ? await
|
|
176
|
-
const sheet = variant === void 0 ? found?.toString() : CHEST_SHEETS[variant];
|
|
176
|
+
const found = variant === void 0 && searchable ? await resolveChestSheets(context.resources, context.textures, namespace, name) : null;
|
|
177
|
+
const sheet = variant === void 0 ? found?.sheet.toString() : CHEST_SHEETS[variant];
|
|
177
178
|
if (sheet === void 0) return null;
|
|
178
179
|
const single = variant === void 0 ? {
|
|
179
180
|
model: "renderchest:item/chest",
|
|
180
181
|
textures: { texture: sheet }
|
|
181
182
|
} : { model: `renderchest:item/chest/${variant}` };
|
|
182
|
-
const [left, right] = await Promise.all([
|
|
183
|
+
const [left, right] = await Promise.all(["left", "right"].map((side) => found?.accent && found.base ? halfPair(found.base, found.accent, side, context) : halfSheet(sheet, side, context)));
|
|
183
184
|
if (left === null || right === null) return {
|
|
184
185
|
shapes: [single],
|
|
185
186
|
orient: CHEST_AUTHORED
|
|
@@ -207,17 +208,33 @@ async function chestGeometry(blockId, context) {
|
|
|
207
208
|
/**
|
|
208
209
|
* The wider sheet for one half of a double chest. Vanilla suffixes the base
|
|
209
210
|
* name (`normal` → `normal_left`); quark files the halves beside it instead
|
|
210
|
-
* (`acacia/normal` → `acacia/left`)
|
|
211
|
+
* (`acacia/normal` → `acacia/left`); Sophisticated Storage prefixes the leaf
|
|
212
|
+
* (`oak` → `left_oak`). All three are common enough to try.
|
|
211
213
|
*/
|
|
212
214
|
async function halfSheet(sheet, side, context) {
|
|
213
215
|
const base = ResourceLocator.parse(sheet);
|
|
214
|
-
const
|
|
215
|
-
|
|
216
|
+
const cut = base.path.lastIndexOf("/");
|
|
217
|
+
const directory = cut === -1 ? "" : `${base.path.slice(0, cut)}/`;
|
|
218
|
+
const sibling = `${directory}${side}`;
|
|
219
|
+
const prefixed = `${directory}${side}_${base.path.slice(cut + 1)}`;
|
|
220
|
+
for (const path of [
|
|
221
|
+
`${base.path}_${side}`,
|
|
222
|
+
sibling,
|
|
223
|
+
prefixed
|
|
224
|
+
]) {
|
|
216
225
|
const candidate = new ResourceLocator(base.namespace, path);
|
|
217
226
|
if (await context.resources.hasResource("texture", candidate)) return candidate.toString();
|
|
218
227
|
}
|
|
219
228
|
return null;
|
|
220
229
|
}
|
|
230
|
+
/** The wider half of a chest whose single form was an accent over a base sheet. */
|
|
231
|
+
async function halfPair(base, accent, side, context) {
|
|
232
|
+
const [baseHalf, accentHalf] = await Promise.all([halfSheet(base.toString(), side, context), halfSheet(accent.toString(), side, context)]);
|
|
233
|
+
if (baseHalf === null) return null;
|
|
234
|
+
if (accentHalf === null) return baseHalf;
|
|
235
|
+
const composed = await overlaySheets(context.textures, ResourceLocator.parse(baseHalf), ResourceLocator.parse(accentHalf));
|
|
236
|
+
return composed === null ? baseHalf : composed.toString();
|
|
237
|
+
}
|
|
221
238
|
/**
|
|
222
239
|
* A banner's colour is a tint over one greyscale sheet, not 16 textures, so the
|
|
223
240
|
* two forms share a model each and the tint table carries the dye.
|
|
@@ -369,7 +386,7 @@ async function shulkerGeometry(blockId, context) {
|
|
|
369
386
|
return {
|
|
370
387
|
shapes: [{
|
|
371
388
|
model: "renderchest:item/shulker_box",
|
|
372
|
-
textures: { texture: candidate
|
|
389
|
+
textures: { texture: (candidate === null ? null : await layerAccentSheet(context.resources, context.textures, candidate))?.sheet.toString() ?? "minecraft:entity/shulker/shulker" }
|
|
373
390
|
}],
|
|
374
391
|
orient: { kind: "facing6" }
|
|
375
392
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PackedRect, i as PackedPage, n as PackOptions, o as packAtlas, r as PackedAtlas, t as PackEntry } from "../atlas-pack-
|
|
1
|
+
import { a as PackedRect, i as PackedPage, n as PackOptions, o as packAtlas, r as PackedAtlas, t as PackEntry } from "../atlas-pack-C56gzqAg.js";
|
|
2
2
|
export { PackEntry, PackOptions, PackedAtlas, PackedPage, PackedRect, packAtlas };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as ResourceManager } from "../manager-exOIcdyx.js";
|
|
2
|
-
import { i as TextureLoader } from "../loader-
|
|
2
|
+
import { i as TextureLoader } from "../loader-59_eMa8e.js";
|
|
3
3
|
import { t as ModelLoader } from "../loader-DSir1-P0.js";
|
|
4
4
|
//#region src/blocks/block-entities.d.ts
|
|
5
5
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as blockEntityGeometry, r as synthesizeVariants, t as INVISIBLE_BLOCKS } from "../block-entities-
|
|
1
|
+
import { n as blockEntityGeometry, r as synthesizeVariants, t as INVISIBLE_BLOCKS } from "../block-entities-C807EY2I.js";
|
|
2
2
|
export { INVISIBLE_BLOCKS, blockEntityGeometry, synthesizeVariants };
|
package/dist/blocks/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as runBlocksCli } from "../cli-
|
|
1
|
+
import { t as runBlocksCli } from "../cli-BvKFacki.js";
|
|
2
2
|
export { runBlocksCli };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as ResourceManager } from "../manager-exOIcdyx.js";
|
|
2
|
-
import { f as BlockPackModel } from "../pack-format-
|
|
2
|
+
import { f as BlockPackModel } from "../pack-format-Baoc_aSZ.js";
|
|
3
3
|
//#region src/blocks/ender-storage.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Ender Storage feeds this OBJ through CodeChickenLib's `swapYZ`, translates it almost exactly onto
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as enderStorageBlockModel } from "../ender-storage-
|
|
1
|
+
import { t as enderStorageBlockModel } from "../ender-storage-Dgomp6r2.js";
|
|
2
2
|
export { enderStorageBlockModel };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as ResourceManager } from "../manager-exOIcdyx.js";
|
|
2
|
-
import { i as TextureLoader } from "../loader-
|
|
3
|
-
import { S as EntityPackEntry } from "../pack-format-
|
|
2
|
+
import { i as TextureLoader } from "../loader-59_eMa8e.js";
|
|
3
|
+
import { S as EntityPackEntry } from "../pack-format-Baoc_aSZ.js";
|
|
4
4
|
//#region src/blocks/entities.d.ts
|
|
5
5
|
interface EntityPackResult {
|
|
6
6
|
entities: Record<string, EntityPackEntry>;
|
package/dist/blocks/entities.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as entityTypesOf, t as collectEntities } from "../entities-
|
|
1
|
+
import { n as entityTypesOf, t as collectEntities } from "../entities-rQ4TZjEo.js";
|
|
2
2
|
export { collectEntities, entityTypesOf };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as ResourceManager } from "../manager-exOIcdyx.js";
|
|
2
|
-
import { C as EntityPackModel, T as EquipmentPack } from "../pack-format-
|
|
2
|
+
import { C as EntityPackModel, T as EquipmentPack } from "../pack-format-Baoc_aSZ.js";
|
|
3
3
|
import { t as ClassSource } from "../jar-classes-CSRrPAUy.js";
|
|
4
4
|
import { t as Mappings } from "../mappings-DxX4KoZl.js";
|
|
5
5
|
import { t as ModelCode } from "../model-code-BY44ao27.js";
|
package/dist/blocks/export.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as exportBlockPack } from "../export-
|
|
1
|
+
import { t as exportBlockPack } from "../export-DFEIL7yt.js";
|
|
2
2
|
export { exportBlockPack };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as ResourceManager } from "../manager-exOIcdyx.js";
|
|
2
|
-
import { f as BlockPackModel } from "../pack-format-
|
|
2
|
+
import { f as BlockPackModel } from "../pack-format-Baoc_aSZ.js";
|
|
3
3
|
//#region src/blocks/geo-blocks.d.ts
|
|
4
4
|
interface GeoBlockOverride {
|
|
5
5
|
model: BlockPackModel;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as ResourceManager } from "../manager-exOIcdyx.js";
|
|
2
|
-
import { i as TextureLoader } from "../loader-
|
|
2
|
+
import { i as TextureLoader } from "../loader-59_eMa8e.js";
|
|
3
3
|
import { t as ModelLoader } from "../loader-DSir1-P0.js";
|
|
4
|
-
import { D as ItemPackEntry } from "../pack-format-
|
|
4
|
+
import { D as ItemPackEntry } from "../pack-format-Baoc_aSZ.js";
|
|
5
5
|
//#region src/blocks/item-sprites.d.ts
|
|
6
6
|
interface ItemSpriteFailure {
|
|
7
7
|
id: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as collectItemSprites } from "../item-sprites-
|
|
1
|
+
import { t as collectItemSprites } from "../item-sprites-CwiEBEAJ.js";
|
|
2
2
|
export { collectItemSprites };
|
package/dist/blocks/obj-mesh.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as buildObjMesh, t as ObjMeshError } from "../obj-mesh-
|
|
1
|
+
import { n as buildObjMesh, t as ObjMeshError } from "../obj-mesh-BFhtTBXX.js";
|
|
2
2
|
export { ObjMeshError, buildObjMesh };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as EntityPackModel, D as ItemPackEntry, E as EquipmentSlot, O as ItemPackLayer, S as EntityPackEntry, T as EquipmentPack, _ as BlockPackTintsFile, a as BlockPackBlockStatesFile, b as EntityPackCube, c as BlockPackEntityModelsFile, 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, s as BlockPackEntitiesFile, t as BlockPackAtlasFile, u as BlockPackItemsFile, v as BlockPackVariant, w as EntityPackPart, x as EntityPackCubeFace, y as EQUIPMENT_SLOTS } from "../pack-format-
|
|
1
|
+
import { C as EntityPackModel, D as ItemPackEntry, E as EquipmentSlot, O as ItemPackLayer, S as EntityPackEntry, T as EquipmentPack, _ as BlockPackTintsFile, a as BlockPackBlockStatesFile, b as EntityPackCube, c as BlockPackEntityModelsFile, 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, s as BlockPackEntitiesFile, t as BlockPackAtlasFile, u as BlockPackItemsFile, v as BlockPackVariant, w as EntityPackPart, x as EntityPackCubeFace, y as EQUIPMENT_SLOTS } from "../pack-format-Baoc_aSZ.js";
|
|
2
2
|
export { BlockPackAtlasFile, BlockPackAtlasPage, BlockPackBiomesFile, BlockPackBlockState, BlockPackBlockStatesFile, BlockPackElement, BlockPackEntitiesFile, BlockPackEntityModelsFile, BlockPackFace, BlockPackItemsFile, BlockPackMetaFile, BlockPackModel, BlockPackModelsFile, BlockPackRenderLayer, BlockPackSprite, BlockPackSpriteFrame, BlockPackTintsFile, BlockPackVariant, EQUIPMENT_SLOTS, EntityPackCube, EntityPackCubeFace, EntityPackEntry, EntityPackModel, EntityPackPart, EquipmentPack, EquipmentSlot, ItemPackEntry, ItemPackLayer };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as TextureLoader, r as Texture } from "../loader-
|
|
2
|
-
import { i as PackedPage } from "../atlas-pack-
|
|
3
|
-
import { h as BlockPackSprite, m as BlockPackRenderLayer } from "../pack-format-
|
|
1
|
+
import { i as TextureLoader, r as Texture } from "../loader-59_eMa8e.js";
|
|
2
|
+
import { i as PackedPage } from "../atlas-pack-C56gzqAg.js";
|
|
3
|
+
import { h as BlockPackSprite, m as BlockPackRenderLayer } from "../pack-format-Baoc_aSZ.js";
|
|
4
4
|
//#region src/blocks/sprite-sheet.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Vanilla's own id for the missing-texture sprite. A face whose texture does
|
package/dist/blocks/tints.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as buildBlockTints, i as UNREGISTERED_TINTS, n as BlockTintPack, r as BuiltBlockTints, t as BlockTint } from "../tints-
|
|
1
|
+
import { a as buildBlockTints, i as UNREGISTERED_TINTS, n as BlockTintPack, r as BuiltBlockTints, t as BlockTint } from "../tints-CQX8a1F0.js";
|
|
2
2
|
export { BlockTint, BlockTintPack, BuiltBlockTints, UNREGISTERED_TINTS, buildBlockTints };
|
|
@@ -56,6 +56,12 @@ var LruCache = class {
|
|
|
56
56
|
this.weights.set(key, size);
|
|
57
57
|
this.evict();
|
|
58
58
|
}
|
|
59
|
+
delete(key) {
|
|
60
|
+
if (!this.entries.has(key)) return;
|
|
61
|
+
this.weight -= this.weights.get(key) ?? 0;
|
|
62
|
+
this.weights.delete(key);
|
|
63
|
+
this.entries.delete(key);
|
|
64
|
+
}
|
|
59
65
|
clear() {
|
|
60
66
|
this.entries.clear();
|
|
61
67
|
this.weights.clear();
|
|
@@ -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-BNibYkmI.js";
|
|
3
|
-
import { t as exportBlockPack } from "./export-
|
|
3
|
+
import { t as exportBlockPack } from "./export-DFEIL7yt.js";
|
|
4
4
|
import { n as layeredClasses, t as JarClassReader } from "./jar-classes-3GVCJZT7.js";
|
|
5
5
|
import { n as prepareModResources } from "./prepare-Myd_ec4v.js";
|
|
6
6
|
import { t as downloadClientJar } from "./download-1wAfrGKx.js";
|
package/dist/cli.js
CHANGED
|
@@ -6,8 +6,8 @@ import { t as curatedModelOverrides } from "./models-CZjCOjs4.js";
|
|
|
6
6
|
import { n as harvestTintOverrides, t as curatedTintOverrides } from "./tints-BspVCz2G.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-D49Gu4Lv.js";
|
|
9
|
-
import { t as runBlocksCli } from "./cli-
|
|
10
|
-
import { t as run } from "./run
|
|
9
|
+
import { t as runBlocksCli } from "./cli-BvKFacki.js";
|
|
10
|
+
import { t as run } from "./run--oW_h01E.js";
|
|
11
11
|
import path from "node:path";
|
|
12
12
|
import os from "node:os";
|
|
13
13
|
import { parseArgs } from "node:util";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as ResourceLocator } from "./locator-COMEtEn9.js";
|
|
2
|
-
import { r as parseObj } from "./obj-
|
|
2
|
+
import { r as parseObj } from "./obj-DPEK_xee.js";
|
|
3
3
|
//#region src/blocks/ender-storage.ts
|
|
4
4
|
/** Geometry for Ender Storage blocks whose shipped JSON model is only an empty Java-renderer hook. */
|
|
5
5
|
const BLOCK_UNITS = 16;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as ResourceLocator } from "./locator-COMEtEn9.js";
|
|
2
|
-
import { d as
|
|
2
|
+
import { d as findMobTexture, f as isOverlayPath, h as tokens } from "./entity-textures-DG6NUNyp.js";
|
|
3
3
|
//#region src/blocks/entities.ts
|
|
4
4
|
/**
|
|
5
5
|
* The entity registry, and one colour per entity.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as ResourceLocator } from "./locator-COMEtEn9.js";
|
|
2
|
-
import {
|
|
3
|
-
import { c as renderModel } from "./obj-
|
|
2
|
+
import { c as findEntityTexture, d as findMobTexture, h as tokens, m as resolveChestSheets, n as HEAD_LAYOUTS, o as findBedTexture, p as layerAccentSheet, t as DYE_COLORS } from "./entity-textures-DG6NUNyp.js";
|
|
3
|
+
import { c as renderModel } from "./obj-DPEK_xee.js";
|
|
4
4
|
//#region src/render/entity-fallback.ts
|
|
5
5
|
/**
|
|
6
6
|
* Heuristic rendering for mod items that parent `builtin/entity` — chests,
|
|
@@ -219,7 +219,7 @@ async function renderEntityFallback(id, models, textures, resources, options) {
|
|
|
219
219
|
if (searchName.includes("chest") && !searchName.includes("chestplate") || name.endsWith("_crate")) {
|
|
220
220
|
const variant = searchName.includes("ender") ? "ender" : searchName.includes("trapped") ? "trapped" : "normal";
|
|
221
221
|
const candidates = [[`renderchest:item/chest/${variant === "normal" ? "chest" : `${variant}_chest`}`, null], ["renderchest:item/chest", `minecraft:entity/chest/${variant}`]];
|
|
222
|
-
const modTexture = await
|
|
222
|
+
const modTexture = (await resolveChestSheets(resources, textures, locator.namespace, name))?.sheet;
|
|
223
223
|
for (const [modelPath, defaultTexture] of candidates) try {
|
|
224
224
|
const model = await models.load(modelPath);
|
|
225
225
|
let rebound = model;
|
|
@@ -244,7 +244,7 @@ async function renderEntityFallback(id, models, textures, resources, options) {
|
|
|
244
244
|
const model = await models.load("renderchest:item/shulker_box").catch(() => null);
|
|
245
245
|
if (!model) return null;
|
|
246
246
|
const candidate = await findEntityTexture(resources, locator.namespace, name, "shulker");
|
|
247
|
-
const sheet = candidate
|
|
247
|
+
const sheet = (candidate === null ? null : await layerAccentSheet(resources, textures, candidate))?.sheet ?? ResourceLocator.parse("minecraft:entity/shulker/shulker");
|
|
248
248
|
return renderModel(withTexture(model, "texture", sheet), textures, options).catch(() => null);
|
|
249
249
|
}
|
|
250
250
|
if (name.endsWith("banner")) try {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { n as ResourceLocator } from "./locator-COMEtEn9.js";
|
|
2
|
+
import { t as overlaySheets } from "./overlay-BdHHd5WR.js";
|
|
2
3
|
//#region src/resources/entity-textures.ts
|
|
3
4
|
/**
|
|
4
5
|
* Finding a mod's own entity sheet for a thing the game draws in Java.
|
|
@@ -38,6 +39,10 @@ const SKIP_TOKENS = /* @__PURE__ */ new Set([
|
|
|
38
39
|
function tokens(name) {
|
|
39
40
|
return name.split(/[./_]/).filter((token) => token.length > 1);
|
|
40
41
|
}
|
|
42
|
+
/** Whether a sheet is the oak one, which stands in where a wood is unknowable. */
|
|
43
|
+
function isOakSheet(locator) {
|
|
44
|
+
return locator.path.split("/").pop() === "oak";
|
|
45
|
+
}
|
|
41
46
|
/** Vanilla DyeColor diffuse colors, keyed by the dye name mods prefix with. */
|
|
42
47
|
const DYE_COLORS = {
|
|
43
48
|
white: 16383998,
|
|
@@ -127,7 +132,8 @@ async function findChestTexture(resources, namespace, itemName) {
|
|
|
127
132
|
for (const token of wanted) if (candidate.includes(token)) score++;
|
|
128
133
|
if (locator.path.endsWith(`/${itemName}`) || locator.path.endsWith(`/${itemName}_0`)) score++;
|
|
129
134
|
if (wanted.length > 0 && score === 0) continue;
|
|
130
|
-
|
|
135
|
+
const tied = score === bestScore && candidate.length === bestNoise;
|
|
136
|
+
if (best === null || score > bestScore || score === bestScore && candidate.length < bestNoise || tied && isOakSheet(locator) && !isOakSheet(best)) {
|
|
131
137
|
best = locator;
|
|
132
138
|
bestScore = score;
|
|
133
139
|
bestNoise = candidate.length;
|
|
@@ -157,6 +163,65 @@ async function findBedTexture(resources, namespace, itemName) {
|
|
|
157
163
|
return best;
|
|
158
164
|
}
|
|
159
165
|
/**
|
|
166
|
+
* The sheet to draw with, given the best match for a name. One that covers its
|
|
167
|
+
* own sheet is the thing itself; one that does not is a trim the game
|
|
168
|
+
* composites over a base at draw time — Sophisticated Storage's gold chest is
|
|
169
|
+
* `entity/chest/oak` with `entity/chest/gold_tier` over it — and binding the
|
|
170
|
+
* trim alone leaves floating corners where the block should be.
|
|
171
|
+
*
|
|
172
|
+
* Null when the match is a trim with nothing to lay it over, which leaves the
|
|
173
|
+
* caller's own fallback (vanilla's sheet, or the match unchanged) to decide.
|
|
174
|
+
*/
|
|
175
|
+
async function layerAccentSheet(resources, textures, found) {
|
|
176
|
+
if (await coversSheet(textures, found)) return {
|
|
177
|
+
sheet: found,
|
|
178
|
+
base: null,
|
|
179
|
+
accent: null
|
|
180
|
+
};
|
|
181
|
+
const base = await findAccentBaseSheet(resources, textures, found);
|
|
182
|
+
if (base === null) return null;
|
|
183
|
+
const composed = await overlaySheets(textures, base, found);
|
|
184
|
+
return composed === null ? {
|
|
185
|
+
sheet: base,
|
|
186
|
+
base: null,
|
|
187
|
+
accent: null
|
|
188
|
+
} : {
|
|
189
|
+
sheet: composed,
|
|
190
|
+
base,
|
|
191
|
+
accent: found
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* The sheet to draw a mod's chest with. A trim with no covering sibling is
|
|
196
|
+
* still returned: it is what the search found, and a faint chest beats
|
|
197
|
+
* reporting the block as having no geometry at all.
|
|
198
|
+
*/
|
|
199
|
+
async function resolveChestSheets(resources, textures, namespace, itemName) {
|
|
200
|
+
const found = await findChestTexture(resources, namespace, itemName);
|
|
201
|
+
if (found === null) return null;
|
|
202
|
+
return await layerAccentSheet(resources, textures, found) ?? {
|
|
203
|
+
sheet: found,
|
|
204
|
+
base: null,
|
|
205
|
+
accent: null
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* The sheet an accent decorates: a covering sibling in the accent's own
|
|
210
|
+
* directory, which is where a mod keeps the two halves of one chest
|
|
211
|
+
* (`entity/chest/gold_tier` beside `entity/chest/oak`).
|
|
212
|
+
*
|
|
213
|
+
* Oak wins a tie because the wood is block entity data a static export cannot
|
|
214
|
+
* read — twelve wood sheets are pixel-identical in coverage, so without a
|
|
215
|
+
* stated preference the choice fell to listing order and a plain chest came
|
|
216
|
+
* out acacia.
|
|
217
|
+
*/
|
|
218
|
+
async function findAccentBaseSheet(resources, textures, accent) {
|
|
219
|
+
const directory = accent.path.includes("/") ? accent.path.slice(0, accent.path.lastIndexOf("/") + 1) : "";
|
|
220
|
+
const siblings = (await resources.listResources("texture", accent.namespace)).filter((locator) => locator.path.startsWith(directory) && locator.path.slice(directory.length).includes("/") === false && locator.path !== accent.path && !tokens(locator.path).some((token) => SKIP_TOKENS.has(token))).toSorted((left, right) => Number(isOakSheet(right)) - Number(isOakSheet(left)) || left.path.localeCompare(right.path));
|
|
221
|
+
for (const sibling of siblings) if (await coversSheet(textures, sibling)) return sibling;
|
|
222
|
+
return null;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
160
225
|
* Whether a sheet is a whole skin rather than an overlay. Vanilla's shulker
|
|
161
226
|
* covers 44% of its sheet; a tier trim covers under 5%.
|
|
162
227
|
*/
|
|
@@ -229,4 +294,4 @@ async function findFluidSibling(resources, still, suffixes) {
|
|
|
229
294
|
return null;
|
|
230
295
|
}
|
|
231
296
|
//#endregion
|
|
232
|
-
export {
|
|
297
|
+
export { findAccentBaseSheet as a, findEntityTexture as c, findMobTexture as d, isOverlayPath as f, tokens as h, coversSheet as i, findFluidSibling as l, resolveChestSheets as m, HEAD_LAYOUTS as n, findBedTexture as o, layerAccentSheet as p, OVERLAY_DIRECTORIES as r, findChestTexture as s, DYE_COLORS as t, findFluidStill as u };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { r as buildBiomeClimates } from "./biomes-5ZwYxMYe.js";
|
|
2
2
|
import { n as ResourceLocator } from "./locator-COMEtEn9.js";
|
|
3
|
-
import { n as blockEntityGeometry, r as synthesizeVariants, t as INVISIBLE_BLOCKS } from "./block-entities-
|
|
3
|
+
import { n as blockEntityGeometry, r as synthesizeVariants, t as INVISIBLE_BLOCKS } from "./block-entities-C807EY2I.js";
|
|
4
4
|
import { a as parseBlockState, n as collectModels } from "./blockstate-eval-CV_LwUwj.js";
|
|
5
|
-
import { a as salvageJson, i as resolveTexture, t as ModelLoader } from "./loader-
|
|
6
|
-
import { t as enderStorageBlockModel } from "./ender-storage-
|
|
7
|
-
import { t as collectEntities } from "./entities-
|
|
5
|
+
import { a as salvageJson, i as resolveTexture, t as ModelLoader } from "./loader-qOH0Jynq.js";
|
|
6
|
+
import { t as enderStorageBlockModel } from "./ender-storage-Dgomp6r2.js";
|
|
7
|
+
import { t as collectEntities } from "./entities-rQ4TZjEo.js";
|
|
8
8
|
import { n as collectEntityGeometry } from "./entity-models-DUKiHpn1.js";
|
|
9
9
|
import { t as geoBlockModel } from "./geo-blocks-BcSEBhko.js";
|
|
10
10
|
import { n as discoverItems } from "./discovery-CD0QqxSF.js";
|
|
11
|
-
import { t as collectItemSprites } from "./item-sprites-
|
|
12
|
-
import { n as buildObjMesh } from "./obj-mesh-
|
|
11
|
+
import { t as collectItemSprites } from "./item-sprites-CwiEBEAJ.js";
|
|
12
|
+
import { n as buildObjMesh } from "./obj-mesh-BFhtTBXX.js";
|
|
13
13
|
import { n as buildSpriteSheet, t as MISSING_SPRITE } from "./sprite-sheet-LQAEtGkp.js";
|
|
14
14
|
import { n as buildBlockTints, t as UNREGISTERED_TINTS } from "./tints-Cl0r-Ol3.js";
|
|
15
15
|
import { t as loadAtlasResolver } from "./registry-DlduyjtM.js";
|
|
16
16
|
import { n as LayeredResourceManager, t as FolderResourceManager } from "./manager-BNibYkmI.js";
|
|
17
|
-
import { n as TextureLoader } from "./loader-
|
|
17
|
+
import { n as TextureLoader } from "./loader-CsgtBuBo.js";
|
|
18
18
|
import path from "node:path";
|
|
19
19
|
import { createHash } from "node:crypto";
|
|
20
20
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
@@ -489,11 +489,11 @@ async function exportBlockPack(options) {
|
|
|
489
489
|
const cases = [];
|
|
490
490
|
const substituted = [];
|
|
491
491
|
for (const shape of geometry.shapes) {
|
|
492
|
-
const
|
|
492
|
+
const bindings = {
|
|
493
493
|
...geometry.textures,
|
|
494
494
|
...shape.textures
|
|
495
495
|
};
|
|
496
|
-
if ((await Promise.all(Object.values(
|
|
496
|
+
if ((await Promise.all(Object.values(bindings).map(async (texture) => textures.has(ResourceLocator.parse(texture))))).includes(false)) continue;
|
|
497
497
|
let resolved;
|
|
498
498
|
try {
|
|
499
499
|
resolved = await models.load(shape.model);
|
|
@@ -509,7 +509,7 @@ async function exportBlockPack(options) {
|
|
|
509
509
|
...resolved,
|
|
510
510
|
textures: {
|
|
511
511
|
...resolved.textures,
|
|
512
|
-
...
|
|
512
|
+
...bindings
|
|
513
513
|
},
|
|
514
514
|
elements: translateElements(resolved.elements, shape.translate)
|
|
515
515
|
};
|
|
@@ -517,7 +517,7 @@ async function exportBlockPack(options) {
|
|
|
517
517
|
const substituteId = `rendermite:block/${ResourceLocator.parse(id).path}${suffix && `_${suffix}`}`;
|
|
518
518
|
const { emitted, sprites, tintIndices } = bakeModel(substituteId, bound, failures);
|
|
519
519
|
if (emitted.elements.length === 0) continue;
|
|
520
|
-
if ((await Promise.all([...sprites].map(async (sprite) => sprite !== "minecraft:missingno" && await
|
|
520
|
+
if ((await Promise.all([...sprites].map(async (sprite) => sprite !== "minecraft:missingno" && await textures.has(ResourceLocator.parse(sprite))))).includes(false)) {
|
|
521
521
|
failures.push({
|
|
522
522
|
id,
|
|
523
523
|
kind: "geometry",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as FloatTexture } from "./blend-
|
|
1
|
+
import { n as FloatTexture } from "./blend-C5UYzink.js";
|
|
2
2
|
import { t as Mat4 } from "./vector-DRKRi4--.js";
|
|
3
3
|
import { n as FaceGeometry } from "./geometry--UzHu1Vh.js";
|
|
4
4
|
import { r as LightSource } from "./lighting-3FGRC3Af.js";
|
|
5
|
-
import { n as FaceBuffer } from "./rasterizer-
|
|
5
|
+
import { n as FaceBuffer } from "./rasterizer-C2wgJZ6J.js";
|
|
6
6
|
//#region src/render/face.d.ts
|
|
7
7
|
interface TintColor {
|
|
8
8
|
r: number;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as ResourceLocator } from "./locator-jDbdUeTd.js";
|
|
2
2
|
import { a as ResourceManager } from "./manager-exOIcdyx.js";
|
|
3
|
-
import { i as TextureLoader } from "./loader-
|
|
4
|
-
import { n as FloatTexture } from "./blend-
|
|
3
|
+
import { i as TextureLoader } from "./loader-59_eMa8e.js";
|
|
4
|
+
import { n as FloatTexture } from "./blend-C5UYzink.js";
|
|
5
5
|
import { n as FaceGeometry } from "./geometry--UzHu1Vh.js";
|
|
6
|
-
import { i as RenderOptions } from "./renderer-
|
|
6
|
+
import { i as RenderOptions } from "./renderer-DbUmTFDb.js";
|
|
7
7
|
//#region src/render/geo.d.ts
|
|
8
8
|
interface GeoCube {
|
|
9
9
|
origin?: number[];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { n as ResourceLocator, t as InvalidResourceLocatorError } from "./locator-jDbdUeTd.js";
|
|
2
2
|
import { a as ResourceManager, i as ResourceKindName, n as LayeredResourceManager, r as ResourceKind, t as FolderResourceManager } from "./manager-exOIcdyx.js";
|
|
3
|
-
import { a as TextureMeta, i as TextureLoader, o as TextureResolutionError, r as Texture, t as AnimatedTexture } from "./loader-
|
|
4
|
-
import { d as parseAtlasSources, n as AtlasSource, r as AtlasSourceError, s as ResolvedSprite, t as AtlasResolver, u as createAtlasResolver } from "./sources-
|
|
5
|
-
import { a as PackedRect, i as PackedPage, n as PackOptions, o as packAtlas, r as PackedAtlas, t as PackEntry } from "./atlas-pack-
|
|
3
|
+
import { a as TextureMeta, i as TextureLoader, o as TextureResolutionError, r as Texture, t as AnimatedTexture } from "./loader-59_eMa8e.js";
|
|
4
|
+
import { d as parseAtlasSources, n as AtlasSource, r as AtlasSourceError, s as ResolvedSprite, t as AtlasResolver, u as createAtlasResolver } from "./sources-DYYiyvRW.js";
|
|
5
|
+
import { a as PackedRect, i as PackedPage, n as PackOptions, o as packAtlas, r as PackedAtlas, t as PackEntry } from "./atlas-pack-C56gzqAg.js";
|
|
6
6
|
import { a as buildBiomeClimates, i as VANILLA_BIOME_CLIMATES, n as BiomeClimatePack, o as parseBiomeClimate, r as DEFAULT_WATER_COLOR, t as BiomeClimate } from "./biomes-CJDJQqJb.js";
|
|
7
7
|
import { a as resolveTexture, n as ModelResolutionError, o as salvageJson, r as ResolvedModel, t as ModelLoader } from "./loader-DSir1-P0.js";
|
|
8
8
|
import { a as BlockStateMultipartCase, d as matchesCondition, f as parseBlockState, i as BlockStateError, l as collectModels, 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";
|
|
9
9
|
import { i as buildObjMesh, n as ObjMesh, r as ObjMeshError, t as MeshGroup } from "./obj-mesh-ydhVfLKs.js";
|
|
10
|
-
import { a as buildBlockTints, i as UNREGISTERED_TINTS, n as BlockTintPack, t as BlockTint } from "./tints-
|
|
10
|
+
import { a as buildBlockTints, i as UNREGISTERED_TINTS, n as BlockTintPack, t as BlockTint } from "./tints-CQX8a1F0.js";
|
|
11
11
|
import { i as exportBlockPack, n as BlockPackResult, r as ExportBlockPackOptions, t as BlockPackFailure } from "./export-B8tPsf4K.js";
|
|
12
12
|
import { s as builtinDynamicResources } from "./generators-BnIzAftW.js";
|
|
13
|
-
import { d as toFloatTexture, n as FloatTexture, u as toByteTexture } from "./blend-
|
|
13
|
+
import { d as toFloatTexture, n as FloatTexture, u as toByteTexture } from "./blend-C5UYzink.js";
|
|
14
14
|
import { a as LightingProfileName, i as LightingProfile, r as LightSource, u as lightsForProfile } from "./lighting-3FGRC3Af.js";
|
|
15
|
-
import { a as RenderedFrames, c as renderModel, i as RenderOptions, l as renderModelFrames, o as boxDownscale, r as ItemRenderError, s as pointResize } from "./renderer-
|
|
15
|
+
import { a as RenderedFrames, c as renderModel, i as RenderOptions, l as renderModelFrames, o as boxDownscale, r as ItemRenderError, s as pointResize } from "./renderer-DbUmTFDb.js";
|
|
16
16
|
import { c as defaultProperties, i as ItemRenderInstruction, l as evaluateItemModel, n as InvalidItemDefinitionError, o as TintDefinition, r as ItemProperties, s as UNKNOWN_MODEL } from "./definition-ricL7Jqf.js";
|
|
17
17
|
import { i as discoverItems, n as ItemDiscoveryOptions, o as resolveItem, r as ItemResolutionError, t as DiscoveredItem } from "./discovery-Cmir3QfC.js";
|
|
18
|
-
import { a as resolveTint, i as parseTintValue, n as InvalidTinterDefinitionError, o as resolveTints, t as DYE_COLORS } from "./tints-
|
|
19
|
-
import { i as EncodedIcon, n as EncodeOptions, o as encodeAnimatedIcon, r as EncodedAnimatedIcon, s as encodeIcon, t as AnimatedEncodeOptions } from "./encode-
|
|
18
|
+
import { a as resolveTint, i as parseTintValue, n as InvalidTinterDefinitionError, o as resolveTints, t as DYE_COLORS } from "./tints-uLl1CIkC.js";
|
|
19
|
+
import { i as EncodedIcon, n as EncodeOptions, o as encodeAnimatedIcon, r as EncodedAnimatedIcon, s as encodeIcon, t as AnimatedEncodeOptions } from "./encode-Br_vPrd8.js";
|
|
20
20
|
import { t as minifyStylesheet } from "./minify-CIV6enbr.js";
|
|
21
21
|
import { a as compareVersions, o as eraForVersion, s as prepareVersionResources } from "./prepare-6pH3CNpg.js";
|
|
22
22
|
import { i as prepareModResources } from "./prepare-OS7wL3jv.js";
|
|
23
23
|
import { i as itemClass, n as StylesheetOptions, r as generateStylesheet, t as ItemStyle } from "./stylesheet-i-t_7sZ7.js";
|
|
24
|
-
import { i as run, n as RunOptions, r as RunResult, t as ItemFailure } from "./run-
|
|
24
|
+
import { i as run, n as RunOptions, r as RunResult, t as ItemFailure } from "./run-CLjF0N2d.js";
|
|
25
25
|
import { n as UnsafeJarError, r as isUnsafeEntryPath, t as JarResourceManager } from "./jar-B5iRZQeL.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, LayeredResourceManager, type LightSource, LightingProfile, type LightingProfileName, type MeshGroup, ModelLoader, ModelResolutionError, type MultipartCondition, type ObjMesh, ObjMeshError, 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, weightedVariantIndex };
|
package/dist/index.js
CHANGED
|
@@ -3,18 +3,18 @@ import { n as ResourceLocator, t as InvalidResourceLocatorError } from "./locato
|
|
|
3
3
|
import { a as parseBlockState, i as matchesCondition, n as collectModels, o as weightedVariantIndex, r as evaluateBlockState, t as BlockStateError } from "./blockstate-eval-CV_LwUwj.js";
|
|
4
4
|
import { c as toByteTexture, l as toFloatTexture } from "./blend-KXMclcHk.js";
|
|
5
5
|
import { c as lightsForProfile, r as LightingProfile } from "./lighting--5myudVu.js";
|
|
6
|
-
import { a as salvageJson, i as resolveTexture, n as ModelResolutionError, t as ModelLoader } from "./loader-
|
|
7
|
-
import { a as ItemRenderError, c as renderModel, l as renderModelFrames, o as boxDownscale, s as pointResize } from "./obj-
|
|
6
|
+
import { a as salvageJson, i as resolveTexture, n as ModelResolutionError, t as ModelLoader } from "./loader-qOH0Jynq.js";
|
|
7
|
+
import { a as ItemRenderError, c as renderModel, l as renderModelFrames, o as boxDownscale, s as pointResize } from "./obj-DPEK_xee.js";
|
|
8
8
|
import { a as defaultProperties, i as UNKNOWN_MODEL, n as InvalidItemDefinitionError, o as evaluateItemModel } from "./definition-ColsvWrH.js";
|
|
9
9
|
import { i as resolveItem, n as discoverItems, t as ItemResolutionError } from "./discovery-CD0QqxSF.js";
|
|
10
10
|
import { a as resolveTints, i as resolveTint, n as InvalidTinterDefinitionError, r as parseTintValue, t as DYE_COLORS } from "./tints-B3WQcPtx.js";
|
|
11
|
-
import { n as buildObjMesh, t as ObjMeshError } from "./obj-mesh-
|
|
11
|
+
import { n as buildObjMesh, t as ObjMeshError } from "./obj-mesh-BFhtTBXX.js";
|
|
12
12
|
import { t as packAtlas } from "./atlas-pack-CoOih7By.js";
|
|
13
13
|
import { n as buildBlockTints, t as UNREGISTERED_TINTS } from "./tints-Cl0r-Ol3.js";
|
|
14
14
|
import { o as createAtlasResolver, s as parseAtlasSources, t as AtlasSourceError } from "./sources-BlUriDCs.js";
|
|
15
15
|
import { n as LayeredResourceManager, r as ResourceKind, t as FolderResourceManager } from "./manager-BNibYkmI.js";
|
|
16
|
-
import { n as TextureLoader, r as TextureResolutionError, t as AnimatedTexture } from "./loader-
|
|
17
|
-
import { t as exportBlockPack } from "./export-
|
|
16
|
+
import { n as TextureLoader, r as TextureResolutionError, t as AnimatedTexture } from "./loader-CsgtBuBo.js";
|
|
17
|
+
import { t as exportBlockPack } from "./export-DFEIL7yt.js";
|
|
18
18
|
import { n as UnsafeJarError, r as isUnsafeEntryPath, t as JarResourceManager } from "./jar-W2cV2ZVO.js";
|
|
19
19
|
import { n as prepareModResources } from "./prepare-Myd_ec4v.js";
|
|
20
20
|
import { a as prepareVersionResources, i as eraForVersion, r as compareVersions } from "./prepare-D49Gu4Lv.js";
|
|
@@ -22,5 +22,5 @@ import { n as encodeIcon, t as encodeAnimatedIcon } from "./encode-LR9wxigC.js";
|
|
|
22
22
|
import { a as builtinDynamicResources } from "./generators-D6giKoab.js";
|
|
23
23
|
import { t as minifyStylesheet } from "./minify-bjMRmr5J.js";
|
|
24
24
|
import { n as itemClass, t as generateStylesheet } from "./stylesheet-CovT3B2S.js";
|
|
25
|
-
import { t as run } from "./run
|
|
25
|
+
import { t as run } from "./run--oW_h01E.js";
|
|
26
26
|
export { AnimatedTexture, AtlasSourceError, BlockStateError, DEFAULT_WATER_COLOR, DYE_COLORS, FolderResourceManager, InvalidItemDefinitionError, InvalidResourceLocatorError, InvalidTinterDefinitionError, ItemRenderError, ItemResolutionError, JarResourceManager, LayeredResourceManager, LightingProfile, ModelLoader, ModelResolutionError, ObjMeshError, 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, weightedVariantIndex };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as resolveTexture } from "./loader-
|
|
1
|
+
import { i as resolveTexture } from "./loader-qOH0Jynq.js";
|
|
2
2
|
import { i as resolveItem, r as langRegistry } from "./discovery-CD0QqxSF.js";
|
|
3
3
|
import { a as resolveTints } from "./tints-B3WQcPtx.js";
|
|
4
4
|
//#region src/blocks/item-sprites.ts
|