@nodecraft/rendermite 1.11.1 → 1.11.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/README.md +48 -16
- package/assets/builtin/mobheads/items/frostbite.json +6 -0
- package/assets/builtin/mobheads/models/item/frostbite.json +6 -0
- package/assets/mod-models/README.md +24 -0
- package/dist/atlas/registry.d.ts +5 -6
- package/dist/atlas/registry.js +1 -2
- package/dist/atlas/sources.d.ts +2 -2
- package/dist/atlas/sources.js +1 -2
- package/dist/{atlas-pack-BUadroKy.d.ts → atlas-pack-Dxl3kwT2.d.ts} +1 -1
- package/dist/{biomes-BGOF6gRM.js → biomes-DTmzQfnL.js} +1 -1
- package/dist/{biomes-CnnhDCnk.d.ts → biomes-_HZ93QNR.d.ts} +1 -1
- package/dist/{blend-mJAeQB3C.d.ts → blend-DnogOnaU.d.ts} +1 -1
- package/dist/{block-behaviour-B5lD0RfG.d.ts → block-behaviour-D6NwU9bV.d.ts} +6 -6
- package/dist/{block-entities-C807EY2I.js → block-entities-Dp3rMxWq.js} +1 -1
- package/dist/{block-overrides-BhuJIxKC.js → block-overrides-DMzzzeq_.js} +1 -1
- package/dist/blocks/atlas-pack.d.ts +1 -1
- package/dist/blocks/atlas-pack.js +1 -2
- package/dist/blocks/biomes.d.ts +1 -1
- package/dist/blocks/biomes.js +1 -2
- package/dist/blocks/block-behaviour.d.ts +1 -1
- package/dist/blocks/block-behaviour.js +1 -2
- package/dist/blocks/block-entities.d.ts +12 -13
- package/dist/blocks/block-entities.js +1 -2
- package/dist/blocks/block-overrides.d.ts +7 -8
- package/dist/blocks/block-overrides.js +1 -2
- package/dist/blocks/blockstate-eval.js +1 -2
- package/dist/blocks/cli.d.ts +2 -3
- package/dist/blocks/cli.js +1 -2
- package/dist/blocks/datapack.d.ts +1 -1
- package/dist/blocks/datapack.js +1 -2
- package/dist/blocks/ender-storage.d.ts +4 -5
- package/dist/blocks/ender-storage.js +1 -2
- package/dist/blocks/entities.d.ts +8 -9
- package/dist/blocks/entities.js +1 -2
- package/dist/blocks/entity-geo.d.ts +4 -5
- package/dist/blocks/entity-geo.js +1 -2
- package/dist/blocks/entity-models.d.ts +8 -9
- package/dist/blocks/entity-models.js +1 -2
- package/dist/blocks/entity-sizes.d.ts +4 -4
- package/dist/blocks/entity-sizes.js +1 -2
- package/dist/blocks/export.d.ts +1 -1
- package/dist/blocks/export.js +1 -2
- package/dist/blocks/game-rules.js +1 -2
- package/dist/blocks/geo-blocks.d.ts +5 -6
- package/dist/blocks/geo-blocks.js +1 -2
- package/dist/blocks/item-sprites.d.ts +9 -10
- package/dist/blocks/item-sprites.js +1 -2
- package/dist/blocks/light-bytecode.d.ts +1 -1
- package/dist/blocks/light-bytecode.js +1 -2
- package/dist/blocks/light-eval.d.ts +1 -1
- package/dist/blocks/light-eval.js +1 -2
- package/dist/blocks/light.d.ts +8 -9
- package/dist/blocks/light.js +1 -2
- package/dist/blocks/names.d.ts +1 -1
- package/dist/blocks/names.js +1 -2
- package/dist/blocks/obj-mesh.d.ts +1 -1
- package/dist/blocks/obj-mesh.js +1 -2
- package/dist/blocks/pack-format.d.ts +1 -1
- package/dist/blocks/pack-format.js +1 -2
- package/dist/blocks/sprite-sheet.d.ts +11 -12
- package/dist/blocks/sprite-sheet.js +1 -2
- package/dist/blocks/states.js +1 -2
- package/dist/blocks/tints.d.ts +1 -1
- package/dist/blocks/tints.js +1 -2
- package/dist/{blockstate-DVb8Mhxc.js → blockstate-D5FgI-Qv.js} +3 -4
- package/dist/{blockstate-eval-CcgxVdKb.js → blockstate-eval-Cu-9TWH0.js} +1 -2
- package/dist/builtin.d.ts +5 -6
- package/dist/builtin.js +1 -2
- package/dist/{classfile-BJSs3JH0.js → classfile-YGjbyMPk.js} +3 -4
- package/dist/{cli-BUQzP6YF.js → cli-CeEAmdX9.js} +5 -5
- package/dist/cli.js +8 -8
- package/dist/{datapack-D6eH46ay.js → datapack-BZpO7nv-.js} +8 -9
- package/dist/{datapack-CmEg0Vko.d.ts → datapack-DhBAuxw5.d.ts} +1 -1
- package/dist/{definition-ColsvWrH.js → definition-Dab22cHd.js} +1 -1
- package/dist/{descriptor-Dz2cR-BH.js → descriptor-CJLtRmBc.js} +3 -3
- package/dist/{discovery-DWe_kX8W.d.ts → discovery-2Qk3x25z.d.ts} +1 -1
- package/dist/{discovery-CD0QqxSF.js → discovery-CMHJfdHQ.js} +13 -15
- package/dist/dynamic/generators.d.ts +1 -1
- package/dist/dynamic/generators.js +1 -2
- package/dist/{encode-TzYXOEId.js → encode-BIAWeZy2.js} +2 -3
- package/dist/{encode-BNEYHHR0.d.ts → encode-DZSVif8a.d.ts} +1 -1
- package/dist/{ender-storage-CKDiYgYc.js → ender-storage-COyXL-I4.js} +1 -1
- package/dist/entities/classfile.js +1 -2
- package/dist/entities/geo-model.d.ts +3 -4
- package/dist/entities/geo-model.js +1 -2
- package/dist/entities/inherit.d.ts +4 -5
- package/dist/entities/inherit.js +1 -2
- package/dist/entities/jar-classes.js +1 -2
- package/dist/entities/link.d.ts +9 -10
- package/dist/entities/link.js +1 -2
- package/dist/entities/mappings.js +1 -2
- package/dist/entities/merge.d.ts +7 -8
- package/dist/entities/merge.js +1 -2
- package/dist/entities/model-bytecode.d.ts +5 -6
- package/dist/entities/model-bytecode.js +1 -2
- package/dist/entities/model-code.js +1 -2
- package/dist/{entities-rQ4TZjEo.js → entities-4UMp3qXG.js} +4 -5
- package/dist/{entity-fallback-BEzCbJq0.js → entity-fallback-ZfurtmEQ.js} +9 -11
- package/dist/{entity-geo-DcrcN8TE.js → entity-geo-vJTSO0bB.js} +2 -2
- package/dist/{entity-models-D6AMLAy6.js → entity-models-CleLnlV4.js} +9 -10
- package/dist/{entity-sizes-Dmr4w0vu.js → entity-sizes-CC6-7DBz.js} +1 -1
- package/dist/{entity-textures-DG6NUNyp.js → entity-textures-BS5dI5dz.js} +15 -19
- package/dist/{export-CnKiSTiu.d.ts → export-BL_3VVZI.d.ts} +1 -1
- package/dist/{export-DE1V-ElS.js → export-BPH-b4LT.js} +25 -27
- package/dist/{face-uWXECGNr.d.ts → face-BOsq7v9f.d.ts} +4 -4
- package/dist/{face-D6SfTISC.js → face-DtbBpvbY.js} +2 -2
- package/dist/{game-rules-Dehe210A.js → game-rules-DrYU_6hd.js} +14 -16
- package/dist/{generators-D6giKoab.js → generators-7b5w6s0L.js} +1 -1
- package/dist/{generators-hu_vk10m.d.ts → generators-P1goUyvI.d.ts} +1 -1
- package/dist/{geo-BOYYFFQn.js → geo-CZHkm59F.js} +10 -12
- package/dist/{geo-DsWwuC5o.d.ts → geo-Ci_PGkFI.d.ts} +5 -5
- package/dist/{geo-blocks-BQqFfAQT.js → geo-blocks-BYSBc8uq.js} +1 -1
- package/dist/{geometry-bUDBhncX.js → geometry-BGTvfmbS.js} +1 -2
- package/dist/{geometry--UzHu1Vh.d.ts → geometry-Btiz31vH.d.ts} +1 -1
- package/dist/index.d.ts +21 -21
- package/dist/index.js +19 -19
- package/dist/{inherit-DJ45bOB_.js → inherit-LSSIV8N2.js} +2 -2
- package/dist/{item-sprites-CwiEBEAJ.js → item-sprites-Cip695Kk.js} +3 -3
- package/dist/{item-styles-BAeneY1R.js → item-styles-D-7N6j1i.js} +1 -1
- package/dist/items/blockstate.d.ts +5 -6
- package/dist/items/blockstate.js +1 -2
- package/dist/items/definition.js +1 -2
- package/dist/items/discovery.d.ts +1 -1
- package/dist/items/discovery.js +1 -2
- package/dist/{jar-DvofBm71.js → jar-Df0Xhw7X.js} +1 -1
- package/dist/{jar-4Jg7ufWK.d.ts → jar-IHoEeMdV.d.ts} +1 -1
- package/dist/{jar-classes-0wqWbTax.js → jar-classes-C5P3F18e.js} +1 -1
- package/dist/{legacy-reshape-CcdstKyI.js → legacy-reshape-ClEZFEVT.js} +6 -8
- package/dist/{light-c7l13kka.js → light-Bj0iD-ok.js} +19 -23
- package/dist/{light-bytecode-CQzTG8DJ.js → light-bytecode-B4_sP6ri.js} +3 -3
- package/dist/{light-eval-BuwUW4Tj.d.ts → light-eval-DJA58Kdg.d.ts} +1 -1
- package/dist/{lighting-3FGRC3Af.d.ts → lighting-DYkS-NlV.d.ts} +2 -2
- package/dist/{lighting--5myudVu.js → lighting-f_oZTiOx.js} +2 -2
- package/dist/{link-IDjVJ2Ij.js → link-CxzBRqeB.js} +4 -5
- package/dist/{loader-qOH0Jynq.js → loader-Ckhy0t8m.js} +3 -4
- package/dist/{loader-C4gsX_wO.d.ts → loader-CrPTL0zk.d.ts} +1 -1
- package/dist/{loader-BYyPIs9f.d.ts → loader-mGAKSRp6.d.ts} +2 -2
- package/dist/{manager-D6zXmFrO.js → manager-B1VPl4UQ.js} +4 -5
- package/dist/{manager-Ct0dEOMg.d.ts → manager-Ey26G_3e.d.ts} +1 -1
- package/dist/{model-bytecode-CXYAZ5dX.js → model-bytecode-Cp4LGfjI.js} +5 -6
- package/dist/{model-code-C5Au_FKU.js → model-code-B11iaTy1.js} +1 -1
- package/dist/models/loader.d.ts +1 -1
- package/dist/models/loader.js +1 -2
- package/dist/models/types.d.ts +1 -1
- package/dist/{models-BsYA-NZg.js → models-CvFehP26.js} +1 -1
- package/dist/mods/models.d.ts +3 -4
- package/dist/mods/models.js +1 -2
- package/dist/mods/prepare.d.ts +1 -1
- package/dist/mods/prepare.js +1 -2
- package/dist/mods/synthesize.d.ts +5 -6
- package/dist/mods/synthesize.js +1 -2
- package/dist/mods/tints.d.ts +7 -8
- package/dist/mods/tints.js +1 -2
- package/dist/{names-D1abAVIB.d.ts → names-D30ZIXkK.d.ts} +1 -1
- package/dist/{obj-NxBaySXt.js → obj-BWsU8pYz.js} +16 -18
- package/dist/{obj-mesh-BBSLG2Fv.js → obj-mesh-WShUgD4g.js} +1 -1
- package/dist/{obj-mesh-CzL0lOlJ.d.ts → obj-mesh-yN3ttPYf.d.ts} +2 -2
- package/dist/output/encode.d.ts +1 -1
- package/dist/output/encode.js +1 -2
- package/dist/output/item-styles.d.ts +3 -4
- package/dist/output/item-styles.js +1 -2
- package/dist/output/minify.js +1 -2
- package/dist/output/stylesheet.d.ts +1 -1
- package/dist/output/stylesheet.js +1 -2
- package/dist/pack.d.ts +5 -5
- package/dist/pack.js +1 -1
- package/dist/{pipeline-CCfkRth7.js → pipeline-DV4hIRMp.js} +12 -12
- package/dist/{pipeline-DuPF3sap.d.ts → pipeline-DmLQ49DB.d.ts} +4 -4
- package/dist/{pool-CKGp1qup.js → pool-Co7kPWwN.js} +1 -1
- package/dist/{prepare-DkJkZXuQ.js → prepare-BC5PYUmn.js} +7 -8
- package/dist/{prepare-Ce5SpR7Y.d.ts → prepare-BpwBH_m9.d.ts} +1 -1
- package/dist/{prepare-BPzsZI_S.d.ts → prepare-CZu44oTS.d.ts} +1 -1
- package/dist/{prepare-sj36BP90.js → prepare-DJnJQYtn.js} +9 -10
- package/dist/{rasterizer-M9Y7mn-W.js → rasterizer-B3tOyG4B.js} +5 -6
- package/dist/{rasterizer-DjnurUgD.d.ts → rasterizer-UBaTPhH4.d.ts} +1 -1
- package/dist/{registry-DafxsAhG.js → registry-CNFi94eo.js} +5 -7
- package/dist/render/blend.d.ts +1 -1
- package/dist/render/blend.js +1 -2
- package/dist/render/compose.d.ts +4 -5
- package/dist/render/compose.js +1 -2
- package/dist/render/entity-fallback.d.ts +12 -13
- package/dist/render/entity-fallback.js +1 -2
- package/dist/render/face.d.ts +1 -1
- package/dist/render/face.js +1 -2
- package/dist/render/fluid-bucket.d.ts +4 -5
- package/dist/render/fluid-bucket.js +1 -2
- package/dist/render/geo.d.ts +1 -1
- package/dist/render/geo.js +1 -2
- package/dist/render/geometry.d.ts +1 -1
- package/dist/render/geometry.js +1 -2
- package/dist/render/legacy-tints.d.ts +4 -5
- package/dist/render/legacy-tints.js +1 -2
- package/dist/render/lighting.d.ts +1 -1
- package/dist/render/lighting.js +1 -2
- package/dist/render/obj.d.ts +10 -10
- package/dist/render/obj.js +1 -2
- package/dist/render/pipeline.d.ts +1 -1
- package/dist/render/pipeline.js +1 -2
- package/dist/render/rasterizer.d.ts +1 -1
- package/dist/render/rasterizer.js +1 -2
- package/dist/render/renderer.d.ts +1 -1
- package/dist/render/renderer.js +1 -2
- package/dist/render/tints.d.ts +1 -1
- package/dist/render/tints.js +1 -2
- package/dist/render/vector.js +1 -2
- package/dist/{renderer-QgROYvPv.d.ts → renderer-DZSDiXL0.d.ts} +6 -6
- package/dist/resources/cache.d.ts +2 -3
- package/dist/resources/cache.js +1 -2
- package/dist/resources/cached.d.ts +3 -4
- package/dist/resources/cached.js +1 -2
- package/dist/resources/descriptor.d.ts +1 -1
- package/dist/resources/descriptor.js +1 -2
- package/dist/resources/entity-textures.d.ts +19 -20
- package/dist/resources/entity-textures.js +1 -2
- package/dist/resources/jar.d.ts +1 -1
- package/dist/resources/jar.js +1 -2
- package/dist/resources/locator.js +1 -2
- package/dist/resources/manager.d.ts +1 -1
- package/dist/resources/manager.js +1 -2
- package/dist/resources/read-ahead.d.ts +2 -3
- package/dist/resources/read-ahead.js +1 -2
- package/dist/resources/synthetic.d.ts +1 -1
- package/dist/resources/synthetic.js +1 -2
- package/dist/resources/zip-reader.d.ts +2 -3
- package/dist/resources/zip-reader.js +1 -2
- package/dist/{run-Bf5TLTJw.js → run-5Rc8hTHT.js} +15 -11
- package/dist/{run-CxB1qabg.d.ts → run-CfvR5OAR.d.ts} +3 -3
- package/dist/run.d.ts +1 -1
- package/dist/run.js +2 -2
- package/dist/{sources-DYY5Qu-t.js → sources-BsEa9YPc.js} +1 -1
- package/dist/{sources-sFtealLJ.d.ts → sources-ByuTQR_o.d.ts} +7 -3
- package/dist/{sprite-sheet-BWsLl0Vd.js → sprite-sheet-BQsUioOJ.js} +6 -7
- package/dist/{stylesheet-C61VrCAV.js → stylesheet-Cin7eCyU.js} +6 -7
- package/dist/{stylesheet-DxHkk4qA.d.ts → stylesheet-XJ-kH6kk.d.ts} +1 -1
- package/dist/{synthesize-jTjVjPAt.js → synthesize-DNvUwWhZ.js} +3 -4
- package/dist/{synthetic-CWtFtAkR.d.ts → synthetic-C8_0G5iP.d.ts} +1 -1
- package/dist/{synthetic-rc9BPT4P.js → synthetic-y9Mr-wB2.js} +0 -0
- package/dist/textures/loader.d.ts +1 -1
- package/dist/textures/loader.js +1 -2
- package/dist/textures/overlay.d.ts +3 -4
- package/dist/textures/overlay.js +1 -2
- package/dist/{tints-B0a1K11c.d.ts → tints-BNS9JGf7.d.ts} +2 -2
- package/dist/{tints-DwFmEkf3.d.ts → tints-CvHlfvDC.d.ts} +2 -2
- package/dist/{tints-B3WQcPtx.js → tints-Cw5okshA.js} +1 -1
- package/dist/{tints-CZeyKzMv.js → tints-DhSA5SCg.js} +3 -3
- package/dist/{types-qlp3I8_-.d.ts → types-BQQzfHEY.d.ts} +4 -0
- package/dist/versions/download.d.ts +2 -3
- package/dist/versions/download.js +1 -2
- package/dist/versions/legacy-reshape.d.ts +3 -4
- package/dist/versions/legacy-reshape.js +1 -2
- package/dist/versions/prepare.d.ts +1 -1
- package/dist/versions/prepare.js +1 -2
- package/dist/workers/pool.d.ts +6 -7
- package/dist/workers/pool.js +1 -2
- package/dist/workers/render-worker.d.ts +6 -7
- package/dist/workers/render-worker.js +2 -2
- package/package.json +9 -9
package/dist/entities/link.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { t as Mappings } from "../mappings-DhOPQTgV.js";
|
|
|
6
6
|
* for; several may be listed because the game renamed the holder between versions — 1.21.4 folded
|
|
7
7
|
* `ChestedHorseRenderer` into `DonkeyRenderer`, and a pack is exported for both eras.
|
|
8
8
|
*/
|
|
9
|
-
declare const RENDERER_ALIASES: Readonly<Record<string, string | readonly string[]>>;
|
|
9
|
+
export declare const RENDERER_ALIASES: Readonly<Record<string, string | readonly string[]>>;
|
|
10
10
|
/**
|
|
11
11
|
* Entity types the game draws without a `ModelPart` hierarchy at all, so having no geometry for them
|
|
12
12
|
* is the right answer rather than a gap.
|
|
@@ -18,8 +18,8 @@ declare const RENDERER_ALIASES: Readonly<Record<string, string | readonly string
|
|
|
18
18
|
* Listed rather than inferred so that a version adding a mob cannot slip through as "no model": the
|
|
19
19
|
* coverage test fails on any type that is neither linked nor named here.
|
|
20
20
|
*/
|
|
21
|
-
declare const NO_MODEL: ReadonlySet<string>;
|
|
22
|
-
interface LinkContext {
|
|
21
|
+
export declare const NO_MODEL: ReadonlySet<string>;
|
|
22
|
+
export interface LinkContext {
|
|
23
23
|
mappings: Mappings;
|
|
24
24
|
/** Reads a class by its obfuscated name, or `null` when the jar has no such class. */
|
|
25
25
|
read: (obfuscated: string) => Promise<ClassFile | null>;
|
|
@@ -32,7 +32,7 @@ interface LinkContext {
|
|
|
32
32
|
*/
|
|
33
33
|
nameIndex?: Map<string, string[]>;
|
|
34
34
|
}
|
|
35
|
-
interface EntityModelLink {
|
|
35
|
+
export interface EntityModelLink {
|
|
36
36
|
/** Deobfuscated class name, for diagnostics and for the pack's model id. */
|
|
37
37
|
className: string;
|
|
38
38
|
/** The class to actually read the bytecode of. */
|
|
@@ -48,7 +48,7 @@ interface EntityModelLink {
|
|
|
48
48
|
* `Lionfish_Model` the modern one — so the strip repeats until nothing more comes off. Separators go
|
|
49
49
|
* too, because a mod's class is `Deepling_Brute_Model` where its entity is `deepling_brute`.
|
|
50
50
|
*/
|
|
51
|
-
declare function normaliseModelName(name: string): string;
|
|
51
|
+
export declare function normaliseModelName(name: string): string;
|
|
52
52
|
/**
|
|
53
53
|
* Normalised name → the classes that could be it, for a jar whose classes are not named the way
|
|
54
54
|
* vanilla's are.
|
|
@@ -57,15 +57,14 @@ declare function normaliseModelName(name: string): string;
|
|
|
57
57
|
* classes are indexed under the part after the `$` as well: occultism files a familiar's head as
|
|
58
58
|
* `HeadlessFamiliarRenderer$CthulhuHeadModel`, and only the tail of that names the mob.
|
|
59
59
|
*/
|
|
60
|
-
declare function buildModelNameIndex(internalNames: Iterable<string>): Map<string, string[]>;
|
|
60
|
+
export declare function buildModelNameIndex(internalNames: Iterable<string>): Map<string, string[]>;
|
|
61
61
|
/**
|
|
62
62
|
* The class holding one entity's geometry, or `null` when nothing links.
|
|
63
63
|
*
|
|
64
64
|
* A candidate is only accepted if it *yields geometry*: a renderer chain can land on an abstract base
|
|
65
65
|
* that names no boxes, and returning that would report coverage the pack does not have.
|
|
66
66
|
*/
|
|
67
|
-
declare function linkEntityModel(entityId: string, context: LinkContext): Promise<EntityModelLink | null>;
|
|
67
|
+
export declare function linkEntityModel(entityId: string, context: LinkContext): Promise<EntityModelLink | null>;
|
|
68
68
|
/** Reads and caches classes out of an extracted jar directory or a jar reader. */
|
|
69
|
-
declare function classReader(load: (obfuscated: string) => Promise<Uint8Array | null>): LinkContext['read'];
|
|
70
|
-
//#endregion
|
|
71
|
-
export { EntityModelLink, LinkContext, NO_MODEL, RENDERER_ALIASES, buildModelNameIndex, classReader, linkEntityModel, normaliseModelName };
|
|
69
|
+
export declare function classReader(load: (obfuscated: string) => Promise<Uint8Array | null>): LinkContext['read'];
|
|
70
|
+
//#endregion
|
package/dist/entities/link.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { NO_MODEL, RENDERER_ALIASES, buildModelNameIndex, classReader, linkEntityModel, normaliseModelName };
|
|
1
|
+
export { t as NO_MODEL, n as RENDERER_ALIASES, r as buildModelNameIndex, i as classReader, a as linkEntityModel, o as normaliseModelName } from "../link-CxzBRqeB.js";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { MappingsUnavailableError, downloadClientMappings, identityMappings, isObfuscated, loadMappings, parseMappings, remapDescriptor, resolveMappings };
|
|
1
|
+
export { t as MappingsUnavailableError, n as downloadClientMappings, r as identityMappings, i as isObfuscated, a as loadMappings, o as parseMappings, s as remapDescriptor, c as resolveMappings } from "../mappings-CTB7_uZa.js";
|
package/dist/entities/merge.d.ts
CHANGED
|
@@ -4,14 +4,14 @@ import { i as Part, r as ExtractedModel } from "../model-PnQ4gV0-.js";
|
|
|
4
4
|
* Where a piece's parts sit: at the top, or inside the one anonymous root a `MeshDefinition` makes.
|
|
5
5
|
* Both merge into the same list of named slots and only one of them is nested.
|
|
6
6
|
*/
|
|
7
|
-
declare function slotsOf(parts: Part[]): {
|
|
7
|
+
export declare function slotsOf(parts: Part[]): {
|
|
8
8
|
container: Part | null;
|
|
9
9
|
slots: Part[];
|
|
10
10
|
};
|
|
11
11
|
/** True when this piece built its own mesh rather than adding to one it was handed. */
|
|
12
|
-
declare function buildsOwnMesh(model: ExtractedModel): boolean;
|
|
12
|
+
export declare function buildsOwnMesh(model: ExtractedModel): boolean;
|
|
13
13
|
/** `base` plus the parts of `extra` that `base` does not name. */
|
|
14
|
-
declare function mergeModels(base: ExtractedModel, extra: ExtractedModel): ExtractedModel;
|
|
14
|
+
export declare function mergeModels(base: ExtractedModel, extra: ExtractedModel): ExtractedModel;
|
|
15
15
|
/**
|
|
16
16
|
* Drops boxes that land exactly where one already is.
|
|
17
17
|
*
|
|
@@ -26,8 +26,7 @@ declare function mergeModels(base: ExtractedModel, extra: ExtractedModel): Extra
|
|
|
26
26
|
* from one builder running twice and land on identical frames. The first is kept: a builder states the
|
|
27
27
|
* ordinary shape before the variant.
|
|
28
28
|
*/
|
|
29
|
-
declare function dedupeCubes(model: ExtractedModel): ExtractedModel;
|
|
30
|
-
declare function countCubes(part: Part): number;
|
|
31
|
-
declare function cubesOf(model: ExtractedModel): number;
|
|
32
|
-
//#endregion
|
|
33
|
-
export { buildsOwnMesh, countCubes, cubesOf, dedupeCubes, mergeModels, slotsOf };
|
|
29
|
+
export declare function dedupeCubes(model: ExtractedModel): ExtractedModel;
|
|
30
|
+
export declare function countCubes(part: Part): number;
|
|
31
|
+
export declare function cubesOf(model: ExtractedModel): number;
|
|
32
|
+
//#endregion
|
package/dist/entities/merge.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { buildsOwnMesh, countCubes, cubesOf, dedupeCubes, mergeModels, slotsOf };
|
|
1
|
+
export { t as buildsOwnMesh, n as countCubes, r as cubesOf, i as dedupeCubes, a as mergeModels, o as slotsOf } from "../merge-DeHruviG.js";
|
|
@@ -2,7 +2,7 @@ import { t as ClassFile } from "../classfile-Dzn0gW9M.js";
|
|
|
2
2
|
import { r as ExtractedModel } from "../model-PnQ4gV0-.js";
|
|
3
3
|
//#region src/entities/model-bytecode.d.ts
|
|
4
4
|
/** Argument slot count and shape of a descriptor's parameter list. */
|
|
5
|
-
declare function parseDescriptor(descriptor: string): {
|
|
5
|
+
export declare function parseDescriptor(descriptor: string): {
|
|
6
6
|
args: string[];
|
|
7
7
|
returns: string;
|
|
8
8
|
};
|
|
@@ -19,7 +19,7 @@ declare function parseDescriptor(descriptor: string): {
|
|
|
19
19
|
* same model, a boat and a chest boat, and folding them together puts a chest on every boat.
|
|
20
20
|
*/
|
|
21
21
|
/** What a call may be followed into, and whether this class is the sort that makes such calls. */
|
|
22
|
-
interface Following {
|
|
22
|
+
export interface Following {
|
|
23
23
|
/** The class a call names, or null for the builder API and everything else off limits. */
|
|
24
24
|
resolve: (internalName: string) => ClassFile | null;
|
|
25
25
|
/**
|
|
@@ -45,7 +45,6 @@ interface Following {
|
|
|
45
45
|
* head and body where the adult reuses the humanoid's — so the fullest-mesh rule would always pick
|
|
46
46
|
* it, and every suit of armour in the world would come out child-sized.
|
|
47
47
|
*/
|
|
48
|
-
declare function extractArmourMesh(bytes: Uint8Array, following: Following): ExtractedModel;
|
|
49
|
-
declare function extractModel(bytes: Uint8Array, following?: Following): ExtractedModel;
|
|
50
|
-
//#endregion
|
|
51
|
-
export { Following, extractArmourMesh, extractModel, parseDescriptor };
|
|
48
|
+
export declare function extractArmourMesh(bytes: Uint8Array, following: Following): ExtractedModel;
|
|
49
|
+
export declare function extractModel(bytes: Uint8Array, following?: Following): ExtractedModel;
|
|
50
|
+
//#endregion
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { extractArmourMesh, extractModel, parseDescriptor };
|
|
1
|
+
export { t as extractArmourMesh, n as extractModel, r as parseDescriptor } from "../model-bytecode-Cp4LGfjI.js";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { isModelCode, loadModelCode };
|
|
1
|
+
export { t as isModelCode, n as loadModelCode } from "../model-code-B11iaTy1.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as ResourceLocator } from "./locator-COMEtEn9.js";
|
|
2
|
-
import { d as findMobTexture, f as isOverlayPath, h as tokens } from "./entity-textures-
|
|
2
|
+
import { d as findMobTexture, f as isOverlayPath, h as tokens } from "./entity-textures-BS5dI5dz.js";
|
|
3
3
|
//#region src/blocks/entities.ts
|
|
4
4
|
/**
|
|
5
5
|
* The entity registry, and one colour per entity.
|
|
@@ -136,10 +136,9 @@ async function findVariantTexture(resources, namespace, name) {
|
|
|
136
136
|
const named = tokens(leaf).some((token) => wanted.includes(token));
|
|
137
137
|
const depth = locator.path.split("/").length;
|
|
138
138
|
score = (inFamily ? 1e3 : 0) + score * 10 + (named ? 5 : 0) - depth - candidate.length;
|
|
139
|
-
if (score
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
139
|
+
if (score <= bestScore) continue;
|
|
140
|
+
best = locator;
|
|
141
|
+
bestScore = score;
|
|
143
142
|
}
|
|
144
143
|
return best;
|
|
145
144
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as ResourceLocator } from "./locator-COMEtEn9.js";
|
|
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-
|
|
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-BS5dI5dz.js";
|
|
3
|
+
import { c as renderModel } from "./obj-BWsU8pYz.js";
|
|
4
4
|
//#region src/render/entity-fallback.ts
|
|
5
5
|
/**
|
|
6
6
|
* Heuristic rendering for mod items that parent `builtin/entity` — chests,
|
|
@@ -138,11 +138,10 @@ async function spawnEggTints(id, resources, textures) {
|
|
|
138
138
|
let score = 0;
|
|
139
139
|
for (const token of wanted) if (parts.includes(token)) score++;
|
|
140
140
|
if (score === 0) continue;
|
|
141
|
-
if (score > bestScore || score === bestScore && parts.length < bestNoise)
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}
|
|
141
|
+
if (!(score > bestScore || score === bestScore && parts.length < bestNoise)) continue;
|
|
142
|
+
best = candidate;
|
|
143
|
+
bestScore = score;
|
|
144
|
+
bestNoise = parts.length;
|
|
146
145
|
}
|
|
147
146
|
const skin = best ? await textures.load(best) : null;
|
|
148
147
|
if (!skin) return null;
|
|
@@ -305,10 +304,9 @@ async function findShieldTexture(resources, namespace, itemName) {
|
|
|
305
304
|
const candidate = tokens(locator.path);
|
|
306
305
|
let score = candidate.includes("nopattern") ? 1 : 0;
|
|
307
306
|
for (const token of wanted) if (candidate.includes(token)) score += 2;
|
|
308
|
-
if (score
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
}
|
|
307
|
+
if (score <= bestScore) continue;
|
|
308
|
+
best = locator;
|
|
309
|
+
bestScore = score;
|
|
312
310
|
}
|
|
313
311
|
return best;
|
|
314
312
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as ResourceLocator } from "./locator-COMEtEn9.js";
|
|
2
2
|
import { t as geoToModel } from "./geo-model-Bo1gpEwX.js";
|
|
3
|
-
import { i as parseGeo, r as nameTokens } from "./geo-
|
|
3
|
+
import { i as parseGeo, r as nameTokens } from "./geo-CZHkm59F.js";
|
|
4
4
|
//#region src/blocks/entity-geo.ts
|
|
5
5
|
/**
|
|
6
6
|
* Finding the `.geo.json` a GeckoLib entity is drawn from.
|
|
@@ -71,7 +71,7 @@ function ranked(files, name) {
|
|
|
71
71
|
}).toSorted((left, right) => nameTokens(baseName(right)).length - nameTokens(baseName(left)).length);
|
|
72
72
|
const variants = files.filter((path) => {
|
|
73
73
|
const tokens = new Set(nameTokens(baseName(path)));
|
|
74
|
-
return
|
|
74
|
+
return wanted.isSubsetOf(tokens);
|
|
75
75
|
});
|
|
76
76
|
return [.../* @__PURE__ */ new Set([
|
|
77
77
|
...exact,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { n as ResourceLocator } from "./locator-COMEtEn9.js";
|
|
2
|
-
import { t as findGeoForEntity } from "./entity-geo-
|
|
2
|
+
import { t as findGeoForEntity } from "./entity-geo-vJTSO0bB.js";
|
|
3
3
|
import { t as EQUIPMENT_SLOTS } from "./pack-format-BP5dJMYY.js";
|
|
4
|
-
import { t as parseClassFile } from "./classfile-
|
|
5
|
-
import { n as extractModel, t as extractArmourMesh } from "./model-bytecode-
|
|
6
|
-
import { n as extractInheritedModel, t as ancestryOf } from "./inherit-
|
|
7
|
-
import { a as linkEntityModel, i as classReader, r as buildModelNameIndex } from "./link-
|
|
4
|
+
import { t as parseClassFile } from "./classfile-YGjbyMPk.js";
|
|
5
|
+
import { n as extractModel, t as extractArmourMesh } from "./model-bytecode-Cp4LGfjI.js";
|
|
6
|
+
import { n as extractInheritedModel, t as ancestryOf } from "./inherit-LSSIV8N2.js";
|
|
7
|
+
import { a as linkEntityModel, i as classReader, r as buildModelNameIndex } from "./link-CxzBRqeB.js";
|
|
8
8
|
import { c as resolveMappings, t as MappingsUnavailableError } from "./mappings-CTB7_uZa.js";
|
|
9
|
-
import { n as loadModelCode } from "./model-code-
|
|
9
|
+
import { n as loadModelCode } from "./model-code-B11iaTy1.js";
|
|
10
10
|
//#region src/blocks/entity-models.ts
|
|
11
11
|
/**
|
|
12
12
|
* Entity geometry for the pack: link each entity to the class that builds it, read that class's
|
|
@@ -276,10 +276,9 @@ async function collectArmourTrims(resources, spriteIds) {
|
|
|
276
276
|
[layer]: sprite
|
|
277
277
|
};
|
|
278
278
|
spriteIds.add(sprite);
|
|
279
|
-
if (material.endsWith("_darker"))
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
}
|
|
279
|
+
if (!material.endsWith("_darker")) continue;
|
|
280
|
+
const plain = material.slice(0, -7);
|
|
281
|
+
darker[plain] = material;
|
|
283
282
|
}
|
|
284
283
|
}
|
|
285
284
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as parseClassFile } from "./classfile-
|
|
1
|
+
import { t as parseClassFile } from "./classfile-YGjbyMPk.js";
|
|
2
2
|
import { c as resolveMappings, t as MappingsUnavailableError } from "./mappings-CTB7_uZa.js";
|
|
3
3
|
import { t as readAhead } from "./read-ahead-BlSzTexs.js";
|
|
4
4
|
//#region src/blocks/entity-sizes.ts
|
|
@@ -133,11 +133,10 @@ async function findChestTexture(resources, namespace, itemName) {
|
|
|
133
133
|
if (locator.path.endsWith(`/${itemName}`) || locator.path.endsWith(`/${itemName}_0`)) score++;
|
|
134
134
|
if (wanted.length > 0 && score === 0) continue;
|
|
135
135
|
const tied = score === bestScore && candidate.length === bestNoise;
|
|
136
|
-
if (best === null || score > bestScore || score === bestScore && candidate.length < bestNoise || tied && isOakSheet(locator) && !isOakSheet(best))
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}
|
|
136
|
+
if (!(best === null || score > bestScore || score === bestScore && candidate.length < bestNoise || tied && isOakSheet(locator) && !isOakSheet(best))) continue;
|
|
137
|
+
best = locator;
|
|
138
|
+
bestScore = score;
|
|
139
|
+
bestNoise = candidate.length;
|
|
141
140
|
}
|
|
142
141
|
return best;
|
|
143
142
|
}
|
|
@@ -154,11 +153,10 @@ async function findBedTexture(resources, namespace, itemName) {
|
|
|
154
153
|
let score = hasDye ? 0 : candidate.includes("undyed") ? 1 : 0;
|
|
155
154
|
for (const token of wanted) if (candidate.includes(token)) score++;
|
|
156
155
|
if (score === 0) continue;
|
|
157
|
-
if (best === null || score > bestScore || score === bestScore && candidate.length < bestNoise)
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
156
|
+
if (!(best === null || score > bestScore || score === bestScore && candidate.length < bestNoise)) continue;
|
|
157
|
+
best = locator;
|
|
158
|
+
bestScore = score;
|
|
159
|
+
bestNoise = candidate.length;
|
|
162
160
|
}
|
|
163
161
|
return best;
|
|
164
162
|
}
|
|
@@ -246,10 +244,9 @@ async function findEntityTexture(resources, namespace, itemName, kind) {
|
|
|
246
244
|
const candidate = tokens(locator.path);
|
|
247
245
|
let score = locator.path.startsWith("entity/") ? 1 : 0;
|
|
248
246
|
for (const token of wanted) if (candidate.includes(token)) score += 2;
|
|
249
|
-
if (score
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
}
|
|
247
|
+
if (score <= bestScore) continue;
|
|
248
|
+
best = locator;
|
|
249
|
+
bestScore = score;
|
|
253
250
|
}
|
|
254
251
|
return best;
|
|
255
252
|
}
|
|
@@ -271,11 +268,10 @@ async function findFluidStill(resources, namespace, blockName) {
|
|
|
271
268
|
const candidate = tokens(locator.path.slice(0, -6));
|
|
272
269
|
const score = wanted.filter((token) => candidate.includes(token)).length;
|
|
273
270
|
if (score < wanted.length) continue;
|
|
274
|
-
if (best === null || score > bestScore || score === bestScore && candidate.length < bestNoise)
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
}
|
|
271
|
+
if (!(best === null || score > bestScore || score === bestScore && candidate.length < bestNoise)) continue;
|
|
272
|
+
best = locator;
|
|
273
|
+
bestScore = score;
|
|
274
|
+
bestNoise = candidate.length;
|
|
279
275
|
}
|
|
280
276
|
return best;
|
|
281
277
|
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { n as ResourceLocator } from "./locator-COMEtEn9.js";
|
|
2
|
-
import { n as LayeredResourceManager, t as FolderResourceManager } from "./manager-
|
|
3
|
-
import { a as buildBiomeClimates } from "./biomes-
|
|
4
|
-
import { n as blockEntityGeometry, r as synthesizeVariants, t as INVISIBLE_BLOCKS } from "./block-entities-
|
|
5
|
-
import { a as parseBlockState, n as collectModels } from "./blockstate-eval-
|
|
6
|
-
import { t as collectDatapack } from "./datapack-
|
|
7
|
-
import { a as salvageJson, i as resolveTexture, t as ModelLoader } from "./loader-
|
|
8
|
-
import { t as enderStorageBlockModel } from "./ender-storage-
|
|
9
|
-
import { t as collectEntities } from "./entities-
|
|
10
|
-
import { n as collectEntityGeometry } from "./entity-models-
|
|
11
|
-
import { t as collectEntitySizes } from "./entity-sizes-
|
|
12
|
-
import { t as collectGameRules } from "./game-rules-
|
|
13
|
-
import { t as geoBlockModel } from "./geo-blocks-
|
|
14
|
-
import { n as discoverItems } from "./discovery-
|
|
15
|
-
import { t as collectItemSprites } from "./item-sprites-
|
|
16
|
-
import { r as collectBlockLight, t as NOT_BLOCKS } from "./light-
|
|
2
|
+
import { n as LayeredResourceManager, t as FolderResourceManager } from "./manager-B1VPl4UQ.js";
|
|
3
|
+
import { a as buildBiomeClimates } from "./biomes-DTmzQfnL.js";
|
|
4
|
+
import { n as blockEntityGeometry, r as synthesizeVariants, t as INVISIBLE_BLOCKS } from "./block-entities-Dp3rMxWq.js";
|
|
5
|
+
import { a as parseBlockState, n as collectModels } from "./blockstate-eval-Cu-9TWH0.js";
|
|
6
|
+
import { t as collectDatapack } from "./datapack-BZpO7nv-.js";
|
|
7
|
+
import { a as salvageJson, i as resolveTexture, t as ModelLoader } from "./loader-Ckhy0t8m.js";
|
|
8
|
+
import { t as enderStorageBlockModel } from "./ender-storage-COyXL-I4.js";
|
|
9
|
+
import { t as collectEntities } from "./entities-4UMp3qXG.js";
|
|
10
|
+
import { n as collectEntityGeometry } from "./entity-models-CleLnlV4.js";
|
|
11
|
+
import { t as collectEntitySizes } from "./entity-sizes-CC6-7DBz.js";
|
|
12
|
+
import { t as collectGameRules } from "./game-rules-DrYU_6hd.js";
|
|
13
|
+
import { t as geoBlockModel } from "./geo-blocks-BYSBc8uq.js";
|
|
14
|
+
import { n as discoverItems } from "./discovery-CMHJfdHQ.js";
|
|
15
|
+
import { t as collectItemSprites } from "./item-sprites-Cip695Kk.js";
|
|
16
|
+
import { r as collectBlockLight, t as NOT_BLOCKS } from "./light-Bj0iD-ok.js";
|
|
17
17
|
import { t as collectNames } from "./names-GLa5TyL7.js";
|
|
18
|
-
import { n as buildObjMesh } from "./obj-mesh-
|
|
19
|
-
import { n as buildSpriteSheet, t as MISSING_SPRITE } from "./sprite-sheet-
|
|
18
|
+
import { n as buildObjMesh } from "./obj-mesh-WShUgD4g.js";
|
|
19
|
+
import { n as buildSpriteSheet, t as MISSING_SPRITE } from "./sprite-sheet-BQsUioOJ.js";
|
|
20
20
|
import { t as readBlockStates } from "./states-BvoZA-ql.js";
|
|
21
21
|
import { n as buildBlockTints, t as UNREGISTERED_TINTS } from "./tints-Cl0r-Ol3.js";
|
|
22
|
-
import { t as loadAtlasResolver } from "./registry-
|
|
22
|
+
import { t as loadAtlasResolver } from "./registry-CNFi94eo.js";
|
|
23
23
|
import { t as CachedListingResourceManager } from "./cached-BOX3n1Dl.js";
|
|
24
24
|
import { n as TextureLoader } from "./loader-CsgtBuBo.js";
|
|
25
25
|
import path from "node:path";
|
|
@@ -878,18 +878,16 @@ async function exportBlockPack(options) {
|
|
|
878
878
|
const sheetSizes = /* @__PURE__ */ new Map();
|
|
879
879
|
for (const [id, model] of geometry.modelOf) {
|
|
880
880
|
const sprite = sheet.sprites[collected.entities[id].texture ?? ""];
|
|
881
|
-
if (sprite)
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
}
|
|
881
|
+
if (!sprite) continue;
|
|
882
|
+
const sizes = sheetSizes.get(model) ?? /* @__PURE__ */ new Set();
|
|
883
|
+
sizes.add(`${sprite.w}x${sprite.h}`);
|
|
884
|
+
sheetSizes.set(model, sizes);
|
|
886
885
|
}
|
|
887
886
|
for (const [model, sizes] of sheetSizes) {
|
|
887
|
+
if (sizes.size !== 1) continue;
|
|
888
888
|
const [only] = [...sizes];
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
geometry.models[model].textureSize = [width, height];
|
|
892
|
-
}
|
|
889
|
+
const [width, height] = only.split("x").map(Number);
|
|
890
|
+
geometry.models[model].textureSize = [width, height];
|
|
893
891
|
}
|
|
894
892
|
entityPages = sheet.pages;
|
|
895
893
|
entityModelPack = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as FloatTexture } from "./blend-
|
|
1
|
+
import { n as FloatTexture } from "./blend-DnogOnaU.js";
|
|
2
2
|
import { t as Mat4 } from "./vector-DRKRi4--.js";
|
|
3
|
-
import { n as FaceGeometry } from "./geometry
|
|
4
|
-
import { r as LightSource } from "./lighting-
|
|
5
|
-
import { n as FaceBuffer } from "./rasterizer-
|
|
3
|
+
import { n as FaceGeometry } from "./geometry-Btiz31vH.js";
|
|
4
|
+
import { r as LightSource } from "./lighting-DYkS-NlV.js";
|
|
5
|
+
import { n as FaceBuffer } from "./rasterizer-UBaTPhH4.js";
|
|
6
6
|
//#region src/render/face.d.ts
|
|
7
7
|
interface TintColor {
|
|
8
8
|
r: number;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as scaleTextureAlpha, n as cloneFloatTexture, r as darkenTexture, s as tintTexture, u as uvWindow } from "./blend-KXMclcHk.js";
|
|
2
2
|
import { c as normalize, g as transformVector, h as transformDirection, m as sub, r as dot, t as cross } from "./vector-CCxLae_T.js";
|
|
3
|
-
import { a as drawTexturedTriangle, i as createFaceBuffer, n as clearFaceBuffer, o as phpRound, r as compactFaceBuffer, t as RowCursor } from "./rasterizer-
|
|
3
|
+
import { a as drawTexturedTriangle, i as createFaceBuffer, n as clearFaceBuffer, o as phpRound, r as compactFaceBuffer, t as RowCursor } from "./rasterizer-B3tOyG4B.js";
|
|
4
4
|
//#region src/render/face.ts
|
|
5
5
|
/**
|
|
6
6
|
* Face rendering: cull, transform, project, tint, darken, rasterize — a faithful
|
|
7
|
-
* port of upstream Face::render (docs/
|
|
7
|
+
* port of upstream Face::render (docs/renderchest-spec.md §4).
|
|
8
8
|
*/
|
|
9
9
|
function createShadeCache() {
|
|
10
10
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as parseClassFile } from "./classfile-
|
|
1
|
+
import { t as parseClassFile } from "./classfile-YGjbyMPk.js";
|
|
2
2
|
import { t as readAhead } from "./read-ahead-BlSzTexs.js";
|
|
3
|
-
import { n as instructions } from "./entity-sizes-
|
|
3
|
+
import { n as instructions } from "./entity-sizes-CC6-7DBz.js";
|
|
4
4
|
//#region src/blocks/game-rules.ts
|
|
5
5
|
/**
|
|
6
6
|
* The version's game rules: each one's name, whether it is on/off or a number, and its default.
|
|
@@ -84,20 +84,18 @@ function rulesIn(owner, code) {
|
|
|
84
84
|
}
|
|
85
85
|
continue;
|
|
86
86
|
}
|
|
87
|
-
if (
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
}
|
|
87
|
+
if (op !== 184 && op !== 183 || !name || first === null) continue;
|
|
88
|
+
const call = owner.reference(index);
|
|
89
|
+
const kind = call ? valueKind(call.descriptor) : null;
|
|
90
|
+
if (!kind) continue;
|
|
91
|
+
rules[name] = kind === "boolean" ? {
|
|
92
|
+
type: "boolean",
|
|
93
|
+
default: first !== 0
|
|
94
|
+
} : {
|
|
95
|
+
type: "integer",
|
|
96
|
+
default: Number(first)
|
|
97
|
+
};
|
|
98
|
+
name = null;
|
|
101
99
|
}
|
|
102
100
|
return rules;
|
|
103
101
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as MapResourceManager } from "./synthetic-
|
|
1
|
+
import { n as MapResourceManager } from "./synthetic-C8_0G5iP.js";
|
|
2
2
|
//#region src/dynamic/generators.d.ts
|
|
3
3
|
declare const TRIM_MATERIALS: readonly ["quartz", "iron", "gold", "diamond", "netherite", "redstone", "copper", "emerald", "lapis", "amethyst", "resin"];
|
|
4
4
|
/** Materials with a darker variant used when the trim matches the armor metal. */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
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
|
-
import { c as lightsForProfile } from "./lighting
|
|
5
|
-
import { i as createFaceBuffer } from "./rasterizer-
|
|
4
|
+
import { c as lightsForProfile } from "./lighting-f_oZTiOx.js";
|
|
5
|
+
import { i as createFaceBuffer } from "./rasterizer-B3tOyG4B.js";
|
|
6
6
|
import { t as combineFaceBuffers } from "./compose-CuIKcRpx.js";
|
|
7
|
-
import { n as faceMaxZ, r as renderFace, t as createShadeCache } from "./face-
|
|
7
|
+
import { n as faceMaxZ, r as renderFace, t as createShadeCache } from "./face-DtbBpvbY.js";
|
|
8
8
|
//#region src/render/geo.ts
|
|
9
9
|
/**
|
|
10
10
|
* Bedrock-format geometry (`.geo.json`) rendering, best-effort. GeckoLib mods
|
|
@@ -23,7 +23,7 @@ function parseGeo(json) {
|
|
|
23
23
|
bones: modern.bones
|
|
24
24
|
};
|
|
25
25
|
for (const [key, value] of Object.entries(json)) {
|
|
26
|
-
if (!
|
|
26
|
+
if (!key.startsWith("geometry.") || !value || typeof value !== "object") continue;
|
|
27
27
|
const legacy = value;
|
|
28
28
|
if (legacy.bones) return {
|
|
29
29
|
textureWidth: legacy.texturewidth ?? 64,
|
|
@@ -387,10 +387,9 @@ async function findVariantTexture(resources, namespace, itemName) {
|
|
|
387
387
|
const tokens = nameTokens(locator.path.split("/").pop() ?? "").filter((token) => token !== "texture");
|
|
388
388
|
if (!wanted.every((token) => tokens.includes(token))) continue;
|
|
389
389
|
const extra = tokens.length - wanted.length;
|
|
390
|
-
if (extra < bestExtra || extra === bestExtra && best !== null && locator.path.length < best.path.length)
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
}
|
|
390
|
+
if (!(extra < bestExtra || extra === bestExtra && best !== null && locator.path.length < best.path.length)) continue;
|
|
391
|
+
best = locator;
|
|
392
|
+
bestExtra = extra;
|
|
394
393
|
}
|
|
395
394
|
return best;
|
|
396
395
|
}
|
|
@@ -408,10 +407,9 @@ async function findTextureByName(resources, namespace, name) {
|
|
|
408
407
|
const leaf = locator.path.split("/").pop() ?? "";
|
|
409
408
|
const exact = leaf === name;
|
|
410
409
|
if (!exact && leaf !== `${name}_texture`) continue;
|
|
411
|
-
if (best === null || exact && !bestExact || exact === bestExact && locator.path.length < best.path.length)
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
}
|
|
410
|
+
if (!(best === null || exact && !bestExact || exact === bestExact && locator.path.length < best.path.length)) continue;
|
|
411
|
+
best = locator;
|
|
412
|
+
bestExact = exact;
|
|
415
413
|
}
|
|
416
414
|
return best;
|
|
417
415
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as ResourceLocator } from "./locator-jDbdUeTd.js";
|
|
2
|
-
import { a as ResourceManager } from "./manager-
|
|
3
|
-
import { i as TextureLoader } from "./loader-
|
|
4
|
-
import { n as FloatTexture } from "./blend-
|
|
5
|
-
import { n as FaceGeometry } from "./geometry
|
|
6
|
-
import { i as RenderOptions } from "./renderer-
|
|
2
|
+
import { a as ResourceManager } from "./manager-Ey26G_3e.js";
|
|
3
|
+
import { i as TextureLoader } from "./loader-CrPTL0zk.js";
|
|
4
|
+
import { n as FloatTexture } from "./blend-DnogOnaU.js";
|
|
5
|
+
import { n as FaceGeometry } from "./geometry-Btiz31vH.js";
|
|
6
|
+
import { i as RenderOptions } from "./renderer-DZSDiXL0.js";
|
|
7
7
|
//#region src/render/geo.d.ts
|
|
8
8
|
interface GeoCube {
|
|
9
9
|
origin?: number[];
|
|
@@ -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-CZHkm59F.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. */
|
|
@@ -196,13 +196,12 @@ function applyElementRotation(rotation, corners) {
|
|
|
196
196
|
rotateAll(corners, origin, rotation.axis, rotation.angle * toRadians);
|
|
197
197
|
return;
|
|
198
198
|
}
|
|
199
|
-
const multiAxis = rotation;
|
|
200
199
|
for (const axis of [
|
|
201
200
|
"x",
|
|
202
201
|
"y",
|
|
203
202
|
"z"
|
|
204
203
|
]) {
|
|
205
|
-
const angle =
|
|
204
|
+
const angle = rotation[axis];
|
|
206
205
|
if (typeof angle === "number" && angle !== 0) rotateAll(corners, origin, axis, angle * toRadians);
|
|
207
206
|
}
|
|
208
207
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as FaceDirectionName, o as ModelElementJson, r as ElementRotationJson } from "./types-
|
|
1
|
+
import { a as FaceDirectionName, o as ModelElementJson, r as ElementRotationJson } from "./types-BQQzfHEY.js";
|
|
2
2
|
import { n as Vec3 } from "./vector-DRKRi4--.js";
|
|
3
3
|
//#region src/render/geometry.d.ts
|
|
4
4
|
interface FaceGeometry {
|