nucleation 0.1.75 → 0.1.77

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.
@@ -225,6 +225,11 @@ function getArrayJsValueFromWasm0(ptr, len) {
225
225
  wasm.__externref_drop_slice(ptr, len);
226
226
  return result;
227
227
  }
228
+
229
+ export function start() {
230
+ wasm.start();
231
+ }
232
+
228
233
  /**
229
234
  * @param {SchematicWrapper} schematic
230
235
  * @returns {string}
@@ -261,10 +266,6 @@ export function debug_json_schematic(schematic) {
261
266
  }
262
267
  }
263
268
 
264
- export function start() {
265
- wasm.start();
266
- }
267
-
268
269
  const BlockPositionFinalization = (typeof FinalizationRegistry === 'undefined')
269
270
  ? { register: () => {}, unregister: () => {} }
270
271
  : new FinalizationRegistry(ptr => wasm.__wbg_blockposition_free(ptr >>> 0, 1));
@@ -799,6 +800,22 @@ export class SchematicWrapper {
799
800
  const ret = wasm.schematicwrapper_get_block_entity(this.__wbg_ptr, x, y, z);
800
801
  return ret;
801
802
  }
803
+ /**
804
+ * Get block as formatted string with properties (e.g., "minecraft:lever[powered=true,facing=north]")
805
+ * @param {number} x
806
+ * @param {number} y
807
+ * @param {number} z
808
+ * @returns {string | undefined}
809
+ */
810
+ get_block_string(x, y, z) {
811
+ const ret = wasm.schematicwrapper_get_block_string(this.__wbg_ptr, x, y, z);
812
+ let v1;
813
+ if (ret[0] !== 0) {
814
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
815
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
816
+ }
817
+ return v1;
818
+ }
802
819
  /**
803
820
  * @returns {any}
804
821
  */
package/nucleation.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ export function start(): void;
3
4
  export function debug_schematic(schematic: SchematicWrapper): string;
4
5
  export function debug_json_schematic(schematic: SchematicWrapper): string;
5
- export function start(): void;
6
6
  export class BlockPosition {
7
7
  free(): void;
8
8
  [Symbol.dispose](): void;
@@ -116,6 +116,10 @@ export class SchematicWrapper {
116
116
  */
117
117
  get_all_palettes(): any;
118
118
  get_block_entity(x: number, y: number, z: number): any;
119
+ /**
120
+ * Get block as formatted string with properties (e.g., "minecraft:lever[powered=true,facing=north]")
121
+ */
122
+ get_block_string(x: number, y: number, z: number): string | undefined;
119
123
  get_bounding_box(): any;
120
124
  get_chunk_blocks(offset_x: number, offset_y: number, offset_z: number, width: number, height: number, length: number): Array<any>;
121
125
  get_region_names(): string[];
@@ -205,6 +209,7 @@ export interface InitOutput {
205
209
  readonly schematicwrapper_get_block: (a: number, b: number, c: number, d: number) => [number, number];
206
210
  readonly schematicwrapper_get_block_count: (a: number) => number;
207
211
  readonly schematicwrapper_get_block_entity: (a: number, b: number, c: number, d: number) => any;
212
+ readonly schematicwrapper_get_block_string: (a: number, b: number, c: number, d: number) => [number, number];
208
213
  readonly schematicwrapper_get_block_with_properties: (a: number, b: number, c: number, d: number) => number;
209
214
  readonly schematicwrapper_get_bounding_box: (a: number) => any;
210
215
  readonly schematicwrapper_get_chunk_blocks: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
Binary file
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "Nano nano@schem.at"
6
6
  ],
7
7
  "description": "A high-performance Minecraft schematic parser and utility library",
8
- "version": "0.1.75",
8
+ "version": "0.1.77",
9
9
  "license": "AGPL-3.0-only",
10
10
  "repository": {
11
11
  "type": "git",