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/bundle.js CHANGED
@@ -97035,13 +97035,16 @@ property list uchar int vertex_index
97035
97035
  const blocks = nbt.blocks.value.value.map((block) => {
97036
97036
  const state = palette.value.value[block.state.value];
97037
97037
  if (!state) throw new MineRenderError(`Structure palette index ${block.state.value} does not exist`);
97038
- if (["minecraft:air", "minecraft:cave_air", "minecraft:void_air"].includes(state.Name.value)) return void 0;
97038
+ const name2 = (state.Name ?? state.id)?.value;
97039
+ if (!name2) throw new MineRenderError(`Structure palette entry ${block.state.value} has no block name`);
97040
+ if (["minecraft:air", "minecraft:cave_air", "minecraft:void_air"].includes(name2)) return void 0;
97039
97041
  const props = {};
97040
- for (let k4 in state.Properties?.value) {
97041
- props[k4] = state.Properties.value[k4].value;
97042
+ const properties = (state.Properties ?? state.properties)?.value;
97043
+ for (let k4 in properties) {
97044
+ props[k4] = properties[k4].value;
97042
97045
  }
97043
97046
  return {
97044
- type: state.Name.value,
97047
+ type: name2,
97045
97048
  properties: props,
97046
97049
  position: block.pos.value.value,
97047
97050
  nbt: block.nbt