@nodecraft/rendermite 1.1.4 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/README.md +27 -2
  2. package/assets/builtin/renderchest/models/block/banner_standing.json +225 -0
  3. package/assets/builtin/renderchest/models/block/banner_wall.json +155 -0
  4. package/assets/builtin/renderchest/models/block/bed_foot.json +44 -0
  5. package/assets/builtin/renderchest/models/block/bed_head.json +44 -0
  6. package/assets/builtin/renderchest/models/block/chest_left.json +182 -0
  7. package/assets/builtin/renderchest/models/block/chest_right.json +182 -0
  8. package/assets/builtin/renderchest/models/block/copper_golem_statue.json +709 -0
  9. package/assets/builtin/renderchest/models/block/fluid.json +83 -0
  10. package/assets/builtin/renderchest/models/block/fluid_tinted.json +89 -0
  11. package/assets/builtin/renderchest/models/block/hanging_sign.json +54 -0
  12. package/assets/builtin/renderchest/models/block/standing_sign.json +32 -0
  13. package/assets/builtin/renderchest/models/block/wall_sign.json +19 -0
  14. package/dist/atlas/registry.js +1 -1
  15. package/dist/atlas/sources.js +1 -1
  16. package/dist/atlas-pack-CoOih7By.js +130 -0
  17. package/dist/atlas-pack-DRTrWcSU.d.ts +41 -0
  18. package/dist/block-entities-BbS1kv0m.js +481 -0
  19. package/dist/blocks/atlas-pack.d.ts +2 -0
  20. package/dist/blocks/atlas-pack.js +2 -0
  21. package/dist/blocks/block-entities.d.ts +93 -0
  22. package/dist/blocks/block-entities.js +2 -0
  23. package/dist/blocks/blockstate-eval.d.ts +2 -0
  24. package/dist/blocks/blockstate-eval.js +2 -0
  25. package/dist/blocks/cli.d.ts +9 -0
  26. package/dist/blocks/cli.js +2 -0
  27. package/dist/blocks/export.d.ts +2 -0
  28. package/dist/blocks/export.js +2 -0
  29. package/dist/blocks/obj-mesh.d.ts +2 -0
  30. package/dist/blocks/obj-mesh.js +2 -0
  31. package/dist/blocks/tints.d.ts +2 -0
  32. package/dist/blocks/tints.js +2 -0
  33. package/dist/{blockstate-CdstnW2-.js → blockstate-DVb8Mhxc.js} +1 -1
  34. package/dist/blockstate-eval-Ckjlyxn4.js +231 -0
  35. package/dist/blockstate-eval-DDArZs1P.d.ts +107 -0
  36. package/dist/cli-D7_oUuPT.js +161 -0
  37. package/dist/cli.js +9 -7
  38. package/dist/{descriptor-DWebtkI1.js → descriptor-BVIoEpPO.js} +3 -3
  39. package/dist/{discovery-B9aqV_Rz.js → discovery-CsZu08re.js} +1 -1
  40. package/dist/dynamic/generators.js +1 -1
  41. package/dist/{entity-fallback-Cu22uEIK.js → entity-fallback-DNO0Ta9C.js} +3 -155
  42. package/dist/entity-textures-DFRIVdF1.js +209 -0
  43. package/dist/export-BIpqNU3H.d.ts +44 -0
  44. package/dist/export-DxREy3qA.js +701 -0
  45. package/dist/{face-cQ-pVHoe.d.ts → face-BKwkeTps.d.ts} +1 -1
  46. package/dist/{fluid-bucket-BzoLofB_.js → fluid-bucket-B-I4ZYHl.js} +1 -1
  47. package/dist/{generators-BlG4KmtP.js → generators-BCZVlWig.js} +1 -1
  48. package/dist/{geo-w9HHIrb5.js → geo-BguldlU-.js} +5 -5
  49. package/dist/{geometry-w0yQbzDZ.d.ts → geometry-Bkur58Vi.d.ts} +1 -1
  50. package/dist/index.d.ts +10 -5
  51. package/dist/index.js +21 -16
  52. package/dist/{item-styles-upgEO1yP.js → item-styles-DjYRdyHi.js} +1 -1
  53. package/dist/items/blockstate.js +1 -1
  54. package/dist/items/discovery.js +1 -1
  55. package/dist/{jar-D9z-X7tA.js → jar-5aLDI0nT.js} +2 -2
  56. package/dist/{legacy-reshape-C05SfAPR.js → legacy-reshape-CcdstKyI.js} +2 -2
  57. package/dist/{legacy-tints-B09J0Rxh.js → legacy-tints-l-541wgI.js} +1 -1
  58. package/dist/{loader-CWsTZgrk.js → loader-BvLcevlN.js} +100 -9
  59. package/dist/{loader-Lb0ZeILz.js → loader-C18GpurU.js} +1 -1
  60. package/dist/{loader-DD83d80u.d.ts → loader-C_1_amsq.d.ts} +18 -1
  61. package/dist/{locator-ycZzh_6z.js → locator-COMEtEn9.js} +23 -1
  62. package/dist/{manager-CkletR5K.js → manager-CYbAkWuT.js} +2 -2
  63. package/dist/models/loader.d.ts +1 -1
  64. package/dist/models/loader.js +1 -1
  65. package/dist/models/types.d.ts +1 -1
  66. package/dist/{models-BKxGkPS7.js → models-CQwcTZcg.js} +1 -1
  67. package/dist/mods/models.js +1 -1
  68. package/dist/mods/prepare.js +1 -1
  69. package/dist/mods/synthesize.js +1 -1
  70. package/dist/mods/tints.js +1 -1
  71. package/dist/{renderer-DB1Oe7xs.js → obj-BEjq3_Ao.js} +234 -234
  72. package/dist/obj-mesh-C6Sp4Ysc.d.ts +41 -0
  73. package/dist/obj-mesh-CiHiqrlm.js +97 -0
  74. package/dist/output/item-styles.js +1 -1
  75. package/dist/{pipeline-Bp6amYz_.d.ts → pipeline-BDvXcw20.d.ts} +1 -1
  76. package/dist/{pipeline-CgJaVpoL.js → pipeline-DRMsBiod.js} +14 -14
  77. package/dist/{prepare-D56Z-9cg.js → prepare-B8oPdGYz.js} +5 -5
  78. package/dist/{prepare-Cc8QZ3j0.js → prepare-C95vjt_o.js} +5 -5
  79. package/dist/{registry-DS5PZ57l.js → registry-DlduyjtM.js} +2 -2
  80. package/dist/render/entity-fallback.d.ts +3 -3
  81. package/dist/render/entity-fallback.js +1 -1
  82. package/dist/render/face.d.ts +1 -1
  83. package/dist/render/face.js +1 -1
  84. package/dist/render/fluid-bucket.js +1 -1
  85. package/dist/render/geo.d.ts +2 -2
  86. package/dist/render/geo.js +1 -1
  87. package/dist/render/geometry.d.ts +1 -1
  88. package/dist/render/legacy-tints.d.ts +1 -1
  89. package/dist/render/legacy-tints.js +1 -1
  90. package/dist/render/obj.d.ts +10 -3
  91. package/dist/render/obj.js +2 -2
  92. package/dist/render/pipeline.d.ts +1 -1
  93. package/dist/render/pipeline.js +1 -1
  94. package/dist/render/renderer.d.ts +1 -1
  95. package/dist/render/renderer.js +1 -1
  96. package/dist/render/tints.d.ts +1 -1
  97. package/dist/render/tints.js +1 -1
  98. package/dist/{renderer-C79EQDSn.d.ts → renderer-U20hnhbi.d.ts} +2 -2
  99. package/dist/resources/descriptor.js +1 -1
  100. package/dist/resources/entity-textures.d.ts +51 -0
  101. package/dist/resources/entity-textures.js +2 -0
  102. package/dist/resources/jar.js +1 -1
  103. package/dist/resources/locator.js +1 -1
  104. package/dist/resources/manager.js +1 -1
  105. package/dist/resources/synthetic.js +1 -1
  106. package/dist/{run-uq8_hUx9.d.ts → run-CvIqiZ6T.d.ts} +1 -1
  107. package/dist/{run-U9pM9wKU.js → run-D2S_W5As.js} +7 -7
  108. package/dist/run.d.ts +1 -1
  109. package/dist/run.js +1 -1
  110. package/dist/{sources-Bxk-WOzH.js → sources-BlUriDCs.js} +1 -1
  111. package/dist/{synthesize-3Q0aaOnK.js → synthesize-jTjVjPAt.js} +2 -2
  112. package/dist/{synthetic-ZAUjXT7E.js → synthetic-rc9BPT4P.js} +0 -0
  113. package/dist/textures/loader.js +1 -1
  114. package/dist/tints-2k3ZhkY3.d.ts +41 -0
  115. package/dist/{tints-3VI_2SNy.js → tints-B3WQcPtx.js} +1 -1
  116. package/dist/{tints-Do9Sh3dg.d.ts → tints-DqhgFi8a.d.ts} +1 -1
  117. package/dist/tints-a9FWZLma.js +176 -0
  118. package/dist/{tints-CebmvjmP.js → tints-nxtGrqv5.js} +3 -3
  119. package/dist/{types-DpRSF9Vj.d.ts → types-qlp3I8_-.d.ts} +11 -0
  120. package/dist/versions/download.js +1 -1
  121. package/dist/versions/legacy-reshape.js +1 -1
  122. package/dist/versions/prepare.js +1 -1
  123. package/dist/workers/render-worker.d.ts +1 -1
  124. package/dist/workers/render-worker.js +2 -2
  125. package/package.json +1 -1
  126. package/dist/{download-D9aARBFp.js → download-1wAfrGKx.js} +1 -1
  127. package/dist/{face-CMJ3b3Ae.js → face-CKHboPfh.js} +1 -1
