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.
@@ -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
- if (["minecraft:air", "minecraft:cave_air", "minecraft:void_air"].includes(state.Name.value)) return void 0;
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
- for (let k in state.Properties?.value) {
13804
- props[k] = state.Properties.value[k].value;
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: state.Name.value,
13810
+ type: name,
13808
13811
  properties: props,
13809
13812
  position: block.pos.value.value,
13810
13813
  nbt: block.nbt