minerender 2.1.0-alpha.138 → 2.1.0-alpha.139
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/browser/esm/index.browser.d.mts +12 -2
- package/dist/browser/esm/model/multiblock/StructureParser.mjs +7 -4
- package/dist/browser/esm/model/multiblock/StructureParser.mjs.map +1 -1
- package/dist/browser/index.d.ts +12 -2
- package/dist/browser/index.js +7 -4
- package/dist/browser/index.js.map +1 -1
- package/dist/bundle.js +7 -4
- package/dist/bundle.js.map +1 -1
- package/dist/node/index.d.mts +12 -2
- package/dist/node/index.d.ts +12 -2
- package/dist/node/index.js +7 -4
- package/dist/node/index.js.map +1 -1
- package/dist/node/index.mjs +7 -4
- package/dist/node/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/node/index.mjs
CHANGED
|
@@ -13798,13 +13798,16 @@ var StructureParser = class {
|
|
|
13798
13798
|
const blocks = nbt.blocks.value.value.map((block) => {
|
|
13799
13799
|
const state = palette.value.value[block.state.value];
|
|
13800
13800
|
if (!state) throw new MineRenderError(`Structure palette index ${block.state.value} does not exist`);
|
|
13801
|
-
|
|
13801
|
+
const name = (state.Name ?? state.id)?.value;
|
|
13802
|
+
if (!name) throw new MineRenderError(`Structure palette entry ${block.state.value} has no block name`);
|
|
13803
|
+
if (["minecraft:air", "minecraft:cave_air", "minecraft:void_air"].includes(name)) return void 0;
|
|
13802
13804
|
const props = {};
|
|
13803
|
-
|
|
13804
|
-
|
|
13805
|
+
const properties = (state.Properties ?? state.properties)?.value;
|
|
13806
|
+
for (let k in properties) {
|
|
13807
|
+
props[k] = properties[k].value;
|
|
13805
13808
|
}
|
|
13806
13809
|
return {
|
|
13807
|
-
type:
|
|
13810
|
+
type: name,
|
|
13808
13811
|
properties: props,
|
|
13809
13812
|
position: block.pos.value.value,
|
|
13810
13813
|
nbt: block.nbt
|