@@ -1,4 +1,4 @@
1
- import { n as ResourceLocator } from "./locator-ycZzh_6z.js";
1
+ import { n as ResourceLocator } from "./locator-COMEtEn9.js";
2
2
  //#region src/render/fluid-bucket.ts
3
3
  /**
4
4
  * Paint bucket contents for fluid_container loader models. Forge draws these
@@ -1,4 +1,4 @@
1
- import { n as MapResourceManager } from "./synthetic-ZAUjXT7E.js";
1
+ import { n as MapResourceManager } from "./synthetic-rc9BPT4P.js";
2
2
  //#region src/dynamic/generators.ts
3
3
  /**
4
4
  * Dynamic resources ported from renderchest's DynamicResourceGenerators, built
@@ -1,10 +1,10 @@
1
- import { n as ResourceLocator } from "./locator-ycZzh_6z.js";
2
- import { n as displayMatrix } from "./vector-CCxLae_T.js";
1
+ import { n as ResourceLocator } from "./locator-COMEtEn9.js";
3
2
  import { l as toFloatTexture } from "./blend-KXMclcHk.js";
4
- import { t as combineFaceBuffers } from "./compose-BGsNFR12.js";
5
- import { i as createFaceBuffer } from "./rasterizer-DcVJzkxz.js";
6
- import { n as faceMaxZ, r as renderFace, t as createShadeCache } from "./face-CMJ3b3Ae.js";
3
+ import { n as displayMatrix } from "./vector-CCxLae_T.js";
7
4
  import { c as lightsForProfile } from "./lighting--5myudVu.js";
5
+ import { i as createFaceBuffer } from "./rasterizer-DcVJzkxz.js";
6
+ import { t as combineFaceBuffers } from "./compose-BGsNFR12.js";
7
+ import { n as faceMaxZ, r as renderFace, t as createShadeCache } from "./face-CKHboPfh.js";
8
8
  //#region src/render/geo.ts
9
9
  /**
10
10
  * Bedrock-format geometry (`.geo.json`) rendering, best-effort. GeckoLib mods
@@ -1,4 +1,4 @@
1
- import { a as FaceDirectionName, o as ModelElementJson, r as ElementRotationJson } from "./types-DpRSF9Vj.js";
1
+ import { a as FaceDirectionName, o as ModelElementJson, r as ElementRotationJson } from "./types-qlp3I8_-.js";
2
2
  import { n as Vec3 } from "./vector-DRKRi4--.js";
3
3
  //#region src/render/geometry.d.ts
4
4
  interface FaceGeometry {
package/dist/index.d.ts CHANGED
@@ -2,19 +2,24 @@ import { n as ResourceLocator, t as InvalidResourceLocatorError } from "./locato
2
2
  import { a as ResourceManager, i as ResourceKindName, n as LayeredResourceManager, r as ResourceKind, t as FolderResourceManager } from "./manager-Cv1NeFyF.js";
3
3
  import { a as TextureMeta, i as TextureLoader, o as TextureResolutionError, r as Texture, t as AnimatedTexture } from "./loader-Myy22TDL.js";
4
4
  import { d as parseAtlasSources, n as AtlasSource, r as AtlasSourceError, s as ResolvedSprite, t as AtlasResolver, u as createAtlasResolver } from "./sources-B9X9w3qP.js";
5
+ import { a as PackedRect, i as PackedPage, n as PackOptions, o as packAtlas, r as PackedAtlas, t as PackEntry } from "./atlas-pack-DRTrWcSU.js";
6
+ import { a as resolveTexture, n as ModelResolutionError, o as salvageJson, r as ResolvedModel, t as ModelLoader } from "./loader-C_1_amsq.js";
7
+ 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-DDArZs1P.js";
8
+ import { i as exportBlockPack, n as BlockPackResult, r as ExportBlockPackOptions, t as BlockPackFailure } from "./export-BIpqNU3H.js";
9
+ import { i as buildObjMesh, n as ObjMesh, r as ObjMeshError, t as MeshGroup } from "./obj-mesh-C6Sp4Ysc.js";
10
+ import { i as buildBlockTints, n as BlockTintPack, t as BlockTint } from "./tints-2k3ZhkY3.js";
5
11
  import { s as builtinDynamicResources } from "./generators-DhRov4RB.js";
6
- import { a as resolveTexture, n as ModelResolutionError, o as salvageJson, r as ResolvedModel, t as ModelLoader } from "./loader-DD83d80u.js";
7
12
  import { d as toFloatTexture, n as FloatTexture, u as toByteTexture } from "./blend-8lnfxtLe.js";
8
13
  import { a as LightingProfileName, i as LightingProfile, r as LightSource, u as lightsForProfile } from "./lighting-3FGRC3Af.js";
9
- import { a as RenderedFrames, c as renderModel, i as RenderOptions, l as renderModelFrames, o as boxDownscale, r as ItemRenderError, s as pointResize } from "./renderer-C79EQDSn.js";
14
+ import { a as RenderedFrames, c as renderModel, i as RenderOptions, l as renderModelFrames, o as boxDownscale, r as ItemRenderError, s as pointResize } from "./renderer-U20hnhbi.js";
10
15
  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";
11
16
  import { a as resolveItem, i as discoverItems, n as ItemDiscoveryOptions, r as ItemResolutionError, t as DiscoveredItem } from "./discovery-BPSUtdm4.js";
12
- import { a as resolveTint, i as parseTintValue, n as InvalidTinterDefinitionError, o as resolveTints, t as DYE_COLORS } from "./tints-Do9Sh3dg.js";
17
+ import { a as resolveTint, i as parseTintValue, n as InvalidTinterDefinitionError, o as resolveTints, t as DYE_COLORS } from "./tints-DqhgFi8a.js";
13
18
  import { i as EncodedIcon, n as EncodeOptions, o as encodeAnimatedIcon, r as EncodedAnimatedIcon, s as encodeIcon, t as AnimatedEncodeOptions } from "./encode-DNcXXvYe.js";
14
19
  import { t as minifyStylesheet } from "./minify-CIV6enbr.js";
15
20
  import { a as compareVersions, o as eraForVersion, s as prepareVersionResources } from "./prepare-Cs6QDqie.js";
16
21
  import { i as prepareModResources } from "./prepare-Dce7-HAe.js";
17
22
  import { i as itemClass, n as StylesheetOptions, r as generateStylesheet, t as ItemStyle } from "./stylesheet-i-t_7sZ7.js";
18
- import { i as run, n as RunOptions, r as RunResult, t as ItemFailure } from "./run-uq8_hUx9.js";
23
+ import { i as run, n as RunOptions, r as RunResult, t as ItemFailure } from "./run-CvIqiZ6T.js";
19
24
  import { n as UnsafeJarError, r as isUnsafeEntryPath, t as JarResourceManager } from "./jar-CFkA-VgT.js";
20
- export { type AnimatedEncodeOptions, AnimatedTexture, type AtlasResolver, type AtlasSource, AtlasSourceError, DYE_COLORS, type DiscoveredItem, type EncodeOptions, type EncodedAnimatedIcon, type EncodedIcon, 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, ModelLoader, ModelResolutionError, 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, UnsafeJarError, boxDownscale, builtinDynamicResources, compareVersions, createAtlasResolver, defaultProperties, discoverItems, encodeAnimatedIcon, encodeIcon, eraForVersion, evaluateItemModel, generateStylesheet, isUnsafeEntryPath, itemClass, lightsForProfile, minifyStylesheet, parseAtlasSources, parseTintValue, pointResize, prepareModResources, prepareVersionResources, renderModel, renderModelFrames, resolveItem, resolveTexture, resolveTint, resolveTints, run, salvageJson, toByteTexture, toFloatTexture };
25
+ export { type AnimatedEncodeOptions, AnimatedTexture, type AtlasResolver, type AtlasSource, AtlasSourceError, type BlockModelVariant, type BlockPackFailure, type BlockPackResult, type BlockProperties, type BlockStateDefinition, BlockStateError, type BlockStateMultipartCase, type BlockStateVariantCase, type BlockTint, type BlockTintPack, 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, UnsafeJarError, boxDownscale, buildBlockTints, buildObjMesh, builtinDynamicResources, collectModels, compareVersions, createAtlasResolver, defaultProperties, discoverItems, encodeAnimatedIcon, encodeIcon, eraForVersion, evaluateBlockState, evaluateItemModel, exportBlockPack, generateStylesheet, isUnsafeEntryPath, itemClass, lightsForProfile, matchesCondition, minifyStylesheet, packAtlas, parseAtlasSources, parseBlockState, parseTintValue, pointResize, prepareModResources, prepareVersionResources, renderModel, renderModelFrames, resolveItem, resolveTexture, resolveTint, resolveTints, run, salvageJson, toByteTexture, toFloatTexture, weightedVariantIndex };
package/dist/index.js CHANGED
@@ -1,20 +1,25 @@
1
- import { n as ResourceLocator, t as InvalidResourceLocatorError } from "./locator-ycZzh_6z.js";
2
- import { n as LayeredResourceManager, r as ResourceKind, t as FolderResourceManager } from "./manager-CkletR5K.js";
3
- import { a as defaultProperties, i as UNKNOWN_MODEL, n as InvalidItemDefinitionError, o as evaluateItemModel } from "./definition-ColsvWrH.js";
4
- import { n as UnsafeJarError, r as isUnsafeEntryPath, t as JarResourceManager } from "./jar-D9z-X7tA.js";
5
- import { n as discoverItems, r as resolveItem, t as ItemResolutionError } from "./discovery-B9aqV_Rz.js";
1
+ import { t as packAtlas } from "./atlas-pack-CoOih7By.js";
2
+ import { n as ResourceLocator, t as InvalidResourceLocatorError } from "./locator-COMEtEn9.js";
3
+ import { a as parseBlockState, i as matchesCondition, n as collectModels, o as weightedVariantIndex, r as evaluateBlockState, t as BlockStateError } from "./blockstate-eval-Ckjlyxn4.js";
6
4
  import { c as toByteTexture, l as toFloatTexture } from "./blend-KXMclcHk.js";
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-BvLcevlN.js";
7
+ import { a as ItemRenderError, c as renderModel, l as renderModelFrames, o as boxDownscale, s as pointResize } from "./obj-BEjq3_Ao.js";
8
+ import { n as buildObjMesh, t as ObjMeshError } from "./obj-mesh-CiHiqrlm.js";
9
+ import { t as buildBlockTints } from "./tints-a9FWZLma.js";
10
+ import { o as createAtlasResolver, s as parseAtlasSources, t as AtlasSourceError } from "./sources-BlUriDCs.js";
11
+ import { n as LayeredResourceManager, r as ResourceKind, t as FolderResourceManager } from "./manager-CYbAkWuT.js";
12
+ import { n as TextureLoader, r as TextureResolutionError, t as AnimatedTexture } from "./loader-C18GpurU.js";
13
+ import { t as exportBlockPack } from "./export-DxREy3qA.js";
14
+ import { a as defaultProperties, i as UNKNOWN_MODEL, n as InvalidItemDefinitionError, o as evaluateItemModel } from "./definition-ColsvWrH.js";
15
+ import { n as UnsafeJarError, r as isUnsafeEntryPath, t as JarResourceManager } from "./jar-5aLDI0nT.js";
16
+ import { n as prepareModResources } from "./prepare-B8oPdGYz.js";
17
+ import { a as prepareVersionResources, i as eraForVersion, r as compareVersions } from "./prepare-C95vjt_o.js";
18
+ import { n as discoverItems, r as resolveItem, t as ItemResolutionError } from "./discovery-CsZu08re.js";
7
19
  import { n as encodeIcon, t as encodeAnimatedIcon } from "./encode-LR9wxigC.js";
8
- import { a as builtinDynamicResources } from "./generators-BlG4KmtP.js";
20
+ import { a as builtinDynamicResources } from "./generators-BCZVlWig.js";
9
21
  import { t as minifyStylesheet } from "./minify-bjMRmr5J.js";
10
22
  import { n as itemClass, t as generateStylesheet } from "./stylesheet-CovT3B2S.js";
11
- import { c as lightsForProfile, r as LightingProfile } from "./lighting--5myudVu.js";
12
- import { a as salvageJson, i as resolveTexture, n as ModelResolutionError, t as ModelLoader } from "./loader-CWsTZgrk.js";
13
- import { a as renderModelFrames, i as renderModel, n as boxDownscale, r as pointResize, t as ItemRenderError } from "./renderer-DB1Oe7xs.js";
14
- import { a as resolveTints, i as resolveTint, n as InvalidTinterDefinitionError, r as parseTintValue, t as DYE_COLORS } from "./tints-3VI_2SNy.js";
15
- import { o as createAtlasResolver, s as parseAtlasSources, t as AtlasSourceError } from "./sources-Bxk-WOzH.js";
16
- import { n as TextureLoader, r as TextureResolutionError, t as AnimatedTexture } from "./loader-Lb0ZeILz.js";
17
- import { t as run } from "./run-U9pM9wKU.js";
18
- import { a as prepareVersionResources, i as eraForVersion, r as compareVersions } from "./prepare-Cc8QZ3j0.js";
19
- import { n as prepareModResources } from "./prepare-D56Z-9cg.js";
20
- export { AnimatedTexture, AtlasSourceError, DYE_COLORS, FolderResourceManager, InvalidItemDefinitionError, InvalidResourceLocatorError, InvalidTinterDefinitionError, ItemRenderError, ItemResolutionError, JarResourceManager, LayeredResourceManager, LightingProfile, ModelLoader, ModelResolutionError, ResourceKind, ResourceLocator, TextureLoader, TextureResolutionError, UNKNOWN_MODEL, UnsafeJarError, boxDownscale, builtinDynamicResources, compareVersions, createAtlasResolver, defaultProperties, discoverItems, encodeAnimatedIcon, encodeIcon, eraForVersion, evaluateItemModel, generateStylesheet, isUnsafeEntryPath, itemClass, lightsForProfile, minifyStylesheet, parseAtlasSources, parseTintValue, pointResize, prepareModResources, prepareVersionResources, renderModel, renderModelFrames, resolveItem, resolveTexture, resolveTint, resolveTints, run, salvageJson, toByteTexture, toFloatTexture };
23
+ import { a as resolveTints, i as resolveTint, n as InvalidTinterDefinitionError, r as parseTintValue, t as DYE_COLORS } from "./tints-B3WQcPtx.js";
24
+ import { t as run } from "./run-D2S_W5As.js";
25
+ export { AnimatedTexture, AtlasSourceError, BlockStateError, DYE_COLORS, FolderResourceManager, InvalidItemDefinitionError, InvalidResourceLocatorError, InvalidTinterDefinitionError, ItemRenderError, ItemResolutionError, JarResourceManager, LayeredResourceManager, LightingProfile, ModelLoader, ModelResolutionError, ObjMeshError, ResourceKind, ResourceLocator, TextureLoader, TextureResolutionError, UNKNOWN_MODEL, UnsafeJarError, boxDownscale, buildBlockTints, buildObjMesh, builtinDynamicResources, collectModels, compareVersions, createAtlasResolver, defaultProperties, discoverItems, encodeAnimatedIcon, encodeIcon, eraForVersion, evaluateBlockState, evaluateItemModel, exportBlockPack, generateStylesheet, isUnsafeEntryPath, itemClass, lightsForProfile, matchesCondition, minifyStylesheet, packAtlas, parseAtlasSources, parseBlockState, parseTintValue, pointResize, prepareModResources, prepareVersionResources, renderModel, renderModelFrames, resolveItem, resolveTexture, resolveTint, resolveTints, run, salvageJson, toByteTexture, toFloatTexture, weightedVariantIndex };
@@ -1,4 +1,4 @@
1
- import { i as TRIM_MATERIALS, n as POTTERY_SHERDS, r as TRIM_DARKER_MATERIALS, t as ARMOR_ITEM_TYPES } from "./generators-BlG4KmtP.js";
1
+ import { i as TRIM_MATERIALS, n as POTTERY_SHERDS, r as TRIM_DARKER_MATERIALS, t as ARMOR_ITEM_TYPES } from "./generators-BCZVlWig.js";
2
2
  //#region src/output/item-styles.ts
3
3
  /**
4
4
  * Per-item CSS style classification, ported from upstream's ItemStyleGenerators
@@ -1,2 +1,2 @@
1
- import { n as defaultBlockStateModel, t as blockStateTransform } from "../blockstate-CdstnW2-.js";
1
+ import { n as defaultBlockStateModel, t as blockStateTransform } from "../blockstate-DVb8Mhxc.js";
2
2
  export { blockStateTransform, defaultBlockStateModel };
@@ -1,2 +1,2 @@
1
- import { n as discoverItems, r as resolveItem, t as ItemResolutionError } from "../discovery-B9aqV_Rz.js";
1
+ import { n as discoverItems, r as resolveItem, t as ItemResolutionError } from "../discovery-CsZu08re.js";
2
2
  export { ItemResolutionError, discoverItems, resolveItem };
@@ -1,5 +1,5 @@
1
- import { n as ResourceLocator } from "./locator-ycZzh_6z.js";
2
- import { r as ResourceKind } from "./manager-CkletR5K.js";
1
+ import { n as ResourceLocator } from "./locator-COMEtEn9.js";
2
+ import { r as ResourceKind } from "./manager-CYbAkWuT.js";
3
3
  import { t as openZip } from "./zip-reader-BSbJKUT1.js";
4
4
  //#region src/resources/jar.ts
5
5
  /**
@@ -1,6 +1,6 @@
1
- import { n as MapResourceManager } from "./synthetic-ZAUjXT7E.js";
2
- import { open } from "yauzl";
1
+ import { n as MapResourceManager } from "./synthetic-rc9BPT4P.js";
3
2
  import sharp from "sharp";
3
+ import { open } from "yauzl";
4
4
  //#region src/versions/legacy-reshape.ts
5
5
  /**
6
6
  * Pre-1.6 texture recovery, ported from the ui pipeline's legacy-assets.ts:
@@ -1,4 +1,4 @@
1
- import { n as ResourceLocator } from "./locator-ycZzh_6z.js";
1
+ import { n as ResourceLocator } from "./locator-COMEtEn9.js";
2
2
  //#region src/render/legacy-tints.ts
3
3
  /**
4
4
  * Hard-coded tint tables for eras before item definitions (pre-1.21.4), ported
@@ -1,4 +1,4 @@
1
- import { n as ResourceLocator } from "./locator-ycZzh_6z.js";
1
+ import { n as ResourceLocator } from "./locator-COMEtEn9.js";
2
2
  import { t as LruCache } from "./cache-Cr2ON3RQ.js";
3
3
  //#region src/models/loader.ts
4
4
  var ModelResolutionError = class extends Error {};
@@ -25,6 +25,8 @@ const MODEL_PARENT_ALIASES = {
25
25
  */
