@nodecraft/rendermite 1.10.2 → 1.11.1
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/{block-behaviour-CzK3KVLx.d.ts → block-behaviour-B5lD0RfG.d.ts} +6 -1
- package/dist/blocks/block-behaviour.d.ts +1 -1
- package/dist/blocks/block-overrides.d.ts +1 -1
- package/dist/blocks/blockstate-eval.d.ts +1 -1
- package/dist/blocks/blockstate-eval.js +1 -1
- package/dist/blocks/cli.js +1 -1
- package/dist/blocks/ender-storage.d.ts +1 -1
- package/dist/blocks/entities.d.ts +1 -1
- package/dist/blocks/entity-models.d.ts +1 -1
- package/dist/blocks/export.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 +1 -1
- package/dist/blocks/light-bytecode.d.ts +1 -1
- package/dist/blocks/light-bytecode.js +1 -1
- package/dist/blocks/light-eval.d.ts +1 -1
- package/dist/blocks/light.d.ts +7 -2
- package/dist/blocks/light.js +2 -2
- package/dist/blocks/pack-format.d.ts +1 -1
- package/dist/blocks/sprite-sheet.d.ts +1 -1
- package/dist/{blockstate-eval-BzznRcVY.d.ts → blockstate-eval-C-ZSx78w.d.ts} +3 -2
- package/dist/{blockstate-eval-CV_LwUwj.js → blockstate-eval-CcgxVdKb.js} +2 -2
- package/dist/{cli--LNKFich.js → cli-BUQzP6YF.js} +16 -2
- package/dist/cli.js +1 -1
- package/dist/{export-CqeTinYL.d.ts → export-CnKiSTiu.d.ts} +8 -0
- package/dist/{export-Btg1y70w.js → export-DE1V-ElS.js} +28 -7
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/{light-bytecode-Bx3XLTRI.js → light-bytecode-CQzTG8DJ.js} +3 -2
- package/dist/{light-BtV-VxAi.js → light-c7l13kka.js} +3 -2
- package/dist/{light-eval-B4q-aVcf.d.ts → light-eval-BuwUW4Tj.d.ts} +2 -2
- package/dist/pack.d.ts +3 -3
- package/dist/pack.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as BiomeClimatePack } from "./biomes-CnnhDCnk.js";
|
|
2
|
-
import { a as BlockStateMultipartCase, o as BlockStateVariantCase } from "./blockstate-eval-
|
|
2
|
+
import { a as BlockStateMultipartCase, o as BlockStateVariantCase } from "./blockstate-eval-C-ZSx78w.js";
|
|
3
3
|
import { r as TagPack, t as AdvancementPack } from "./datapack-CmEg0Vko.js";
|
|
4
4
|
import { n as GameRulePack } from "./game-rules-ThvdDG3B.js";
|
|
5
5
|
import { t as NamePack } from "./names-D1abAVIB.js";
|
|
@@ -394,6 +394,11 @@ interface BlockPackMetaFile {
|
|
|
394
394
|
names: number;
|
|
395
395
|
failures: number;
|
|
396
396
|
};
|
|
397
|
+
/**
|
|
398
|
+
* The version `behaviour.json` was read from, when it is not this pack's own: 1.13 to 1.14.3 ship
|
|
399
|
+
* no mappings, so their table is 1.14.4's, kept to the blocks this version has.
|
|
400
|
+
*/
|
|
401
|
+
behaviourFrom?: string;
|
|
397
402
|
/** sha256 per file, enough to verify a cached copy without refetching it. */
|
|
398
403
|
hashes: Record<string, string>;
|
|
399
404
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as statedMapColor, n as PushReactionName, r as blockBehaviour, t as BlockBehaviour } from "../block-behaviour-
|
|
1
|
+
import { i as statedMapColor, n as PushReactionName, r as blockBehaviour, t as BlockBehaviour } from "../block-behaviour-B5lD0RfG.js";
|
|
2
2
|
export { BlockBehaviour, PushReactionName, blockBehaviour, statedMapColor };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as MemberReference } from "../block-behaviour-
|
|
1
|
+
import { d as MemberReference } from "../block-behaviour-B5lD0RfG.js";
|
|
2
2
|
import { t as ClassFile } from "../classfile-Dzn0gW9M.js";
|
|
3
3
|
//#region src/blocks/block-overrides.d.ts
|
|
4
4
|
interface OverrideSource {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as BlockStateMultipartCase, c as ParseBlockStateOptions, 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-
|
|
1
|
+
import { a as BlockStateMultipartCase, c as ParseBlockStateOptions, 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-C-ZSx78w.js";
|
|
2
2
|
export { BlockModelVariant, BlockProperties, BlockStateDefinition, BlockStateError, BlockStateMultipartCase, BlockStateVariantCase, MultipartCondition, ParseBlockStateOptions, collectModels, evaluateBlockState, matchesCondition, parseBlockState, weightedVariantIndex };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as parseBlockState, i as matchesCondition, n as collectModels, o as weightedVariantIndex, r as evaluateBlockState, t as BlockStateError } from "../blockstate-eval-
|
|
1
|
+
import { a as parseBlockState, i as matchesCondition, n as collectModels, o as weightedVariantIndex, r as evaluateBlockState, t as BlockStateError } from "../blockstate-eval-CcgxVdKb.js";
|
|
2
2
|
export { BlockStateError, collectModels, evaluateBlockState, matchesCondition, parseBlockState, weightedVariantIndex };
|
package/dist/blocks/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as runBlocksCli } from "../cli
|
|
1
|
+
import { t as runBlocksCli } from "../cli-BUQzP6YF.js";
|
|
2
2
|
export { runBlocksCli };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as ResourceManager } from "../manager-Ct0dEOMg.js";
|
|
2
|
-
import { P as BlockPackModel } from "../block-behaviour-
|
|
2
|
+
import { P as BlockPackModel } from "../block-behaviour-B5lD0RfG.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,6 +1,6 @@
|
|
|
1
1
|
import { a as ResourceManager } from "../manager-Ct0dEOMg.js";
|
|
2
2
|
import { i as TextureLoader } from "../loader-C4gsX_wO.js";
|
|
3
|
-
import { q as EntityPackEntry } from "../block-behaviour-
|
|
3
|
+
import { q as EntityPackEntry } from "../block-behaviour-B5lD0RfG.js";
|
|
4
4
|
//#region src/blocks/entities.d.ts
|
|
5
5
|
interface EntityPackResult {
|
|
6
6
|
entities: Record<string, EntityPackEntry>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as ResourceManager } from "../manager-Ct0dEOMg.js";
|
|
2
2
|
import { t as ClassSource } from "../jar-classes-CSRrPAUy.js";
|
|
3
|
-
import { J as EntityPackModel, X as EquipmentPack } from "../block-behaviour-
|
|
3
|
+
import { J as EntityPackModel, X as EquipmentPack } from "../block-behaviour-B5lD0RfG.js";
|
|
4
4
|
import { t as Mappings } from "../mappings-DhOPQTgV.js";
|
|
5
5
|
import { t as ModelCode } from "../model-code-BclYt1do.js";
|
|
6
6
|
//#region src/blocks/entity-models.d.ts
|
package/dist/blocks/export.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as exportBlockPack, n as BlockPackResult, r as ExportBlockPackOptions, t as BlockPackFailure } from "../export-
|
|
1
|
+
import { i as exportBlockPack, n as BlockPackResult, r as ExportBlockPackOptions, t as BlockPackFailure } from "../export-CnKiSTiu.js";
|
|
2
2
|
export { BlockPackFailure, BlockPackResult, ExportBlockPackOptions, exportBlockPack };
|
package/dist/blocks/export.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as exportBlockPack } from "../export-
|
|
1
|
+
import { t as exportBlockPack } from "../export-DE1V-ElS.js";
|
|
2
2
|
export { exportBlockPack };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as ResourceManager } from "../manager-Ct0dEOMg.js";
|
|
2
|
-
import { P as BlockPackModel } from "../block-behaviour-
|
|
2
|
+
import { P as BlockPackModel } from "../block-behaviour-B5lD0RfG.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-Ct0dEOMg.js";
|
|
2
2
|
import { i as TextureLoader } from "../loader-C4gsX_wO.js";
|
|
3
3
|
import { t as ModelLoader } from "../loader-BYyPIs9f.js";
|
|
4
|
-
import { Q as ItemPackEntry } from "../block-behaviour-
|
|
4
|
+
import { Q as ItemPackEntry } from "../block-behaviour-B5lD0RfG.js";
|
|
5
5
|
//#region src/blocks/item-sprites.d.ts
|
|
6
6
|
interface ItemSpriteFailure {
|
|
7
7
|
id: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as extractBlockLight, a as Handle, c as LightExtraction, d as MemberReference, f as PropertyDomain, g as Value, h as StateProbe, l as LightGetter, m as Registration, o as LambdaValue, p as PropsCall, s as LightCodeSource, u as LightSpec } from "../block-behaviour-
|
|
1
|
+
import { _ as extractBlockLight, a as Handle, c as LightExtraction, d as MemberReference, f as PropertyDomain, g as Value, h as StateProbe, l as LightGetter, m as Registration, o as LambdaValue, p as PropsCall, s as LightCodeSource, u as LightSpec } from "../block-behaviour-B5lD0RfG.js";
|
|
2
2
|
export { Handle, LambdaValue, LightCodeSource, LightExtraction, LightGetter, LightSpec, MemberReference, PropertyDomain, PropsCall, Registration, StateProbe, Value, extractBlockLight };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as extractBlockLight } from "../light-bytecode-
|
|
1
|
+
import { t as extractBlockLight } from "../light-bytecode-CQzTG8DJ.js";
|
|
2
2
|
export { extractBlockLight };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as blockLightLevel } from "../light-eval-
|
|
1
|
+
import { t as blockLightLevel } from "../light-eval-BuwUW4Tj.js";
|
|
2
2
|
export { blockLightLevel };
|
package/dist/blocks/light.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as ClassSource } from "../jar-classes-CSRrPAUy.js";
|
|
2
|
-
import { j as BlockPackLight, t as BlockBehaviour } from "../block-behaviour-
|
|
2
|
+
import { j as BlockPackLight, t as BlockBehaviour } from "../block-behaviour-B5lD0RfG.js";
|
|
3
3
|
//#region src/blocks/light.d.ts
|
|
4
4
|
interface CollectBlockLightOptions {
|
|
5
5
|
version: string;
|
|
@@ -34,6 +34,11 @@ interface BlockLightResult {
|
|
|
34
34
|
/** What the interpreter gave up on along the way, for a person reading a failure. */
|
|
35
35
|
notes: string[];
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Blockstate files that describe no block. The item frames are entities whose model the game looks up
|
|
39
|
+
* through a blockstate, so they have no registration to find and emit nothing.
|
|
40
|
+
*/
|
|
41
|
+
declare const NOT_BLOCKS: ReadonlySet<string>;
|
|
37
42
|
declare function collectBlockLight(options: CollectBlockLightOptions): Promise<BlockLightResult>;
|
|
38
43
|
/**
|
|
39
44
|
* Vanilla's emitters, transcribed from `Blocks.java` across 1.13 → 26.2 and checked against the wiki.
|
|
@@ -47,4 +52,4 @@ declare const VANILLA_LIGHT: Record<string, BlockPackLight>;
|
|
|
47
52
|
/** The vanilla table as it stood at a version: `VANILLA_LIGHT` with the history applied. */
|
|
48
53
|
declare function vanillaLightAt(version: string): Record<string, BlockPackLight>;
|
|
49
54
|
//#endregion
|
|
50
|
-
export { BlockLightResult, CollectBlockLightOptions, VANILLA_LIGHT, collectBlockLight, vanillaLightAt };
|
|
55
|
+
export { BlockLightResult, CollectBlockLightOptions, NOT_BLOCKS, VANILLA_LIGHT, collectBlockLight, vanillaLightAt };
|
package/dist/blocks/light.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
export { VANILLA_LIGHT, collectBlockLight, vanillaLightAt };
|
|
1
|
+
import { i as vanillaLightAt, n as VANILLA_LIGHT, r as collectBlockLight, t as NOT_BLOCKS } from "../light-c7l13kka.js";
|
|
2
|
+
export { NOT_BLOCKS, VANILLA_LIGHT, collectBlockLight, vanillaLightAt };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as ItemPackLayer, A as BlockPackItemsFile, B as BlockPackStatesFile, C as BlockPackBlockState, D as BlockPackEntityModelsFile, E as BlockPackEntitiesFile, F as BlockPackModelsFile, G as EntityPackCube, H as BlockPackTintsFile, I as BlockPackNamesFile, J as EntityPackModel, K as EntityPackCubeFace, L as BlockPackRenderLayer, M as BlockPackLightFile, N as BlockPackMetaFile, O as BlockPackFace, P as BlockPackModel, Q as ItemPackEntry, R as BlockPackSprite, S as BlockPackBiomesFile, T as BlockPackElement, U as BlockPackVariant, V as BlockPackTagsFile, W as EQUIPMENT_SLOTS, X as EquipmentPack, Y as EntityPackPart, Z as EquipmentSlot, b as BlockPackAtlasPage, j as BlockPackLight, k as BlockPackGameRulesFile, q as EntityPackEntry, v as BlockPackAdvancementsFile, w as BlockPackBlockStatesFile, x as BlockPackBehaviourFile, y as BlockPackAtlasFile, z as BlockPackSpriteFrame } from "../block-behaviour-
|
|
1
|
+
import { $ as ItemPackLayer, A as BlockPackItemsFile, B as BlockPackStatesFile, C as BlockPackBlockState, D as BlockPackEntityModelsFile, E as BlockPackEntitiesFile, F as BlockPackModelsFile, G as EntityPackCube, H as BlockPackTintsFile, I as BlockPackNamesFile, J as EntityPackModel, K as EntityPackCubeFace, L as BlockPackRenderLayer, M as BlockPackLightFile, N as BlockPackMetaFile, O as BlockPackFace, P as BlockPackModel, Q as ItemPackEntry, R as BlockPackSprite, S as BlockPackBiomesFile, T as BlockPackElement, U as BlockPackVariant, V as BlockPackTagsFile, W as EQUIPMENT_SLOTS, X as EquipmentPack, Y as EntityPackPart, Z as EquipmentSlot, b as BlockPackAtlasPage, j as BlockPackLight, k as BlockPackGameRulesFile, q as EntityPackEntry, v as BlockPackAdvancementsFile, w as BlockPackBlockStatesFile, x as BlockPackBehaviourFile, y as BlockPackAtlasFile, z as BlockPackSpriteFrame } from "../block-behaviour-B5lD0RfG.js";
|
|
2
2
|
export { BlockPackAdvancementsFile, BlockPackAtlasFile, BlockPackAtlasPage, BlockPackBehaviourFile, BlockPackBiomesFile, BlockPackBlockState, BlockPackBlockStatesFile, BlockPackElement, BlockPackEntitiesFile, BlockPackEntityModelsFile, BlockPackFace, BlockPackGameRulesFile, BlockPackItemsFile, BlockPackLight, BlockPackLightFile, BlockPackMetaFile, BlockPackModel, BlockPackModelsFile, BlockPackNamesFile, BlockPackRenderLayer, BlockPackSprite, BlockPackSpriteFrame, BlockPackStatesFile, BlockPackTagsFile, BlockPackTintsFile, BlockPackVariant, EQUIPMENT_SLOTS, EntityPackCube, EntityPackCubeFace, EntityPackEntry, EntityPackModel, EntityPackPart, EquipmentPack, EquipmentSlot, ItemPackEntry, ItemPackLayer };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as TextureLoader, r as Texture } from "../loader-C4gsX_wO.js";
|
|
2
2
|
import { i as PackedPage } from "../atlas-pack-BUadroKy.js";
|
|
3
|
-
import { L as BlockPackRenderLayer, R as BlockPackSprite } from "../block-behaviour-
|
|
3
|
+
import { L as BlockPackRenderLayer, R as BlockPackSprite } from "../block-behaviour-B5lD0RfG.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
|
|
@@ -23,8 +23,9 @@ interface BlockModelVariant {
|
|
|
23
23
|
/** Blockstate rotation in degrees about Y. */
|
|
24
24
|
y: number;
|
|
25
25
|
/**
|
|
26
|
-
* Rotation about Z, applied after X and Y. Vanilla
|
|
27
|
-
*
|
|
26
|
+
* Rotation about Z, applied after X and Y. Vanilla first used it in
|
|
27
|
+
* 26.4-snapshot-3 to stand icicles up; AE2 writes it as `ae2:z` so a drive or
|
|
28
|
+
* charger can spin on the wall it faces.
|
|
28
29
|
*/
|
|
29
30
|
z: number;
|
|
30
31
|
/** Hold UVs still while the model rotates. */
|
|
@@ -20,8 +20,8 @@ function propertyValue(value) {
|
|
|
20
20
|
return typeof value === "string" ? value : String(value);
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* The third rotation axis
|
|
24
|
-
* `ae2:z
|
|
23
|
+
* The third rotation axis: vanilla's icicles write a bare `z`, AE2 writes
|
|
24
|
+
* `ae2:z`. The namespace is left open because a loader extension is a loader
|
|
25
25
|
* extension whoever ships it, and only a numeric `z` key can match.
|
|
26
26
|
*/
|
|
27
27
|
function zRotation(entry) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as builtinPackPath } from "./builtin-WkWjATeh.js";
|
|
2
2
|
import { n as LayeredResourceManager, t as FolderResourceManager } from "./manager-D6zXmFrO.js";
|
|
3
3
|
import { a as prepareVersionResources, r as compareVersions } from "./prepare-DkJkZXuQ.js";
|
|
4
|
-
import { t as exportBlockPack } from "./export-
|
|
4
|
+
import { t as exportBlockPack } from "./export-DE1V-ElS.js";
|
|
5
5
|
import { n as layeredClasses, t as JarClassReader } from "./jar-classes-0wqWbTax.js";
|
|
6
6
|
import { n as prepareModResources } from "./prepare-sj36BP90.js";
|
|
7
7
|
import { t as downloadClientJar } from "./download-1wAfrGKx.js";
|
|
@@ -16,6 +16,8 @@ import { parseArgs } from "node:util";
|
|
|
16
16
|
*/
|
|
17
17
|
/** The Flattening: below it a block is `35:14` and needs a numeric-id table. */
|
|
18
18
|
const MINIMUM_VERSION = "1.13";
|
|
19
|
+
/** The first release Mojang published mappings for; older jars borrow its block behaviour. */
|
|
20
|
+
const FIRST_MAPPED_VERSION = "1.14.4";
|
|
19
21
|
const HELP = `rendermite blocks — Minecraft block pack export (geometry + atlas, 1.13+)
|
|
20
22
|
|
|
21
23
|
Usage:
|
|
@@ -135,6 +137,7 @@ async function runBlocksCli(argv) {
|
|
|
135
137
|
const cacheDir = values["cache-dir"] ?? path.join(os.homedir(), ".rendermite");
|
|
136
138
|
let resources;
|
|
137
139
|
let classes = null;
|
|
140
|
+
let behaviourFrom;
|
|
138
141
|
if (values.version) {
|
|
139
142
|
console.log(`Fetching client jar for ${values.version}…`);
|
|
140
143
|
const jar = await downloadClientJar(values.version, cacheDir);
|
|
@@ -142,7 +145,16 @@ async function runBlocksCli(argv) {
|
|
|
142
145
|
version: values.version,
|
|
143
146
|
jar
|
|
144
147
|
});
|
|
145
|
-
if (!values["no-entity-geometry"])
|
|
148
|
+
if (!values["no-entity-geometry"]) {
|
|
149
|
+
classes = new JarClassReader(jar);
|
|
150
|
+
if (compareVersions(values.version, FIRST_MAPPED_VERSION) < 0 && !values.mod?.length) {
|
|
151
|
+
console.log(`Fetching client jar for ${FIRST_MAPPED_VERSION}, to read the block behaviour ${values.version} has no mappings for…`);
|
|
152
|
+
behaviourFrom = {
|
|
153
|
+
version: FIRST_MAPPED_VERSION,
|
|
154
|
+
classes: new JarClassReader(await downloadClientJar(FIRST_MAPPED_VERSION, cacheDir))
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
}
|
|
146
158
|
} else {
|
|
147
159
|
const managers = (values.assets ?? []).map((root) => new FolderResourceManager(root));
|
|
148
160
|
resources = managers.length === 1 ? managers[0] : new LayeredResourceManager(managers);
|
|
@@ -175,6 +187,7 @@ async function runBlocksCli(argv) {
|
|
|
175
187
|
items: !values["no-items"],
|
|
176
188
|
entities: !values["no-entities"],
|
|
177
189
|
classes: classes ?? void 0,
|
|
190
|
+
behaviourFrom,
|
|
178
191
|
cacheDir,
|
|
179
192
|
reports: values.reports,
|
|
180
193
|
onProgress: (stage, done, total) => {
|
|
@@ -193,6 +206,7 @@ async function runBlocksCli(argv) {
|
|
|
193
206
|
} finally {
|
|
194
207
|
await closeMods?.();
|
|
195
208
|
await classes?.close();
|
|
209
|
+
await behaviourFrom?.classes.close();
|
|
196
210
|
}
|
|
197
211
|
}
|
|
198
212
|
//#endregion
|
package/dist/cli.js
CHANGED
|
@@ -6,7 +6,7 @@ import { a as prepareVersionResources, i as eraForVersion, n as GEOMETRY_DONOR_V
|
|
|
6
6
|
import { t as curatedModelOverrides } from "./models-BsYA-NZg.js";
|
|
7
7
|
import { n as harvestTintOverrides, t as curatedTintOverrides } from "./tints-CZeyKzMv.js";
|
|
8
8
|
import { t as downloadClientJar } from "./download-1wAfrGKx.js";
|
|
9
|
-
import { t as runBlocksCli } from "./cli
|
|
9
|
+
import { t as runBlocksCli } from "./cli-BUQzP6YF.js";
|
|
10
10
|
import { t as run } from "./run-Bf5TLTJw.js";
|
|
11
11
|
import path from "node:path";
|
|
12
12
|
import os from "node:os";
|
|
@@ -40,6 +40,14 @@ interface ExportBlockPackOptions {
|
|
|
40
40
|
* answer there is no geometry rather than a silent gap.
|
|
41
41
|
*/
|
|
42
42
|
classes?: ClassSource;
|
|
43
|
+
/**
|
|
44
|
+
* A mapped version's classes to read `behaviour.json` from, for a jar with no mappings of its own
|
|
45
|
+
* (1.13 to 1.14.3), whose builder calls have no names to read. Used only when `classes` read none.
|
|
46
|
+
*/
|
|
47
|
+
behaviourFrom?: {
|
|
48
|
+
version: string;
|
|
49
|
+
classes: ClassSource;
|
|
50
|
+
};
|
|
43
51
|
/** Where mappings cache; the jar cache directory. */
|
|
44
52
|
cacheDir?: string;
|
|
45
53
|
/**
|
|
@@ -2,7 +2,7 @@ import { n as ResourceLocator } from "./locator-COMEtEn9.js";
|
|
|
2
2
|
import { n as LayeredResourceManager, t as FolderResourceManager } from "./manager-D6zXmFrO.js";
|
|
3
3
|
import { a as buildBiomeClimates } from "./biomes-BGOF6gRM.js";
|
|
4
4
|
import { n as blockEntityGeometry, r as synthesizeVariants, t as INVISIBLE_BLOCKS } from "./block-entities-C807EY2I.js";
|
|
5
|
-
import { a as parseBlockState, n as collectModels } from "./blockstate-eval-
|
|
5
|
+
import { a as parseBlockState, n as collectModels } from "./blockstate-eval-CcgxVdKb.js";
|
|
6
6
|
import { t as collectDatapack } from "./datapack-D6eH46ay.js";
|
|
7
7
|
import { a as salvageJson, i as resolveTexture, t as ModelLoader } from "./loader-qOH0Jynq.js";
|
|
8
8
|
import { t as enderStorageBlockModel } from "./ender-storage-CKDiYgYc.js";
|
|
@@ -13,7 +13,7 @@ import { t as collectGameRules } from "./game-rules-Dehe210A.js";
|
|
|
13
13
|
import { t as geoBlockModel } from "./geo-blocks-BQqFfAQT.js";
|
|
14
14
|
import { n as discoverItems } from "./discovery-CD0QqxSF.js";
|
|
15
15
|
import { t as collectItemSprites } from "./item-sprites-CwiEBEAJ.js";
|
|
16
|
-
import {
|
|
16
|
+
import { r as collectBlockLight, t as NOT_BLOCKS } from "./light-c7l13kka.js";
|
|
17
17
|
import { t as collectNames } from "./names-GLa5TyL7.js";
|
|
18
18
|
import { n as buildObjMesh } from "./obj-mesh-BBSLG2Fv.js";
|
|
19
19
|
import { n as buildSpriteSheet, t as MISSING_SPRITE } from "./sprite-sheet-BWsLl0Vd.js";
|
|
@@ -703,13 +703,16 @@ async function exportBlockPack(options) {
|
|
|
703
703
|
const states = options.reports === void 0 ? null : await readBlockStates(options.reports);
|
|
704
704
|
let lightPack = {};
|
|
705
705
|
let behaviourPack = {};
|
|
706
|
+
let behaviourFrom;
|
|
706
707
|
if (options.classes) {
|
|
708
|
+
const blockIds = [.../* @__PURE__ */ new Set([...blockLocators.map((locator) => locator.toString()), ...Object.keys(blockStates)])];
|
|
709
|
+
const defaultStateOf = (id) => states?.[id]?.default ?? null;
|
|
707
710
|
const collected = await collectBlockLight({
|
|
708
711
|
version,
|
|
709
712
|
cacheDir: options.cacheDir ?? output,
|
|
710
713
|
classes: options.classes,
|
|
711
|
-
blockIds
|
|
712
|
-
defaultStateOf
|
|
714
|
+
blockIds,
|
|
715
|
+
defaultStateOf,
|
|
713
716
|
onProgress: (count, total) => report("light", count, total)
|
|
714
717
|
});
|
|
715
718
|
lightPack = sortedByKey(collected.light);
|
|
@@ -718,11 +721,28 @@ async function exportBlockPack(options) {
|
|
|
718
721
|
kind: "light",
|
|
719
722
|
reason: failure.reason
|
|
720
723
|
});
|
|
721
|
-
|
|
722
|
-
|
|
724
|
+
let behaviour = collected;
|
|
725
|
+
if (Object.keys(collected.behaviour).length === 0 && options.behaviourFrom) {
|
|
726
|
+
behaviour = await collectBlockLight({
|
|
727
|
+
version: options.behaviourFrom.version,
|
|
728
|
+
cacheDir: options.cacheDir ?? output,
|
|
729
|
+
classes: options.behaviourFrom.classes,
|
|
730
|
+
blockIds,
|
|
731
|
+
defaultStateOf,
|
|
732
|
+
onProgress: (count, total) => report("behaviour", count, total)
|
|
733
|
+
});
|
|
734
|
+
behaviourFrom = options.behaviourFrom.version;
|
|
735
|
+
for (const id of blockIds) if (!NOT_BLOCKS.has(id) && !(id in behaviour.behaviour)) failures.push({
|
|
736
|
+
id,
|
|
737
|
+
kind: "behaviour",
|
|
738
|
+
reason: `${behaviourFrom} registers no such block, so its behaviour is unknown`
|
|
739
|
+
});
|
|
740
|
+
}
|
|
741
|
+
behaviourPack = sortedByKey(behaviour.behaviour);
|
|
742
|
+
for (const failure of behaviour.behaviourFailures) failures.push({
|
|
723
743
|
id: failure.id,
|
|
724
744
|
kind: "behaviour",
|
|
725
|
-
reason: failure.reason
|
|
745
|
+
reason: behaviourFrom ? `read from ${behaviourFrom}: ${failure.reason}` : failure.reason
|
|
726
746
|
});
|
|
727
747
|
if (process.env.RENDERMITE_LIGHT_DEBUG) console.error(collected.notes.join("\n"));
|
|
728
748
|
}
|
|
@@ -988,6 +1008,7 @@ async function exportBlockPack(options) {
|
|
|
988
1008
|
version,
|
|
989
1009
|
namespaces,
|
|
990
1010
|
counts,
|
|
1011
|
+
...behaviourFrom && Object.keys(behaviourPack).length > 0 && { behaviourFrom },
|
|
991
1012
|
hashes: sortedByKey(hashes)
|
|
992
1013
|
}, null, " "));
|
|
993
1014
|
return {
|
package/dist/index.d.ts
CHANGED
|
@@ -4,11 +4,11 @@ import { a as TextureMeta, i as TextureLoader, o as TextureResolutionError, r as
|
|
|
4
4
|
import { d as parseAtlasSources, n as AtlasSource, r as AtlasSourceError, s as ResolvedSprite, t as AtlasResolver, u as createAtlasResolver } from "./sources-sFtealLJ.js";
|
|
5
5
|
import { a as PackedRect, i as PackedPage, n as PackOptions, o as packAtlas, r as PackedAtlas, t as PackEntry } from "./atlas-pack-BUadroKy.js";
|
|
6
6
|
import { c as buildBiomeClimates, i as LEGACY_BIOMES, l as parseBiomeClimate, n as BiomeClimatePack, o as PRE_JAR_BIOMES, r as DEFAULT_WATER_COLOR, s as VANILLA_BIOME_CLIMATES, t as BiomeClimate, u as vanillaBiomesFor } from "./biomes-CnnhDCnk.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-
|
|
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-C-ZSx78w.js";
|
|
8
8
|
import { a as resolveTexture, n as ModelResolutionError, o as salvageJson, r as ResolvedModel, t as ModelLoader } from "./loader-BYyPIs9f.js";
|
|
9
9
|
import { i as buildObjMesh, n as ObjMesh, r as ObjMeshError, t as MeshGroup } from "./obj-mesh-CzL0lOlJ.js";
|
|
10
10
|
import { a as buildBlockTints, i as UNREGISTERED_TINTS, n as BlockTintPack, t as BlockTint } from "./tints-DwFmEkf3.js";
|
|
11
|
-
import { i as exportBlockPack, n as BlockPackResult, r as ExportBlockPackOptions, t as BlockPackFailure } from "./export-
|
|
11
|
+
import { i as exportBlockPack, n as BlockPackResult, r as ExportBlockPackOptions, t as BlockPackFailure } from "./export-CnKiSTiu.js";
|
|
12
12
|
import { s as builtinDynamicResources } from "./generators-hu_vk10m.js";
|
|
13
13
|
import { d as toFloatTexture, n as FloatTexture, u as toByteTexture } from "./blend-mJAeQB3C.js";
|
|
14
14
|
import { a as LightingProfileName, i as LightingProfile, r as LightSource, u as lightsForProfile } from "./lighting-3FGRC3Af.js";
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { n as LayeredResourceManager, r as ResourceKind, t as FolderResourceMana
|
|
|
3
3
|
import { n as UnsafeJarError, r as isUnsafeEntryPath, t as JarResourceManager } from "./jar-DvofBm71.js";
|
|
4
4
|
import { a as prepareVersionResources, i as eraForVersion, r as compareVersions } from "./prepare-DkJkZXuQ.js";
|
|
5
5
|
import { a as buildBiomeClimates, i as VANILLA_BIOME_CLIMATES, n as LEGACY_BIOMES, o as parseBiomeClimate, r as PRE_JAR_BIOMES, s as vanillaBiomesFor, t as DEFAULT_WATER_COLOR } from "./biomes-BGOF6gRM.js";
|
|
6
|
-
import { a as parseBlockState, i as matchesCondition, n as collectModels, o as weightedVariantIndex, r as evaluateBlockState, t as BlockStateError } from "./blockstate-eval-
|
|
6
|
+
import { a as parseBlockState, i as matchesCondition, n as collectModels, o as weightedVariantIndex, r as evaluateBlockState, t as BlockStateError } from "./blockstate-eval-CcgxVdKb.js";
|
|
7
7
|
import { c as toByteTexture, l as toFloatTexture } from "./blend-KXMclcHk.js";
|
|
8
8
|
import { c as lightsForProfile, r as LightingProfile } from "./lighting--5myudVu.js";
|
|
9
9
|
import { a as salvageJson, i as resolveTexture, n as ModelResolutionError, t as ModelLoader } from "./loader-qOH0Jynq.js";
|
|
@@ -16,7 +16,7 @@ import { t as packAtlas } from "./atlas-pack-CoOih7By.js";
|
|
|
16
16
|
import { n as buildBlockTints, t as UNREGISTERED_TINTS } from "./tints-Cl0r-Ol3.js";
|
|
17
17
|
import { o as createAtlasResolver, s as parseAtlasSources, t as AtlasSourceError } from "./sources-DYY5Qu-t.js";
|
|
18
18
|
import { n as TextureLoader, r as TextureResolutionError, t as AnimatedTexture } from "./loader-CsgtBuBo.js";
|
|
19
|
-
import { t as exportBlockPack } from "./export-
|
|
19
|
+
import { t as exportBlockPack } from "./export-DE1V-ElS.js";
|
|
20
20
|
import { n as prepareModResources } from "./prepare-sj36BP90.js";
|
|
21
21
|
import { n as encodeIcon, t as encodeAnimatedIcon } from "./encode-TzYXOEId.js";
|
|
22
22
|
import { a as builtinDynamicResources } from "./generators-D6giKoab.js";
|
|
@@ -901,7 +901,9 @@ var Interpreter = class Interpreter {
|
|
|
901
901
|
return;
|
|
902
902
|
}
|
|
903
903
|
}
|
|
904
|
-
const
|
|
904
|
+
const returnsRecord = returns.startsWith("L") && source.resolve(returns.slice(1, -1))?.superClass === "java/lang/Record";
|
|
905
|
+
const returnsProps = returns.startsWith("L") && this.isPropsType(returns.slice(1, -1));
|
|
906
|
+
const registered = returnsRecord || returnsProps ? null : this.detectRegistration(args, `${remapped.owner}.${remapped.name}${remapped.descriptor}`);
|
|
905
907
|
if (registered) {
|
|
906
908
|
this.push(returns === "V" ? null : returns.startsWith("L") ? {
|
|
907
909
|
kind: "object",
|
|
@@ -979,7 +981,6 @@ var Interpreter = class Interpreter {
|
|
|
979
981
|
return;
|
|
980
982
|
}
|
|
981
983
|
}
|
|
982
|
-
const returnsProps = returns.startsWith("L") && this.isPropsType(returns.slice(1, -1));
|
|
983
984
|
if (returnsProps && !hasReceiver && args.some((arg) => arg.kind === "object" && (arg.handle.isProps || arg.handle.props))) {
|
|
984
985
|
this.push(this.opaqueResult(returns, args));
|
|
985
986
|
return;
|
|
@@ -4,7 +4,7 @@ import { c as resolveMappings, s as remapDescriptor, t as MappingsUnavailableErr
|
|
|
4
4
|
import { t as readAhead } from "./read-ahead-BlSzTexs.js";
|
|
5
5
|
import { t as blockBehaviour } from "./block-behaviour-DVjqeSkv.js";
|
|
6
6
|
import { i as overrideOf, n as constantFluidOf, t as alwaysInvisible } from "./block-overrides-BhuJIxKC.js";
|
|
7
|
-
import { t as extractBlockLight } from "./light-bytecode-
|
|
7
|
+
import { t as extractBlockLight } from "./light-bytecode-CQzTG8DJ.js";
|
|
8
8
|
//#region src/blocks/light.ts
|
|
9
9
|
/**
|
|
10
10
|
* Block light emission for the exported pack: `light.json`.
|
|
@@ -476,6 +476,7 @@ const VANILLA_LIGHT = {
|
|
|
476
476
|
sculk_catalyst: 6,
|
|
477
477
|
amethyst_cluster: 5,
|
|
478
478
|
large_amethyst_bud: 4,
|
|
479
|
+
ice_crystal: 4,
|
|
479
480
|
magma_block: 3,
|
|
480
481
|
medium_amethyst_bud: 2,
|
|
481
482
|
firefly_bush: 2,
|
|
@@ -638,4 +639,4 @@ for (const name of ["candle", ...[
|
|
|
638
639
|
VANILLA_LIGHT[`${name}_cake`] = lit(3);
|
|
639
640
|
}
|
|
640
641
|
//#endregion
|
|
641
|
-
export {
|
|
642
|
+
export { vanillaLightAt as i, VANILLA_LIGHT as n, collectBlockLight as r, NOT_BLOCKS as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as BlockProperties } from "./blockstate-eval-
|
|
2
|
-
import { j as BlockPackLight } from "./block-behaviour-
|
|
1
|
+
import { n as BlockProperties } from "./blockstate-eval-C-ZSx78w.js";
|
|
2
|
+
import { j as BlockPackLight } from "./block-behaviour-B5lD0RfG.js";
|
|
3
3
|
//#region src/blocks/light-eval.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* The light a block emits in the given state, 0–15.
|
package/dist/pack.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as BiomeClimatePack, t as BiomeClimate } from "./biomes-CnnhDCnk.js";
|
|
2
|
-
import { a as BlockStateMultipartCase, d as matchesCondition, n as BlockProperties, o as BlockStateVariantCase, p as weightedVariantIndex, r as BlockStateDefinition, s as MultipartCondition, t as BlockModelVariant, u as evaluateBlockState } from "./blockstate-eval-
|
|
2
|
+
import { a as BlockStateMultipartCase, d as matchesCondition, n as BlockProperties, o as BlockStateVariantCase, p as weightedVariantIndex, r as BlockStateDefinition, s as MultipartCondition, t as BlockModelVariant, u as evaluateBlockState } from "./blockstate-eval-C-ZSx78w.js";
|
|
3
3
|
import { t as GameRule } from "./game-rules-ThvdDG3B.js";
|
|
4
4
|
import { n as ObjMesh, t as MeshGroup } from "./obj-mesh-CzL0lOlJ.js";
|
|
5
5
|
import { n as BlockTintPack, t as BlockTint } from "./tints-DwFmEkf3.js";
|
|
6
|
-
import { B as BlockPackStatesFile, C as BlockPackBlockState, F as BlockPackModelsFile, H as BlockPackTintsFile, I as BlockPackNamesFile, L as BlockPackRenderLayer, M as BlockPackLightFile, N as BlockPackMetaFile, O as BlockPackFace, P as BlockPackModel, R as BlockPackSprite, S as BlockPackBiomesFile, T as BlockPackElement, U as BlockPackVariant, V as BlockPackTagsFile, b as BlockPackAtlasPage, j as BlockPackLight, k as BlockPackGameRulesFile, n as PushReactionName, t as BlockBehaviour, v as BlockPackAdvancementsFile, w as BlockPackBlockStatesFile, x as BlockPackBehaviourFile, y as BlockPackAtlasFile, z as BlockPackSpriteFrame } from "./block-behaviour-
|
|
7
|
-
import { t as blockLightLevel } from "./light-eval-
|
|
6
|
+
import { B as BlockPackStatesFile, C as BlockPackBlockState, F as BlockPackModelsFile, H as BlockPackTintsFile, I as BlockPackNamesFile, L as BlockPackRenderLayer, M as BlockPackLightFile, N as BlockPackMetaFile, O as BlockPackFace, P as BlockPackModel, R as BlockPackSprite, S as BlockPackBiomesFile, T as BlockPackElement, U as BlockPackVariant, V as BlockPackTagsFile, b as BlockPackAtlasPage, j as BlockPackLight, k as BlockPackGameRulesFile, n as PushReactionName, t as BlockBehaviour, v as BlockPackAdvancementsFile, w as BlockPackBlockStatesFile, x as BlockPackBehaviourFile, y as BlockPackAtlasFile, z as BlockPackSpriteFrame } from "./block-behaviour-B5lD0RfG.js";
|
|
7
|
+
import { t as blockLightLevel } from "./light-eval-BuwUW4Tj.js";
|
|
8
8
|
export { type BiomeClimate, type BiomeClimatePack, type BlockBehaviour, type BlockModelVariant, type BlockPackAdvancementsFile, type BlockPackAtlasFile, type BlockPackAtlasPage, type BlockPackBehaviourFile, type BlockPackBiomesFile, type BlockPackBlockState, type BlockPackBlockStatesFile, type BlockPackElement, type BlockPackFace, type BlockPackGameRulesFile, type BlockPackLight, type BlockPackLightFile, type BlockPackMetaFile, type BlockPackModel, type BlockPackModelsFile, type BlockPackNamesFile, type BlockPackRenderLayer, type BlockPackSprite, type BlockPackSpriteFrame, type BlockPackStatesFile, type BlockPackTagsFile, type BlockPackTintsFile, type BlockPackVariant, type BlockProperties, type BlockStateDefinition, type BlockStateMultipartCase, type BlockStateVariantCase, type BlockTint, type BlockTintPack, type GameRule, type MeshGroup, type MultipartCondition, type ObjMesh, type PushReactionName, blockLightLevel, evaluateBlockState, matchesCondition, weightedVariantIndex };
|
package/dist/pack.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as matchesCondition, o as weightedVariantIndex, r as evaluateBlockState } from "./blockstate-eval-
|
|
1
|
+
import { i as matchesCondition, o as weightedVariantIndex, r as evaluateBlockState } from "./blockstate-eval-CcgxVdKb.js";
|
|
2
2
|
import { t as blockLightLevel } from "./light-eval-BsJJoSv4.js";
|
|
3
3
|
export { blockLightLevel, evaluateBlockState, matchesCondition, weightedVariantIndex };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nodecraft/rendermite",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.1",
|
|
4
4
|
"description": "Minecraft item icon renderer: renders inventory-identical item icons from vanilla and modded assets across game versions, outputting optimized PNG/WebP/AVIF plus CSS and a JSON item library.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|