nucleation 0.1.92 → 0.1.93

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.
@@ -243,10 +243,6 @@ export function debug_schematic(schematic) {
243
243
  }
244
244
  }
245
245
 
246
- export function start() {
247
- wasm.start();
248
- }
249
-
250
246
  /**
251
247
  * @param {SchematicWrapper} schematic
252
248
  * @returns {string}
@@ -265,6 +261,10 @@ export function debug_json_schematic(schematic) {
265
261
  }
266
262
  }
267
263
 
264
+ export function start() {
265
+ wasm.start();
266
+ }
267
+
268
268
  const BlockPositionFinalization = (typeof FinalizationRegistry === 'undefined')
269
269
  ? { register: () => {}, unregister: () => {} }
270
270
  : new FinalizationRegistry(ptr => wasm.__wbg_blockposition_free(ptr >>> 0, 1));
@@ -1007,6 +1007,21 @@ export class SchematicWrapper {
1007
1007
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
1008
1008
  return v1;
1009
1009
  }
1010
+ /**
1011
+ * @param {number} x
1012
+ * @param {number} y
1013
+ * @param {number} z
1014
+ * @param {string} block_name
1015
+ * @param {any} nbt_data
1016
+ */
1017
+ setBlockWithNbt(x, y, z, block_name, nbt_data) {
1018
+ const ptr0 = passStringToWasm0(block_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1019
+ const len0 = WASM_VECTOR_LEN;
1020
+ const ret = wasm.schematicwrapper_setBlockWithNbt(this.__wbg_ptr, x, y, z, ptr0, len0, nbt_data);
1021
+ if (ret[1]) {
1022
+ throw takeFromExternrefTable0(ret[0]);
1023
+ }
1024
+ }
1010
1025
  /**
1011
1026
  * @param {number} chunk_width
1012
1027
  * @param {number} chunk_height
package/nucleation.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export function debug_schematic(schematic: SchematicWrapper): string;
4
- export function start(): void;
5
4
  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;
@@ -188,6 +188,7 @@ export class SchematicWrapper {
188
188
  get_bounding_box(): any;
189
189
  get_chunk_blocks(offset_x: number, offset_y: number, offset_z: number, width: number, height: number, length: number): Array<any>;
190
190
  get_region_names(): string[];
191
+ setBlockWithNbt(x: number, y: number, z: number, block_name: string, nbt_data: any): void;
191
192
  chunks_with_strategy(chunk_width: number, chunk_height: number, chunk_length: number, strategy: string, camera_x: number, camera_y: number, camera_z: number): Array<any>;
192
193
  /**
193
194
  * Get the tight bounding box max coordinates [x, y, z]
@@ -385,6 +386,7 @@ export interface InitOutput {
385
386
  readonly schematicwrapper_rotate_x: (a: number, b: number) => void;
386
387
  readonly schematicwrapper_rotate_y: (a: number, b: number) => void;
387
388
  readonly schematicwrapper_rotate_z: (a: number, b: number) => void;
389
+ readonly schematicwrapper_setBlockWithNbt: (a: number, b: number, c: number, d: number, e: number, f: number, g: any) => [number, number];
388
390
  readonly schematicwrapper_set_block: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
389
391
  readonly schematicwrapper_set_block_with_properties: (a: number, b: number, c: number, d: number, e: number, f: number, g: any) => [number, number];
390
392
  readonly schematicwrapper_to_litematic: (a: number) => [number, number, number, number];
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.92",
8
+ "version": "0.1.93",
9
9
  "license": "AGPL-3.0-only",
10
10
  "repository": {
11
11
  "type": "git",