26
26
  const MOD_LOADER_HANDLERS = {
27
27
  "immersiveengineering:conf_sides": flattenConfSides,
28
+ "immersiveengineering:basic_split": flattenSplitMultiblock,
29
+ "immersiveengineering:ie_obj": restrictIeObjParts,
28
30
  "mekanism:energy_cube": flattenEnergyCube,
29
31
  "mekanism:transmitter": restrictTransmitterToUnconnected,
30
32
  "botania:floating_flower": composeFloatingFlower,
@@ -69,6 +71,14 @@ function flattenLoaderModel(json, depth = 0) {
69
71
  if (extended.base && typeof extended.base === "object") return flattenLoaderModel(extended.base, depth + 1);
70
72
  if (typeof extended.childModel === "string") return { parent: extended.childModel };
71
73
  if (typeof extended.delegate === "string") return { parent: extended.delegate };
74
+ if (typeof objCandidate.model === "string") {
75
+ const redirected = {
76
+ ...withoutLoader(json),
77
+ parent: objCandidate.model
78
+ };
79
+ delete redirected.model;
80
+ return redirected;
81
+ }
72
82
  if (extended.children && typeof extended.children === "object") {
73
83
  const children = Object.values(extended.children);
74
84
  const inline = children.filter((child) => typeof child === "object" && child !== null);
@@ -194,6 +204,48 @@ function flattenConveyor(json) {
194
204
  };
195
205
  }
196
206
  /**
207
+ * IE's `ie_obj` loader packs several states of a block into one OBJ as named
208
+ * objects and picks between them in a Java callback: a workbench draws its
209
+ * blueprint only when one is inserted, a post grows arms only toward
210
+ * neighbours, a logic unit shows a board per installed circuit. The model files
211
+ * name the callback and nothing else, so the placed-and-empty default is
212
+ * curated here per callback.
213
+ *
214
+ * Only callbacks whose default is unambiguous are listed — the rest keep
215
+ * drawing every object, and the block pack records that they did rather than
216
+ * substituting a guess.
217
+ */
218
+ const IE_DEFAULT_PARTS = {
219
+ "immersiveengineering:workbench": ["cube0"],
220
+ "immersiveengineering:post": ["base"],
221
+ "immersiveengineering:lantern": ["base"],
222
+ "immersiveengineering:logic_unit": ["base", "tubes"]
223
+ };
224
+ function restrictIeObjParts(json) {
225
+ const marked = json;
226
+ if (typeof marked.callbacks !== "string" || !marked.objModel) return marked;
227
+ const parts = IE_DEFAULT_PARTS[marked.callbacks];
228
+ if (parts) marked.objModel.objects = parts;
229
+ else marked.objModel.conditional = true;
230
+ return marked;
231
+ }
232
+ /**
233
+ * IE's split loader wraps one model spanning several blocks — a coke oven's
234
+ * mesh is the whole 2x2x2 structure — and gives each block position its own
235
+ * slice of it at draw time. Which slice is in the block entity rather than in
236
+ * the assets, so the part list is carried through instead: a consumer can draw
237
+ * the mesh once from the structure's corner rather than once per position.
238
+ */
239
+ function flattenSplitMultiblock(json) {
240
+ const extended = json;
241
+ const inner = extended.inner_model && typeof extended.inner_model === "object" ? flattenLoaderModel(extended.inner_model, 1) : withoutLoader(json);
242
+ const parts = Array.isArray(extended.split_parts) ? extended.split_parts.filter((part) => Array.isArray(part) && part.length === 3) : [];
243
+ return parts.length > 0 ? {
244
+ ...inner,
245
+ splitParts: parts
246
+ } : inner;
247
+ }
248
+ /**
197
249
  * IE's conf_sides loader picks per-face textures from `<base_name>` plus a
198
250
  * side/io suffix at runtime; the icon always shows the unconfigured ("none")
199
251
  * state, so a plain cube with those textures matches what the game draws.
@@ -375,10 +427,9 @@ function flattenStorageBarrel(json) {
375
427
  const groups = [extended.partitioned_model_parts, extended.model_parts];
376
428
  const textures = {};
377
429
  const merges = [];
378
- for (const group of groups) for (const part of Object.values(group ?? {})) {
379
- Object.assign(textures, part.textures);
380
- if (typeof part.model === "string") merges.push(part.model);
381
- }
430
+ const shapes = extended.model_parts ?? extended.partitioned_model_parts ?? {};
431
+ for (const [name, part] of Object.entries(shapes)) if (typeof part.model === "string" && !/_open$|^locked$|^packed$/.test(name) && !merges.includes(part.model)) merges.push(part.model);
432
+ for (const group of groups) for (const part of Object.values(group ?? {})) Object.assign(textures, part.textures);
382
433
  const flattened = withoutLoader(json);
383
434
  delete flattened.model_parts;
384
435
  delete flattened.partitioned_model_parts;
@@ -421,6 +472,31 @@ function withoutLoader(json) {
421
472
  delete rest.loader;
422
473
  return rest;
423
474
  }
475
+ function needsNormalizing(element) {
476
+ return typeof element.extra_rotation === "number" && element.extra_rotation !== 0 && element.rotation !== void 0;
477
+ }
478
+ /**
479
+ * Fold `extra_rotation` into the element's own rotation. Supplementaries slants
480
+ * its awnings with it — an arbitrary angle past vanilla's 22.5 steps, written
481
+ * beside a `rotation` of angle 0 — and ignoring it silently flattens them.
482
+ *
483
+ * The untouched array is returned by identity, so children of a shared parent
484
+ * keep sharing one elements array rather than each holding a copy.
485
+ */
486
+ function normalizeElements(elements) {
487
+ if (!elements.some((element) => needsNormalizing(element))) return elements;
488
+ return elements.map((element) => {
489
+ if (!needsNormalizing(element) || !element.rotation) return element;
490
+ const angle = (element.rotation.angle ?? 0) + (element.extra_rotation ?? 0);
491
+ return {
492
+ ...element,
493
+ rotation: {
494
+ ...element.rotation,
495
+ angle
496
+ }
497
+ };
498
+ });
499
+ }
424
500
  function isBuiltinParent(parent) {
425
501
  return parent.startsWith("builtin/") || parent.startsWith("minecraft:builtin/");
426
502
  }
@@ -528,13 +604,17 @@ var ModelLoader = class {
528
604
  let elements = [];
529
605
  let guiLight;
530
606
  let elementsGuiLight;
607
+ let ambientOcclusion;
608
+ let renderType;
531
609
  for (let i = chain.length - 1; i >= 0; i--) {
532
610
  const { json } = chain[i];
611
+ if (json.ambientocclusion !== void 0) ambientOcclusion = json.ambientocclusion;
612
+ if (typeof json.render_type === "string") renderType = json.render_type.replace(/^minecraft:/, "");
533
613
  for (const [name, value] of Object.entries(json.textures ?? {})) textures[name] = typeof value === "object" && value !== null ? String(value.sprite ?? "") : value;
534
614
  Object.assign(display, json.display);
535
615
  if (json.gui_light !== void 0) guiLight = json.gui_light;
536
616
  if (json.elements !== void 0) {
537
- elements = json.elements;
617
+ elements = normalizeElements(json.elements);
538
618
  elementsGuiLight = guiLight;
539
619
  }
540
620
  }
@@ -546,6 +626,14 @@ var ModelLoader = class {
546
626
  break;
547
627
  }
548
628
  }
629
+ let splitParts;
630
+ for (const entry of chain) {
631
+ const marked = entry.json;
632
+ if (marked.splitParts) {
633
+ splitParts = marked.splitParts;
634
+ break;
635
+ }
636
+ }
549
637
  let fluid;
550
638
  for (const entry of chain) {
551
639
  const marked = entry.json;
@@ -574,8 +662,11 @@ var ModelLoader = class {
574
662
  return {
575
663
  obj,
576
664
  fluid,
665
+ splitParts,
666
+ renderType: renderType ?? null,
577
667
  locator,
578
668
  builtinParent,
669
+ ambientOcclusion: ambientOcclusion ?? true,
579
670
  guiLight: guiLight ?? defaultLight,
580
671
  elementsGuiLight: elementsGuiLight ?? defaultLight,
581
672
  display,
@@ -630,9 +721,9 @@ function bindElementTextures(element, model, owner) {
630
721
  function resolveTexture(model, reference) {
631
722
  let value = reference;
632
723
  for (let depth = 0; depth < MAX_TEXTURE_REF_DEPTH; depth++) {
633
- if (!value.startsWith("#")) return ResourceLocator.tryParse(value);
634
- const next = model.textures[value.slice(1)];
635
- if (next === void 0) return null;
724
+ const name = value.startsWith("#") ? value.slice(1) : value;
725
+ const next = model.textures[name];
726
+ if (next === void 0) return value.startsWith("#") ? null : ResourceLocator.tryParse(value);
636
727
  value = next;
637
728
  }
638
729
  return null;
@@ -1,4 +1,4 @@
1
- import { n as ResourceLocator } from "./locator-ycZzh_6z.js";
1
+ import { n as ResourceLocator } from "./locator-COMEtEn9.js";
2
2
  import { t as LruCache } from "./cache-Cr2ON3RQ.js";
3
3
  import sharp from "sharp";
4
4
  //#region src/textures/loader.ts
@@ -1,6 +1,6 @@
1
1
  import { n as ResourceLocator } from "./locator-jDbdUeTd.js";
2
2
  import { a as ResourceManager } from "./manager-Cv1NeFyF.js";
3
- import { c as ModelJson, n as DisplayTransformJson, o as ModelElementJson, t as DisplayPosition } from "./types-DpRSF9Vj.js";
3
+ import { c as ModelJson, n as DisplayTransformJson, o as ModelElementJson, t as DisplayPosition } from "./types-qlp3I8_-.js";
4
4
  //#region src/models/loader.d.ts
5
5
  /**
6
6
  * A model with its parent chain flattened: textures merged child-over-parent,
@@ -11,6 +11,11 @@ interface ResolvedModel {
11
11
  locator: ResourceLocator;
12
12
  /** `builtin/generated` etc. — the terminal builtin parent, when the chain ends in one. */
13
13
  builtinParent: string | null;
14
+ /**
15
+ * `ambientocclusion`, nearest declaration in the chain wins. Only the block
16
+ * pack reads it; the icon renderer has no ambient occlusion to switch off.
17
+ */
18
+ ambientOcclusion: boolean;
14
19
  guiLight: 'front' | 'side';
15
20
  /**
16
21
  * The gui_light in effect when `elements` were defined in the chain — upstream
@@ -24,12 +29,24 @@ interface ResolvedModel {
24
29
  elements: ModelElementJson[];
25
30
  /** Deepest-first chain of model locators, for diagnostics. */
26
31
  chain: string[];
32
+ /**
33
+ * `render_type` as the chain states it, namespace stripped. Authoritative
34
+ * where present; nothing states it in vanilla.
35
+ */
36
+ renderType: string | null;
27
37
  /** Forge/NeoForge OBJ loader geometry reference, when the chain declares one. */
28
38
  obj?: {
29
39
  model: string;
30
40
  flipV: boolean;
31
41
  objects?: string[];
42
+ conditional?: boolean;
32
43
  };
44
+ /**
45
+ * Block offsets a split-multiblock model spans. IE's `basic_split` wraps one
46
+ * mesh covering several blocks and hands each position its own slice at
47
+ * runtime; which slice is in the block entity, not in the assets.
48
+ */
49
+ splitParts?: Array<[number, number, number]>;
33
50
  /** Fluid id from a fluid_container loader, for painting bucket contents. */
34
51
  fluid?: string;
35
52
  }
@@ -10,6 +10,26 @@
10
10
  const NAMESPACE_PATTERN = /^[\d._a-z-]+$/;
11
11
  const PATH_PATTERN = /^[\d./_a-z-]+$/;
12
12
  var InvalidResourceLocatorError = class extends Error {};
13
+ /**
14
+ * Collapse `.` and `..` segments, or null when the path climbs out of the pack.
15
+ * Ids come from jars, OBJ `mtllib` lines and MTL texture bindings, and every one
16
+ * of them is joined onto an asset root on disk, so an escaping path reads a file
17
+ * the pack does not contain.
18
+ */
19
+ function containedPath(path) {
20
+ if (!path.includes(".")) return path;
21
+ const segments = [];
22
+ for (const segment of path.split("/")) {
23
+ if (segment === ".") continue;
24
+ if (segment !== "..") {
25
+ segments.push(segment);
26
+ continue;
27
+ }
28
+ if (segments.length === 0) return null;
29
+ segments.pop();
30
+ }
31
+ return segments.join("/");
32
+ }
13
33
  var ResourceLocator = class ResourceLocator {
14
34
  static parse(locator, defaultNamespace = "minecraft") {
15
35
  const colon = locator.indexOf(":");
@@ -23,7 +43,9 @@ var ResourceLocator = class ResourceLocator {
23
43
  path = path.trim().toLowerCase();
24
44
  if (!NAMESPACE_PATTERN.test(namespace)) throw new InvalidResourceLocatorError(`Invalid namespace in resource locator: ${locator}`);
25
45
  if (!PATH_PATTERN.test(path)) throw new InvalidResourceLocatorError(`Invalid path in resource locator: ${locator}`);
26
- return new ResourceLocator(namespace, path);
46
+ const contained = containedPath(path);
47
+ if (contained === null || contained.length === 0) throw new InvalidResourceLocatorError(`Path does not resolve inside the pack: ${locator}`);
48
+ return new ResourceLocator(namespace, contained);
27
49
  }
28
50
  /** Parse, returning null instead of throwing for ids too malformed to normalize. */
29
51
  static tryParse(locator, defaultNamespace = "minecraft") {
@@ -1,7 +1,7 @@
1
- import { n as ResourceLocator } from "./locator-ycZzh_6z.js";
1
+ import { n as ResourceLocator } from "./locator-COMEtEn9.js";
2
2
  import path from "node:path";
3
- import { existsSync } from "node:fs";
4
3
  import { readFile, readdir, stat } from "node:fs/promises";
4
+ import { existsSync } from "node:fs";
5
5
  //#region src/resources/manager.ts
6
6
  /**
7
7
  * A category of resource inside a pack, mapping to a directory under
@@ -1,2 +1,2 @@
1
- import { a as resolveTexture, i as flattenLoaderModel, n as ModelResolutionError, o as salvageJson, r as ResolvedModel, t as ModelLoader } from "../loader-DD83d80u.js";
1
+ import { a as resolveTexture, i as flattenLoaderModel, n as ModelResolutionError, o as salvageJson, r as ResolvedModel, t as ModelLoader } from "../loader-C_1_amsq.js";
2
2
  export { ModelLoader, ModelResolutionError, ResolvedModel, flattenLoaderModel, resolveTexture, salvageJson };
@@ -1,2 +1,2 @@
1
- import { a as salvageJson, i as resolveTexture, n as ModelResolutionError, r as flattenLoaderModel, t as ModelLoader } from "../loader-CWsTZgrk.js";
1
+ import { a as salvageJson, i as resolveTexture, n as ModelResolutionError, r as flattenLoaderModel, t as ModelLoader } from "../loader-BvLcevlN.js";
2
2
  export { ModelLoader, ModelResolutionError, flattenLoaderModel, resolveTexture, salvageJson };
@@ -1,2 +1,2 @@
1
- import { a as FaceDirectionName, c as ModelJson, i as FaceDirection, l as Vec3, n as DisplayTransformJson, o as ModelElementJson, r as ElementRotationJson, s as ModelFaceJson, t as DisplayPosition, u as Vec4 } from "../types-DpRSF9Vj.js";
1
+ import { a as FaceDirectionName, c as ModelJson, i as FaceDirection, l as Vec3, n as DisplayTransformJson, o as ModelElementJson, r as ElementRotationJson, s as ModelFaceJson, t as DisplayPosition, u as Vec4 } from "../types-qlp3I8_-.js";
2
2
  export { DisplayPosition, DisplayTransformJson, ElementRotationJson, FaceDirection, FaceDirectionName, ModelElementJson, ModelFaceJson, ModelJson, Vec3, Vec4 };
@@ -1,5 +1,5 @@
1
1
  import { r as modModelPackPath } from "./builtin-WkWjATeh.js";
2
- import { t as FolderResourceManager } from "./manager-CkletR5K.js";
2
+ import { t as FolderResourceManager } from "./manager-CYbAkWuT.js";
3
3
  //#region src/mods/models.ts
4
4
  /**
5
5
  * Geometry for mod items the game draws in code. A `builtin/entity` item model
@@ -1,2 +1,2 @@
1
- import { t as curatedModelOverrides } from "../models-BKxGkPS7.js";
1
+ import { t as curatedModelOverrides } from "../models-CQwcTZcg.js";
2
2
  export { curatedModelOverrides };
@@ -1,2 +1,2 @@
1
- import { n as prepareModResources, t as LOADER_NAMESPACES } from "../prepare-D56Z-9cg.js";
1
+ import { n as prepareModResources, t as LOADER_NAMESPACES } from "../prepare-B8oPdGYz.js";
2
2
  export { LOADER_NAMESPACES, prepareModResources };
@@ -1,2 +1,2 @@
1
- import { t as synthesizeItemModels } from "../synthesize-3Q0aaOnK.js";
1
+ import { t as synthesizeItemModels } from "../synthesize-jTjVjPAt.js";
2
2
  export { synthesizeItemModels };
@@ -1,2 +1,2 @@
1
- import { n as harvestTintOverrides, t as curatedTintOverrides } from "../tints-CebmvjmP.js";
1
+ import { n as harvestTintOverrides, t as curatedTintOverrides } from "../tints-nxtGrqv5.js";
2
2
  export { curatedTintOverrides, harvestTintOverrides };