nucleation 0.5.1 → 0.7.0

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.
Files changed (190) hide show
  1. package/AnimationEffect.d.mts +44 -0
  2. package/AnimationEffect.d.ts +1 -1
  3. package/Autostack.d.mts +43 -0
  4. package/Autostack.d.ts +2 -2
  5. package/BlockPos.d.mts +28 -0
  6. package/BlockState.d.mts +39 -0
  7. package/BlockState.d.ts +1 -1
  8. package/Blocks.d.mts +91 -0
  9. package/Blocks.d.ts +1 -1
  10. package/Brush.d.mts +99 -0
  11. package/Brush.d.ts +21 -12
  12. package/Brush.mjs +66 -9
  13. package/BuildAnimation.d.mts +142 -0
  14. package/BuildAnimation.d.ts +5 -5
  15. package/BuildingTool.d.mts +46 -0
  16. package/BuildingTool.d.ts +4 -4
  17. package/CellularSdfConfig.d.mts +22 -0
  18. package/CellularSdfConfig.d.ts +22 -0
  19. package/CellularSdfConfig.mjs +69 -0
  20. package/ChunkMeshResult.d.mts +75 -0
  21. package/ChunkMeshResult.d.ts +7 -7
  22. package/CircuitBuilder.d.mts +118 -0
  23. package/CircuitBuilder.d.ts +6 -6
  24. package/Curve3D.d.mts +27 -0
  25. package/Curve3D.d.ts +1 -1
  26. package/DefinitionRegion.d.mts +274 -0
  27. package/DefinitionRegion.d.ts +5 -5
  28. package/Diff.d.mts +88 -0
  29. package/Diff.d.ts +2 -2
  30. package/Dimensions.d.mts +28 -0
  31. package/DistanceField.d.mts +39 -0
  32. package/DistanceField.d.ts +1 -1
  33. package/ExecutionMode.d.mts +42 -0
  34. package/ExecutionMode.d.ts +2 -2
  35. package/Field3.d.mts +40 -0
  36. package/Field3.d.ts +40 -0
  37. package/Field3.mjs +160 -0
  38. package/FieldProgram.d.mts +40 -0
  39. package/FieldProgram.d.ts +40 -0
  40. package/FieldProgram.mjs +167 -0
  41. package/FieldProgramBinaryOp.d.mts +42 -0
  42. package/FieldProgramBinaryOp.d.ts +42 -0
  43. package/FieldProgramBinaryOp.mjs +118 -0
  44. package/FieldProgramBuilder.d.mts +104 -0
  45. package/FieldProgramBuilder.d.ts +104 -0
  46. package/FieldProgramBuilder.mjs +486 -0
  47. package/FieldProgramDistanceKind.d.mts +26 -0
  48. package/FieldProgramDistanceKind.d.ts +26 -0
  49. package/FieldProgramDistanceKind.mjs +78 -0
  50. package/FieldProgramUnaryOp.d.mts +34 -0
  51. package/FieldProgramUnaryOp.d.ts +34 -0
  52. package/FieldProgramUnaryOp.mjs +102 -0
  53. package/FieldProgramValueType.d.mts +25 -0
  54. package/FieldProgramValueType.d.ts +25 -0
  55. package/FieldProgramValueType.mjs +75 -0
  56. package/FieldRange.d.mts +15 -0
  57. package/FieldRange.d.ts +15 -0
  58. package/FieldRange.mjs +108 -0
  59. package/Fingerprint.d.mts +44 -0
  60. package/Fingerprint.d.ts +2 -2
  61. package/GeneratedChunk.d.mts +35 -0
  62. package/GeneratedChunk.d.ts +35 -0
  63. package/GeneratedChunk.mjs +178 -0
  64. package/GeneratedChunkCoverage.d.mts +25 -0
  65. package/GeneratedChunkCoverage.d.ts +25 -0
  66. package/GeneratedChunkCoverage.mjs +75 -0
  67. package/GeneratedChunkOverlayMode.d.mts +24 -0
  68. package/GeneratedChunkOverlayMode.d.ts +24 -0
  69. package/GeneratedChunkOverlayMode.mjs +72 -0
  70. package/GeneratedWorldStream.d.mts +28 -0
  71. package/GeneratedWorldStream.d.ts +28 -0
  72. package/GeneratedWorldStream.mjs +86 -0
  73. package/Geo.d.mts +41 -0
  74. package/Geo.d.ts +2 -2
  75. package/InterpolationSpace.d.mts +25 -0
  76. package/IoLayout.d.mts +26 -0
  77. package/IoLayoutBuilder.d.mts +73 -0
  78. package/IoLayoutBuilder.d.ts +4 -4
  79. package/IoType.d.mts +41 -0
  80. package/ItemModelConfig.d.mts +65 -0
  81. package/ItemModelConfig.d.ts +1 -1
  82. package/ItemModelPackBuilder.d.mts +32 -0
  83. package/ItemModelPackBuilder.d.ts +1 -1
  84. package/ItemModelResult.d.mts +72 -0
  85. package/ItemModelResult.d.ts +7 -7
  86. package/ItemScale.d.mts +31 -0
  87. package/LayoutFunction.d.mts +52 -0
  88. package/LayoutFunction.d.ts +1 -1
  89. package/MchprsWorld.d.mts +131 -0
  90. package/MchprsWorld.d.ts +3 -3
  91. package/MeshBounds.d.mts +40 -0
  92. package/MeshConfig.d.mts +101 -0
  93. package/MeshConfig.d.ts +1 -1
  94. package/MeshJob.d.mts +44 -0
  95. package/MeshJob.d.ts +7 -7
  96. package/MeshPhase.d.mts +38 -0
  97. package/MeshProgress.d.mts +32 -0
  98. package/MeshProgress.d.ts +1 -1
  99. package/MeshResult.d.mts +65 -0
  100. package/MeshResult.d.ts +5 -5
  101. package/MultiMeshResult.d.mts +50 -0
  102. package/MultiMeshResult.d.ts +5 -5
  103. package/Nbt.d.mts +50 -0
  104. package/Nbt.d.ts +1 -1
  105. package/NucleationError.d.mts +41 -0
  106. package/NucleationError.d.ts +5 -0
  107. package/NucleationError.mjs +8 -1
  108. package/OutputCondition.d.mts +45 -0
  109. package/OutputCondition.d.ts +1 -1
  110. package/Palette.d.mts +145 -0
  111. package/Palette.d.ts +9 -1
  112. package/Palette.mjs +35 -0
  113. package/PaletteBuilder.d.mts +119 -0
  114. package/PaletteBuilder.d.ts +2 -2
  115. package/RawMeshExport.d.mts +74 -0
  116. package/RawMeshExport.d.ts +4 -4
  117. package/RedstoneGraph.d.mts +58 -0
  118. package/RedstoneGraph.d.ts +1 -1
  119. package/RegionBounds.d.mts +41 -0
  120. package/RenderConfig.d.mts +101 -0
  121. package/RenderConfig.d.ts +1 -1
  122. package/Renderer.d.mts +51 -0
  123. package/Renderer.d.ts +4 -4
  124. package/ResourcePack.d.mts +105 -0
  125. package/ResourcePack.d.ts +3 -3
  126. package/ResourcePackList.d.mts +32 -0
  127. package/Schematic.d.mts +734 -0
  128. package/Schematic.d.ts +4 -4
  129. package/SchematicBuilder.d.mts +103 -0
  130. package/SchematicBuilder.d.ts +2 -2
  131. package/SchematicRegions.d.mts +93 -0
  132. package/SchematicRegions.d.ts +3 -3
  133. package/Scripting.d.mts +40 -0
  134. package/Scripting.d.ts +2 -2
  135. package/Sdf.d.mts +234 -0
  136. package/Sdf.d.ts +208 -13
  137. package/Sdf.mjs +1106 -11
  138. package/SdfAxis.d.mts +25 -0
  139. package/SdfAxis.d.ts +25 -0
  140. package/SdfAxis.mjs +75 -0
  141. package/SdfBounds.d.mts +19 -0
  142. package/SdfBounds.d.ts +19 -0
  143. package/SdfBounds.mjs +160 -0
  144. package/SdfCellMode.d.mts +26 -0
  145. package/SdfCellMode.d.ts +26 -0
  146. package/SdfCellMode.mjs +78 -0
  147. package/SdfNormal.d.mts +16 -0
  148. package/SdfNormal.d.ts +16 -0
  149. package/SdfNormal.mjs +121 -0
  150. package/Shape.d.mts +143 -0
  151. package/Shape.d.ts +2 -2
  152. package/SortStrategy.d.mts +86 -0
  153. package/SortStrategy.d.ts +1 -1
  154. package/Store.d.mts +83 -0
  155. package/Store.d.ts +2 -2
  156. package/StoreIo.d.mts +71 -0
  157. package/StoreIo.d.ts +2 -2
  158. package/TextureAtlas.d.mts +40 -0
  159. package/TextureAtlas.d.ts +4 -4
  160. package/TextureInfo.d.mts +34 -0
  161. package/TypedCircuitExecutor.d.mts +101 -0
  162. package/TypedCircuitExecutor.d.ts +6 -6
  163. package/Value.d.mts +73 -0
  164. package/Value.d.ts +1 -1
  165. package/VideoConfig.d.mts +15 -0
  166. package/Voxelizer.d.mts +58 -0
  167. package/Voxelizer.d.ts +4 -4
  168. package/WorldChunkView.d.mts +75 -0
  169. package/WorldChunkView.d.ts +2 -2
  170. package/WorldGenerator.d.mts +75 -0
  171. package/WorldGenerator.d.ts +75 -0
  172. package/WorldGenerator.mjs +255 -0
  173. package/WorldSink.d.mts +50 -0
  174. package/WorldSink.d.ts +2 -2
  175. package/WorldStream.d.mts +45 -0
  176. package/WorldStream.d.ts +2 -2
  177. package/WsPartitionHints.d.mts +29 -0
  178. package/WsPartitionHints.d.ts +1 -1
  179. package/WsProfile.d.mts +46 -0
  180. package/WsProfile.d.ts +1 -1
  181. package/WsRunResult.d.mts +83 -0
  182. package/WsRunResult.d.ts +5 -5
  183. package/WsSegmentJob.d.mts +28 -0
  184. package/WsSegmentJob.d.ts +1 -1
  185. package/diplomat-runtime.d.mts +15 -0
  186. package/index.d.mts +177 -0
  187. package/index.d.ts +106 -70
  188. package/index.mjs +37 -1
  189. package/nucleation.wasm +0 -0
  190. package/package.json +2 -1
@@ -0,0 +1,734 @@
1
+ // generated by diplomat-tool
2
+ import type { BlockPos } from "./BlockPos.mjs"
3
+ import type { BlockState } from "./BlockState.mjs"
4
+ import type { Dimensions } from "./Dimensions.mjs"
5
+ import type { NucleationError } from "./NucleationError.mjs"
6
+ import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
7
+
8
+
9
+
10
+ export class Schematic {
11
+ /** @internal */
12
+ get ffiValue(): pointer;
13
+ /** @internal */
14
+ constructor();
15
+
16
+
17
+ /**
18
+ * Create a new, empty schematic with the given name.
19
+ */
20
+ static create(name: string): Schematic;
21
+
22
+ /**
23
+ * Return an independent deep copy. Subsequent block, region, entity,
24
+ * metadata, or transform changes do not affect the original.
25
+ */
26
+ deepClone(): Schematic;
27
+
28
+ /**
29
+ * The allocated dimensions (width, height, length) of the schematic's
30
+ * bounding box.
31
+ */
32
+ dimensions(): Dimensions;
33
+
34
+ /**
35
+ * Returns `true` if a block was placed (out-of-range coordinates extend the
36
+ * schematic rather than erroring, matching `UniversalSchematic::set_block`).
37
+ */
38
+ setBlock(x: number, y: number, z: number, blockName: string): boolean;
39
+
40
+ /**
41
+ * The name of the block at a position. `NotFound` if the position is
42
+ * outside every region.
43
+ */
44
+ getBlockName(x: number, y: number, z: number): string;
45
+
46
+ /**
47
+ * Build a schematic from raw byte data, auto-detecting the format.
48
+ * Supports Litematic, Sponge Schematic, and McStructure (Bedrock) formats.
49
+ * `Parse` if a format was detected but failed to parse, `InvalidArgument` if
50
+ * no format was recognized.
51
+ */
52
+ static fromData(data: Array<number>): Schematic;
53
+
54
+ /**
55
+ * Build a schematic from Litematic data.
56
+ */
57
+ static fromLitematic(data: Array<number>): Schematic;
58
+
59
+ /**
60
+ * The schematic as Litematic bytes, base64-encoded.
61
+ */
62
+ toLitematicB64(): string;
63
+
64
+ /**
65
+ * Build a schematic from classic `.schematic` data.
66
+ */
67
+ static fromSchematic(data: Array<number>): Schematic;
68
+
69
+ /**
70
+ * The schematic as classic `.schematic` bytes, base64-encoded.
71
+ */
72
+ toSchematicB64(): string;
73
+
74
+ /**
75
+ * Build a schematic from snapshot (fast binary) data.
76
+ */
77
+ static fromSnapshot(data: Array<number>): Schematic;
78
+
79
+ /**
80
+ * The schematic as snapshot (fast binary) bytes, base64-encoded.
81
+ */
82
+ toSnapshotB64(): string;
83
+
84
+ /**
85
+ * Build a schematic from McStructure (Bedrock) data.
86
+ */
87
+ static fromMcstructure(data: Array<number>): Schematic;
88
+
89
+ /**
90
+ * The schematic as McStructure (Bedrock) bytes, base64-encoded.
91
+ */
92
+ toMcstructureB64(): string;
93
+
94
+ /**
95
+ * Import from a single MCA region file.
96
+ */
97
+ static fromMca(data: Array<number>): Schematic;
98
+
99
+ /**
100
+ * Import from MCA with coordinate bounds.
101
+ */
102
+ static fromMcaBounded(data: Array<number>, minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number): Schematic;
103
+
104
+ /**
105
+ * Import from a zipped world folder.
106
+ */
107
+ static fromWorldZip(data: Array<number>): Schematic;
108
+
109
+ /**
110
+ * Import from zipped world with coordinate bounds.
111
+ */
112
+ static fromWorldZipBounded(data: Array<number>, minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number): Schematic;
113
+
114
+ /**
115
+ * Import from a Minecraft world directory path.
116
+ */
117
+ static fromWorldDirectory(path: string): Schematic;
118
+
119
+ /**
120
+ * Import from world directory with coordinate bounds.
121
+ */
122
+ static fromWorldDirectoryBounded(path: string, minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number): Schematic;
123
+
124
+ /**
125
+ * Export the schematic as a Minecraft world: a JSON array of
126
+ * `{"path": <relative file path>, "data_b64": <base64 bytes>}` entries
127
+ * (the old `CFileMap`). `options_json` may be empty for defaults.
128
+ */
129
+ toWorldJson(optionsJson: string): string;
130
+
131
+ /**
132
+ * Export and write world files to a directory. `options_json` may be empty.
133
+ */
134
+ saveWorld(directory: string, optionsJson: string): void;
135
+
136
+ /**
137
+ * Export the schematic as a zipped Minecraft world, base64-encoded.
138
+ * `options_json` may be empty for defaults.
139
+ */
140
+ toWorldZipB64(optionsJson: string): string;
141
+
142
+ /**
143
+ * Set a block with properties given as a JSON object of string→string
144
+ * (the old `CProperty` array).
145
+ */
146
+ setBlockWithProperties(x: number, y: number, z: number, blockName: string, propertiesJson: string): void;
147
+
148
+ /**
149
+ * Set a block from a full block string, e.g.
150
+ * `minecraft:chest[facing=north]{Items:[...]}`.
151
+ */
152
+ setBlockFromString(x: number, y: number, z: number, blockString: string): void;
153
+
154
+ /**
155
+ * Pre-resolve a plain block name to a palette index for use with `place`.
156
+ * Pair them in hot loops with many unique block names to skip the per-call
157
+ * name → palette lookup.
158
+ */
159
+ prepareBlock(blockName: string): number;
160
+
161
+ /**
162
+ * Place a block by pre-resolved palette index (from `prepare_block`).
163
+ */
164
+ place(x: number, y: number, z: number, paletteIndex: number): void;
165
+
166
+ /**
167
+ * Batch-set blocks at multiple positions to the same block (name, block
168
+ * string with properties, or block string with NBT). `positions` is flat
169
+ * `[x0,y0,z0, x1,y1,z1, ...]` (length must be a multiple of 3).
170
+ * Returns the number of blocks set.
171
+ */
172
+ setBlocks(positions: Array<number>, blockName: string): number;
173
+
174
+ /**
175
+ * Batch-get block names at multiple positions. `positions` is flat
176
+ * `[x0,y0,z0, ...]` (length must be a multiple of 3). Writes a JSON array,
177
+ * one entry per position: the block name string, or `null` for
178
+ * empty/out-of-bounds positions.
179
+ */
180
+ getBlocksJson(positions: Array<number>): string;
181
+
182
+ /**
183
+ * Stamp a merged source box into the default region. Excluded blocks
184
+ * are skipped, preserving destination content. Empty string or `[]`
185
+ * means no exclusions.
186
+ */
187
+ stampBox(source: Schematic, minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number, targetX: number, targetY: number, targetZ: number, excludedBlocksJson: string): void;
188
+
189
+ /**
190
+ * Stamp one explicitly named source region into the default region.
191
+ * The region's minimum corner is mapped to the target position.
192
+ */
193
+ stampRegion(source: Schematic, sourceRegionName: string, targetX: number, targetY: number, targetZ: number, excludedBlocksJson: string): void;
194
+
195
+ /**
196
+ * Compatibility alias for `stamp_box`.
197
+ */
198
+ copyRegion(source: Schematic, minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number, targetX: number, targetY: number, targetZ: number, excludedBlocksJson: string): void;
199
+
200
+ /**
201
+ * The full block state at a position. `NotFound` if the position is
202
+ * outside every region.
203
+ */
204
+ getBlock(x: number, y: number, z: number): BlockState;
205
+
206
+ /**
207
+ * The block at a position with its properties, as a `BlockState`.
208
+ * Kept as an explicit alias for callers migrating from the older API.
209
+ */
210
+ getBlockWithProperties(x: number, y: number, z: number): BlockState;
211
+
212
+ /**
213
+ * The full block state at a position in one specific region. This
214
+ * avoids composite lookup ambiguity when regions overlap.
215
+ */
216
+ getBlockInRegion(regionName: string, x: number, y: number, z: number): BlockState;
217
+
218
+ /**
219
+ * The block string at a position in one specific region.
220
+ */
221
+ getBlockStringInRegion(regionName: string, x: number, y: number, z: number): string;
222
+
223
+ /**
224
+ * The full block string (name, properties, NBT) at a position.
225
+ */
226
+ getBlockString(x: number, y: number, z: number): string;
227
+
228
+ /**
229
+ * The block entity at a position as JSON
230
+ * `{"id": ..., "position": [x,y,z], "nbt": {...}}` (the old `CBlockEntity`).
231
+ */
232
+ getBlockEntityJson(x: number, y: number, z: number): string;
233
+
234
+ /**
235
+ * The block entity at a position in one specific region as JSON.
236
+ */
237
+ getBlockEntityJsonInRegion(regionName: string, x: number, y: number, z: number): string;
238
+
239
+ /**
240
+ * Every block entity as a JSON array of
241
+ * `{"id": ..., "position": [x,y,z], "nbt": {...}}`.
242
+ */
243
+ getAllBlockEntitiesJson(): string;
244
+
245
+ /**
246
+ * The number of mobile entities (not block entities).
247
+ */
248
+ entityCount(): number;
249
+
250
+ /**
251
+ * Every mobile entity as a JSON array of
252
+ * `{"id": ..., "position": [x,y,z], "nbt": {...}}` (the old `CEntityArray`).
253
+ */
254
+ getEntitiesJson(): string;
255
+
256
+ /**
257
+ * Add a mobile entity. `nbt_json` is a JSON object (may be empty).
258
+ */
259
+ addEntity(id: string, x: number, y: number, z: number, nbtJson: string): void;
260
+
261
+ /**
262
+ * Add an armor stand without hand-authoring entity NBT.
263
+ *
264
+ * `armor_material` accepts `diamond`, `netherite`, `iron`, etc.; an
265
+ * empty string creates an unarmored stand. `yaw` uses Minecraft degrees.
266
+ */
267
+ addArmorStand(x: number, y: number, z: number, yaw: number, armorMaterial: string): void;
268
+
269
+ /**
270
+ * Remove a mobile entity by index.
271
+ */
272
+ removeEntity(index: number): void;
273
+
274
+ /**
275
+ * The canonical in-memory data version (the forward-conversion target).
276
+ */
277
+ static canonicalDataVersion(): number;
278
+
279
+ /**
280
+ * Convert block/item/entity data between Minecraft data versions. Forward
281
+ * (`target >= source`) is lossless; reverse is lossy. Writes a JSON loss
282
+ * report (`[]` when lossless).
283
+ */
284
+ convertToDataVersion(targetDataVersion: number, sourceDataVersion: number): string;
285
+
286
+ /**
287
+ * Convert to `target_data_version` using the schematic's captured source
288
+ * version (else `mc_version`, else canonical) as origin, updating metadata
289
+ * to the target. Writes a JSON loss report (`[]` when lossless).
290
+ */
291
+ convertToVersion(targetDataVersion: number): string;
292
+
293
+ /**
294
+ * The Minecraft data version of the file this schematic was loaded from, or
295
+ * `-1` if none was captured (versionless / freshly built).
296
+ */
297
+ sourceDataVersion(): number;
298
+
299
+ /**
300
+ * Override the source data version for formats that carry no Java data
301
+ * version, so the converter knows what to convert *from*.
302
+ */
303
+ setSourceDataVersion(version: number): void;
304
+
305
+ /**
306
+ * Serialize a `.litematic` targeting a specific Minecraft data version. A
307
+ * COPY is converted and the matching Version header written; the schematic
308
+ * is left unchanged. Writes JSON
309
+ * `{"data_b64": <base64 .litematic>, "loss": <loss report>}`.
310
+ */
311
+ toLitematicForVersionJson(targetDataVersion: number): string;
312
+
313
+ /**
314
+ * The block entity's NBT as a typed SNBT string. Round-trips losslessly.
315
+ */
316
+ getBlockEntitySnbt(x: number, y: number, z: number): string;
317
+
318
+ /**
319
+ * Set (or replace) a block entity at a position from a typed SNBT string.
320
+ */
321
+ setBlockEntity(x: number, y: number, z: number, id: string, snbt: string): void;
322
+
323
+ /**
324
+ * Remove the block entity at a position. `NotFound` if none was there.
325
+ */
326
+ removeBlockEntity(x: number, y: number, z: number): void;
327
+
328
+ /**
329
+ * Every block entity as a JSON array of `{id, position: [x,y,z], snbt}`.
330
+ * The `snbt` is the inner data only (no `Id`/`Pos`).
331
+ */
332
+ getAllBlockEntitiesSnbtJson(): string;
333
+
334
+ /**
335
+ * Every mobile entity as a JSON array of typed SNBT strings (full compound
336
+ * incl. `id`/`Pos`).
337
+ */
338
+ getEntitiesSnbtJson(): string;
339
+
340
+ /**
341
+ * Add a mobile entity from a full SNBT entity compound (must contain `id`
342
+ * and `Pos`).
343
+ */
344
+ addEntityFromSnbt(snbt: string): void;
345
+
346
+ /**
347
+ * Every non-air block as a JSON array of
348
+ * `{"x", "y", "z", "name", "properties"}` (the old `CBlockArray`).
349
+ */
350
+ getAllBlocksJson(): string;
351
+
352
+ /**
353
+ * All blocks within a sub-region (chunk) of the schematic, as the same
354
+ * JSON array shape as `get_all_blocks_json`.
355
+ */
356
+ getChunkBlocksJson(offsetX: number, offsetY: number, offsetZ: number, width: number, height: number, length: number): string;
357
+
358
+ /**
359
+ * Split the schematic into chunks (default bottom-up strategy). Writes a
360
+ * JSON array of `{"chunk_x", "chunk_y", "chunk_z", "blocks": [...]}` where
361
+ * blocks have the `get_all_blocks_json` shape (the old `CChunkArray`).
362
+ */
363
+ getChunksJson(chunkWidth: number, chunkHeight: number, chunkLength: number): string;
364
+
365
+ /**
366
+ * Split the schematic into chunks with a loading strategy: one of
367
+ * `distance_to_camera`, `top_down`, `bottom_up`, `center_outward`,
368
+ * `random` (anything else falls back to `bottom_up`). Camera coordinates
369
+ * are only used by `distance_to_camera`. Same JSON shape as
370
+ * `get_chunks_json`.
371
+ */
372
+ getChunksWithStrategyJson(chunkWidth: number, chunkHeight: number, chunkLength: number, strategy: string, cameraX: number, cameraY: number, cameraZ: number): string;
373
+
374
+ /**
375
+ * The total number of non-air blocks in the schematic.
376
+ */
377
+ blockCount(): number;
378
+
379
+ /**
380
+ * The total volume of the schematic's bounding box.
381
+ */
382
+ volume(): number;
383
+
384
+ /**
385
+ * The names of all regions, as a JSON array of strings.
386
+ */
387
+ regionNamesJson(): string;
388
+
389
+ /**
390
+ * Basic debug info about the schematic (name + region count).
391
+ */
392
+ debugInfo(): string;
393
+
394
+ /**
395
+ * A formatted schematic layout string (old `schematic_print`).
396
+ */
397
+ printString(): string;
398
+
399
+ /**
400
+ * A formatted schematic layout string (old `schematic_print_schematic`;
401
+ * same output as `print_string`).
402
+ */
403
+ printSchematicString(): string;
404
+
405
+ /**
406
+ * A detailed debug string, including a visual layout (old `debug_schematic`).
407
+ */
408
+ debugString(): string;
409
+
410
+ /**
411
+ * A detailed debug string with a JSON layout (old `debug_json_schematic`).
412
+ */
413
+ debugJsonString(): string;
414
+
415
+ /**
416
+ * The schematic name. `NotFound` if not set.
417
+ */
418
+ name(): string;
419
+
420
+ /**
421
+ * Set the schematic name.
422
+ */
423
+ setName(name: string): void;
424
+
425
+ /**
426
+ * The schematic author. `NotFound` if not set.
427
+ */
428
+ author(): string;
429
+
430
+ /**
431
+ * Set the schematic author.
432
+ */
433
+ setAuthor(author: string): void;
434
+
435
+ /**
436
+ * The schematic description. `NotFound` if not set.
437
+ */
438
+ description(): string;
439
+
440
+ /**
441
+ * Set the schematic description.
442
+ */
443
+ setDescription(description: string): void;
444
+
445
+ /**
446
+ * The creation timestamp (milliseconds since epoch), or `-1` if not set.
447
+ */
448
+ created(): bigint;
449
+
450
+ /**
451
+ * Set the creation timestamp (milliseconds since epoch).
452
+ */
453
+ setCreated(created: bigint): void;
454
+
455
+ /**
456
+ * The modification timestamp (milliseconds since epoch), or `-1` if not set.
457
+ */
458
+ modified(): bigint;
459
+
460
+ /**
461
+ * Set the modification timestamp (milliseconds since epoch).
462
+ */
463
+ setModified(modified: bigint): void;
464
+
465
+ /**
466
+ * The Litematic format version, or `-1` if not set.
467
+ */
468
+ lmVersion(): number;
469
+
470
+ /**
471
+ * Set the Litematic format version.
472
+ */
473
+ setLmVersion(version: number): void;
474
+
475
+ /**
476
+ * The Minecraft data version, or `-1` if not set.
477
+ */
478
+ mcVersion(): number;
479
+
480
+ /**
481
+ * Set the Minecraft data version.
482
+ */
483
+ setMcVersion(version: number): void;
484
+
485
+ /**
486
+ * The WorldEdit version, or `-1` if not set.
487
+ */
488
+ weVersion(): number;
489
+
490
+ /**
491
+ * Set the WorldEdit version.
492
+ */
493
+ setWeVersion(version: number): void;
494
+
495
+ /**
496
+ * Mirror the default region along the X axis (in place). Block
497
+ * orientations, block entities, and entities are mirrored too.
498
+ */
499
+ flipX(): void;
500
+
501
+ /**
502
+ * Mirror the default region along the Y axis (in place).
503
+ */
504
+ flipY(): void;
505
+
506
+ /**
507
+ * Mirror the default region along the Z axis (in place).
508
+ */
509
+ flipZ(): void;
510
+
511
+ /**
512
+ * Rotate the default region about the X axis. +90° maps south (+Z)
513
+ * to down (-Y). Only multiples of 90 are accepted; invalid angles
514
+ * return `InvalidArgument` without changing the schematic. Negative
515
+ * values wrap.
516
+ */
517
+ rotateX(degrees: number): void;
518
+
519
+ /**
520
+ * Rotate the default region clockwise about the Y axis when viewed
521
+ * from above. +90° maps east (+X) to south (+Z).
522
+ */
523
+ rotateY(degrees: number): void;
524
+
525
+ /**
526
+ * Rotate the default region about the Z axis. +90° maps up (+Y) to
527
+ * west (-X).
528
+ */
529
+ rotateZ(degrees: number): void;
530
+
531
+ /**
532
+ * Move the default region and all attached block entities/entities.
533
+ */
534
+ translate(dx: number, dy: number, dz: number): void;
535
+
536
+ /**
537
+ * Mirror a named region along the X axis.
538
+ */
539
+ flipRegionX(regionName: string): void;
540
+
541
+ /**
542
+ * Mirror a named region along the Y axis.
543
+ */
544
+ flipRegionY(regionName: string): void;
545
+
546
+ /**
547
+ * Mirror a named region along the Z axis.
548
+ */
549
+ flipRegionZ(regionName: string): void;
550
+
551
+ /**
552
+ * Rotate a named region about the X axis by a multiple of 90 degrees.
553
+ */
554
+ rotateRegionX(regionName: string, degrees: number): void;
555
+
556
+ /**
557
+ * Rotate a named region clockwise about the Y axis by a multiple of
558
+ * 90 degrees.
559
+ */
560
+ rotateRegionY(regionName: string, degrees: number): void;
561
+
562
+ /**
563
+ * Rotate a named region about the Z axis by a multiple of 90 degrees.
564
+ */
565
+ rotateRegionZ(regionName: string, degrees: number): void;
566
+
567
+ /**
568
+ * Move one named region without affecting its siblings.
569
+ */
570
+ translateRegion(regionName: string, dx: number, dy: number, dz: number): void;
571
+
572
+ /**
573
+ * Rotate every region as one rigid schematic around the shared bounds.
574
+ */
575
+ rotateSchematicX(degrees: number): void;
576
+
577
+ /**
578
+ * Rotate every region as one rigid schematic around the shared bounds.
579
+ */
580
+ rotateSchematicY(degrees: number): void;
581
+
582
+ /**
583
+ * Rotate every region as one rigid schematic around the shared bounds.
584
+ */
585
+ rotateSchematicZ(degrees: number): void;
586
+
587
+ /**
588
+ * Mirror every region across the shared schematic X bounds.
589
+ */
590
+ flipSchematicX(): void;
591
+
592
+ /**
593
+ * Mirror every region across the shared schematic Y bounds.
594
+ */
595
+ flipSchematicY(): void;
596
+
597
+ /**
598
+ * Mirror every region across the shared schematic Z bounds.
599
+ */
600
+ flipSchematicZ(): void;
601
+
602
+ /**
603
+ * Move every region by the same delta, preserving their relative layout.
604
+ */
605
+ translateSchematic(dx: number, dy: number, dz: number): void;
606
+
607
+ /**
608
+ * Fill a cuboid with a block.
609
+ */
610
+ fillCuboid(minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number, blockName: string): void;
611
+
612
+ /**
613
+ * Fill a sphere with a block.
614
+ */
615
+ fillSphere(cx: number, cy: number, cz: number, radius: number, blockName: string): void;
616
+
617
+ /**
618
+ * Serialize to a named format, base64-encoded. `version` and `settings`
619
+ * may be empty strings for defaults.
620
+ */
621
+ saveAsB64(format: string, version: string, settings: string): string;
622
+
623
+ /**
624
+ * Serialize as a Sponge schematic targeting a specific format version,
625
+ * base64-encoded.
626
+ */
627
+ toSchematicVersionB64(version: string): string;
628
+
629
+ /**
630
+ * The available Sponge schematic exporter versions, as a JSON array of
631
+ * strings.
632
+ */
633
+ static availableSchematicVersionsJson(): string;
634
+
635
+ /**
636
+ * Set a block with NBT data given as a JSON object of string→string
637
+ * (may be empty).
638
+ */
639
+ setBlockWithNbt(x: number, y: number, z: number, blockName: string, nbtJson: string): void;
640
+
641
+ /**
642
+ * Set a block (by name) in a named region.
643
+ */
644
+ setBlockInRegion(regionName: string, x: number, y: number, z: number, blockName: string): void;
645
+
646
+ /**
647
+ * Whether a default or named schematic region exists.
648
+ */
649
+ hasRegion(regionName: string): boolean;
650
+
651
+ /**
652
+ * Create an empty named region. Its first block anchors its bounds.
653
+ */
654
+ createRegion(regionName: string): void;
655
+
656
+ /**
657
+ * Remove a named region. The default region cannot be removed.
658
+ */
659
+ removeRegion(regionName: string): void;
660
+
661
+ /**
662
+ * Rename a named region. The default region cannot be renamed.
663
+ */
664
+ renameRegion(oldName: string, newName: string): void;
665
+
666
+ /**
667
+ * The schematic bounding box as a JSON array
668
+ * `[min_x, min_y, min_z, max_x, max_y, max_z]`.
669
+ */
670
+ boundingBoxJson(): string;
671
+
672
+ /**
673
+ * A named region's bounding box as a JSON array
674
+ * `[min_x, min_y, min_z, max_x, max_y, max_z]`. `"default"`/`"Default"`
675
+ * address the default region.
676
+ */
677
+ regionBoundingBoxJson(regionName: string): string;
678
+
679
+ /**
680
+ * The merged-region palette block names, as a JSON array of strings.
681
+ */
682
+ paletteJson(): string;
683
+
684
+ /**
685
+ * The tight (content) dimensions.
686
+ */
687
+ tightDimensions(): Dimensions;
688
+
689
+ /**
690
+ * The allocated dimensions (same as `dimensions`; named for parity with
691
+ * the old `schematic_get_allocated_dimensions`).
692
+ */
693
+ allocatedDimensions(): Dimensions;
694
+
695
+ /**
696
+ * Every sign in the schematic, as a JSON array of
697
+ * `{"pos": [x,y,z], "text": [...]}`.
698
+ */
699
+ extractSignsJson(): string;
700
+
701
+ /**
702
+ * Compile the schematic's insign annotations to JSON.
703
+ */
704
+ compileInsignJson(): string;
705
+
706
+ /**
707
+ * Every region's palette, as a JSON object mapping region name → array of
708
+ * block names (the default region under `"default"`).
709
+ */
710
+ allPalettesJson(): string;
711
+
712
+ /**
713
+ * The default region's palette block names, as a JSON array of strings.
714
+ */
715
+ defaultRegionPaletteJson(): string;
716
+
717
+ /**
718
+ * A named region's palette block names, as a JSON array of strings.
719
+ * `"default"`/`"Default"` address the default region.
720
+ */
721
+ regionPaletteJson(regionName: string): string;
722
+
723
+ /**
724
+ * The minimum corner of the tight (content) bounds. `NotFound` when the
725
+ * schematic has no content.
726
+ */
727
+ tightBoundsMin(): BlockPos;
728
+
729
+ /**
730
+ * The maximum corner of the tight (content) bounds. `NotFound` when the
731
+ * schematic has no content.
732
+ */
733
+ tightBoundsMax(): BlockPos;
734
+ }