nucleation 0.10.22 → 0.10.24

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 (303) hide show
  1. package/README.md +12 -0
  2. package/Schematic.d.mts +23 -0
  3. package/Schematic.d.ts +23 -0
  4. package/Schematic.mjs +70 -0
  5. package/nucleation.wasm +0 -0
  6. package/package.json +7 -2
  7. package/renderer/AnimationEffect.d.mts +44 -0
  8. package/renderer/AnimationEffect.d.ts +44 -0
  9. package/renderer/AnimationEffect.mjs +204 -0
  10. package/renderer/Autostack.d.mts +43 -0
  11. package/renderer/Autostack.d.ts +43 -0
  12. package/renderer/Autostack.mjs +134 -0
  13. package/renderer/BlockPos.d.mts +28 -0
  14. package/renderer/BlockPos.d.ts +28 -0
  15. package/renderer/BlockPos.mjs +130 -0
  16. package/renderer/BlockState.d.mts +39 -0
  17. package/renderer/BlockState.d.ts +39 -0
  18. package/renderer/BlockState.mjs +134 -0
  19. package/renderer/Blocks.d.mts +91 -0
  20. package/renderer/Blocks.d.ts +91 -0
  21. package/renderer/Blocks.mjs +308 -0
  22. package/renderer/Brush.d.mts +99 -0
  23. package/renderer/Brush.d.ts +99 -0
  24. package/renderer/Brush.mjs +335 -0
  25. package/renderer/BuildAnimation.d.mts +179 -0
  26. package/renderer/BuildAnimation.d.ts +179 -0
  27. package/renderer/BuildAnimation.mjs +1148 -0
  28. package/renderer/BuildingTool.d.mts +46 -0
  29. package/renderer/BuildingTool.d.ts +46 -0
  30. package/renderer/BuildingTool.mjs +121 -0
  31. package/renderer/CellExecutor.d.mts +51 -0
  32. package/renderer/CellExecutor.d.ts +51 -0
  33. package/renderer/CellExecutor.mjs +171 -0
  34. package/renderer/CellularSdfConfig.d.mts +22 -0
  35. package/renderer/CellularSdfConfig.d.ts +22 -0
  36. package/renderer/CellularSdfConfig.mjs +69 -0
  37. package/renderer/ChunkMeshResult.d.mts +75 -0
  38. package/renderer/ChunkMeshResult.d.ts +75 -0
  39. package/renderer/ChunkMeshResult.mjs +253 -0
  40. package/renderer/CircuitBuilder.d.mts +118 -0
  41. package/renderer/CircuitBuilder.d.ts +118 -0
  42. package/renderer/CircuitBuilder.mjs +516 -0
  43. package/renderer/Curve3D.d.mts +27 -0
  44. package/renderer/Curve3D.d.ts +27 -0
  45. package/renderer/Curve3D.mjs +101 -0
  46. package/renderer/DefinitionRegion.d.mts +274 -0
  47. package/renderer/DefinitionRegion.d.ts +274 -0
  48. package/renderer/DefinitionRegion.mjs +973 -0
  49. package/renderer/Design.d.mts +348 -0
  50. package/renderer/Design.d.ts +348 -0
  51. package/renderer/Design.mjs +1334 -0
  52. package/renderer/Diff.d.mts +88 -0
  53. package/renderer/Diff.d.ts +88 -0
  54. package/renderer/Diff.mjs +316 -0
  55. package/renderer/Dimensions.d.mts +28 -0
  56. package/renderer/Dimensions.d.ts +28 -0
  57. package/renderer/Dimensions.mjs +130 -0
  58. package/renderer/DistanceField.d.mts +39 -0
  59. package/renderer/DistanceField.d.ts +39 -0
  60. package/renderer/DistanceField.mjs +114 -0
  61. package/renderer/ExecutionMode.d.mts +42 -0
  62. package/renderer/ExecutionMode.d.ts +42 -0
  63. package/renderer/ExecutionMode.mjs +127 -0
  64. package/renderer/Field3.d.mts +40 -0
  65. package/renderer/Field3.d.ts +40 -0
  66. package/renderer/Field3.mjs +160 -0
  67. package/renderer/FieldProgram.d.mts +40 -0
  68. package/renderer/FieldProgram.d.ts +40 -0
  69. package/renderer/FieldProgram.mjs +167 -0
  70. package/renderer/FieldProgramBinaryOp.d.mts +42 -0
  71. package/renderer/FieldProgramBinaryOp.d.ts +42 -0
  72. package/renderer/FieldProgramBinaryOp.mjs +118 -0
  73. package/renderer/FieldProgramBuilder.d.mts +104 -0
  74. package/renderer/FieldProgramBuilder.d.ts +104 -0
  75. package/renderer/FieldProgramBuilder.mjs +486 -0
  76. package/renderer/FieldProgramDistanceKind.d.mts +26 -0
  77. package/renderer/FieldProgramDistanceKind.d.ts +26 -0
  78. package/renderer/FieldProgramDistanceKind.mjs +78 -0
  79. package/renderer/FieldProgramUnaryOp.d.mts +34 -0
  80. package/renderer/FieldProgramUnaryOp.d.ts +34 -0
  81. package/renderer/FieldProgramUnaryOp.mjs +102 -0
  82. package/renderer/FieldProgramValueType.d.mts +25 -0
  83. package/renderer/FieldProgramValueType.d.ts +25 -0
  84. package/renderer/FieldProgramValueType.mjs +75 -0
  85. package/renderer/FieldRange.d.mts +15 -0
  86. package/renderer/FieldRange.d.ts +15 -0
  87. package/renderer/FieldRange.mjs +109 -0
  88. package/renderer/Fingerprint.d.mts +44 -0
  89. package/renderer/Fingerprint.d.ts +44 -0
  90. package/renderer/Fingerprint.mjs +197 -0
  91. package/renderer/GeneratedChunk.d.mts +35 -0
  92. package/renderer/GeneratedChunk.d.ts +35 -0
  93. package/renderer/GeneratedChunk.mjs +178 -0
  94. package/renderer/GeneratedChunkCoverage.d.mts +25 -0
  95. package/renderer/GeneratedChunkCoverage.d.ts +25 -0
  96. package/renderer/GeneratedChunkCoverage.mjs +75 -0
  97. package/renderer/GeneratedChunkOverlayMode.d.mts +24 -0
  98. package/renderer/GeneratedChunkOverlayMode.d.ts +24 -0
  99. package/renderer/GeneratedChunkOverlayMode.mjs +72 -0
  100. package/renderer/GeneratedWorldStream.d.mts +28 -0
  101. package/renderer/GeneratedWorldStream.d.ts +28 -0
  102. package/renderer/GeneratedWorldStream.mjs +86 -0
  103. package/renderer/Geo.d.mts +41 -0
  104. package/renderer/Geo.d.ts +41 -0
  105. package/renderer/Geo.mjs +121 -0
  106. package/renderer/Hdl.d.mts +56 -0
  107. package/renderer/Hdl.d.ts +56 -0
  108. package/renderer/Hdl.mjs +163 -0
  109. package/renderer/InterpolationSpace.d.mts +25 -0
  110. package/renderer/InterpolationSpace.d.ts +25 -0
  111. package/renderer/InterpolationSpace.mjs +73 -0
  112. package/renderer/IoLayout.d.mts +26 -0
  113. package/renderer/IoLayout.d.ts +26 -0
  114. package/renderer/IoLayout.mjs +81 -0
  115. package/renderer/IoLayoutBuilder.d.mts +73 -0
  116. package/renderer/IoLayoutBuilder.d.ts +73 -0
  117. package/renderer/IoLayoutBuilder.mjs +315 -0
  118. package/renderer/IoType.d.mts +41 -0
  119. package/renderer/IoType.d.ts +41 -0
  120. package/renderer/IoType.mjs +125 -0
  121. package/renderer/ItemModelConfig.d.mts +65 -0
  122. package/renderer/ItemModelConfig.d.ts +65 -0
  123. package/renderer/ItemModelConfig.mjs +223 -0
  124. package/renderer/ItemModelPackBuilder.d.mts +32 -0
  125. package/renderer/ItemModelPackBuilder.d.ts +32 -0
  126. package/renderer/ItemModelPackBuilder.mjs +104 -0
  127. package/renderer/ItemModelResult.d.mts +72 -0
  128. package/renderer/ItemModelResult.d.ts +72 -0
  129. package/renderer/ItemModelResult.mjs +268 -0
  130. package/renderer/ItemScale.d.mts +31 -0
  131. package/renderer/ItemScale.d.ts +31 -0
  132. package/renderer/ItemScale.mjs +133 -0
  133. package/renderer/LayoutFunction.d.mts +52 -0
  134. package/renderer/LayoutFunction.d.ts +52 -0
  135. package/renderer/LayoutFunction.mjs +159 -0
  136. package/renderer/MchprsWorld.d.mts +131 -0
  137. package/renderer/MchprsWorld.d.ts +131 -0
  138. package/renderer/MchprsWorld.mjs +423 -0
  139. package/renderer/MeshBounds.d.mts +40 -0
  140. package/renderer/MeshBounds.d.ts +40 -0
  141. package/renderer/MeshBounds.mjs +181 -0
  142. package/renderer/MeshConfig.d.mts +101 -0
  143. package/renderer/MeshConfig.d.ts +101 -0
  144. package/renderer/MeshConfig.mjs +306 -0
  145. package/renderer/MeshJob.d.mts +44 -0
  146. package/renderer/MeshJob.d.ts +44 -0
  147. package/renderer/MeshJob.mjs +116 -0
  148. package/renderer/MeshPhase.d.mts +38 -0
  149. package/renderer/MeshPhase.d.ts +38 -0
  150. package/renderer/MeshPhase.mjs +90 -0
  151. package/renderer/MeshProgress.d.mts +32 -0
  152. package/renderer/MeshProgress.d.ts +32 -0
  153. package/renderer/MeshProgress.mjs +134 -0
  154. package/renderer/MeshResult.d.mts +76 -0
  155. package/renderer/MeshResult.d.ts +76 -0
  156. package/renderer/MeshResult.mjs +269 -0
  157. package/renderer/MultiMeshResult.d.mts +50 -0
  158. package/renderer/MultiMeshResult.d.ts +50 -0
  159. package/renderer/MultiMeshResult.mjs +166 -0
  160. package/renderer/Nbt.d.mts +50 -0
  161. package/renderer/Nbt.d.ts +50 -0
  162. package/renderer/Nbt.mjs +161 -0
  163. package/renderer/NucleationError.d.mts +53 -0
  164. package/renderer/NucleationError.d.ts +53 -0
  165. package/renderer/NucleationError.mjs +136 -0
  166. package/renderer/OutputCondition.d.mts +45 -0
  167. package/renderer/OutputCondition.d.ts +45 -0
  168. package/renderer/OutputCondition.mjs +129 -0
  169. package/renderer/Palette.d.mts +157 -0
  170. package/renderer/Palette.d.ts +157 -0
  171. package/renderer/Palette.mjs +487 -0
  172. package/renderer/PaletteBuilder.d.mts +119 -0
  173. package/renderer/PaletteBuilder.d.ts +119 -0
  174. package/renderer/PaletteBuilder.mjs +457 -0
  175. package/renderer/README.md +67 -0
  176. package/renderer/RawMeshExport.d.mts +74 -0
  177. package/renderer/RawMeshExport.d.ts +74 -0
  178. package/renderer/RawMeshExport.mjs +243 -0
  179. package/renderer/RedstoneGraph.d.mts +58 -0
  180. package/renderer/RedstoneGraph.d.ts +58 -0
  181. package/renderer/RedstoneGraph.mjs +242 -0
  182. package/renderer/RegionBounds.d.mts +41 -0
  183. package/renderer/RegionBounds.d.ts +41 -0
  184. package/renderer/RegionBounds.mjs +182 -0
  185. package/renderer/RenderConfig.d.mts +101 -0
  186. package/renderer/RenderConfig.d.ts +101 -0
  187. package/renderer/RenderConfig.mjs +271 -0
  188. package/renderer/Renderer.d.mts +51 -0
  189. package/renderer/Renderer.d.ts +51 -0
  190. package/renderer/Renderer.mjs +219 -0
  191. package/renderer/ResourcePack.d.mts +105 -0
  192. package/renderer/ResourcePack.d.ts +105 -0
  193. package/renderer/ResourcePack.mjs +447 -0
  194. package/renderer/ResourcePackList.d.mts +32 -0
  195. package/renderer/ResourcePackList.d.ts +32 -0
  196. package/renderer/ResourcePackList.mjs +96 -0
  197. package/renderer/Routing.d.mts +66 -0
  198. package/renderer/Routing.d.ts +66 -0
  199. package/renderer/Routing.mjs +220 -0
  200. package/renderer/Schematic.d.mts +977 -0
  201. package/renderer/Schematic.d.ts +977 -0
  202. package/renderer/Schematic.mjs +3820 -0
  203. package/renderer/SchematicBuilder.d.mts +103 -0
  204. package/renderer/SchematicBuilder.d.ts +103 -0
  205. package/renderer/SchematicBuilder.mjs +401 -0
  206. package/renderer/SchematicRegions.d.mts +93 -0
  207. package/renderer/SchematicRegions.d.ts +93 -0
  208. package/renderer/SchematicRegions.mjs +411 -0
  209. package/renderer/SchematicSplitResult.d.mts +26 -0
  210. package/renderer/SchematicSplitResult.d.ts +26 -0
  211. package/renderer/SchematicSplitResult.mjs +84 -0
  212. package/renderer/Scripting.d.mts +40 -0
  213. package/renderer/Scripting.d.ts +40 -0
  214. package/renderer/Scripting.mjs +138 -0
  215. package/renderer/Sdf.d.mts +234 -0
  216. package/renderer/Sdf.d.ts +234 -0
  217. package/renderer/Sdf.mjs +1234 -0
  218. package/renderer/SdfAxis.d.mts +25 -0
  219. package/renderer/SdfAxis.d.ts +25 -0
  220. package/renderer/SdfAxis.mjs +75 -0
  221. package/renderer/SdfBounds.d.mts +19 -0
  222. package/renderer/SdfBounds.d.ts +19 -0
  223. package/renderer/SdfBounds.mjs +161 -0
  224. package/renderer/SdfCellMode.d.mts +26 -0
  225. package/renderer/SdfCellMode.d.ts +26 -0
  226. package/renderer/SdfCellMode.mjs +78 -0
  227. package/renderer/SdfNormal.d.mts +16 -0
  228. package/renderer/SdfNormal.d.ts +16 -0
  229. package/renderer/SdfNormal.mjs +122 -0
  230. package/renderer/Shape.d.mts +143 -0
  231. package/renderer/Shape.d.ts +143 -0
  232. package/renderer/Shape.mjs +458 -0
  233. package/renderer/SortStrategy.d.mts +86 -0
  234. package/renderer/SortStrategy.d.ts +86 -0
  235. package/renderer/SortStrategy.mjs +272 -0
  236. package/renderer/Store.d.mts +83 -0
  237. package/renderer/Store.d.ts +83 -0
  238. package/renderer/Store.mjs +369 -0
  239. package/renderer/StoreIo.d.mts +71 -0
  240. package/renderer/StoreIo.d.ts +71 -0
  241. package/renderer/StoreIo.mjs +292 -0
  242. package/renderer/TextureAtlas.d.mts +40 -0
  243. package/renderer/TextureAtlas.d.ts +40 -0
  244. package/renderer/TextureAtlas.mjs +122 -0
  245. package/renderer/TextureInfo.d.mts +34 -0
  246. package/renderer/TextureInfo.d.ts +34 -0
  247. package/renderer/TextureInfo.mjs +149 -0
  248. package/renderer/TickSettleMode.d.mts +34 -0
  249. package/renderer/TickSettleMode.d.ts +34 -0
  250. package/renderer/TickSettleMode.mjs +84 -0
  251. package/renderer/TickSimulation.d.mts +572 -0
  252. package/renderer/TickSimulation.d.ts +572 -0
  253. package/renderer/TickSimulation.mjs +1299 -0
  254. package/renderer/TypedCircuitExecutor.d.mts +101 -0
  255. package/renderer/TypedCircuitExecutor.d.ts +101 -0
  256. package/renderer/TypedCircuitExecutor.mjs +378 -0
  257. package/renderer/Value.d.mts +73 -0
  258. package/renderer/Value.d.ts +73 -0
  259. package/renderer/Value.mjs +275 -0
  260. package/renderer/VideoConfig.d.mts +15 -0
  261. package/renderer/VideoConfig.d.ts +15 -0
  262. package/renderer/VideoConfig.mjs +44 -0
  263. package/renderer/VoxelModel.d.mts +34 -0
  264. package/renderer/VoxelModel.d.ts +34 -0
  265. package/renderer/VoxelModel.mjs +113 -0
  266. package/renderer/Voxelizer.d.mts +80 -0
  267. package/renderer/Voxelizer.d.ts +80 -0
  268. package/renderer/Voxelizer.mjs +261 -0
  269. package/renderer/WorldChunkView.d.mts +75 -0
  270. package/renderer/WorldChunkView.d.ts +75 -0
  271. package/renderer/WorldChunkView.mjs +224 -0
  272. package/renderer/WorldGenerator.d.mts +75 -0
  273. package/renderer/WorldGenerator.d.ts +75 -0
  274. package/renderer/WorldGenerator.mjs +255 -0
  275. package/renderer/WorldSink.d.mts +50 -0
  276. package/renderer/WorldSink.d.ts +50 -0
  277. package/renderer/WorldSink.mjs +177 -0
  278. package/renderer/WorldStream.d.mts +45 -0
  279. package/renderer/WorldStream.d.ts +45 -0
  280. package/renderer/WorldStream.mjs +184 -0
  281. package/renderer/WsPartitionHints.d.mts +29 -0
  282. package/renderer/WsPartitionHints.d.ts +29 -0
  283. package/renderer/WsPartitionHints.mjs +102 -0
  284. package/renderer/WsProfile.d.mts +46 -0
  285. package/renderer/WsProfile.d.ts +46 -0
  286. package/renderer/WsProfile.mjs +152 -0
  287. package/renderer/WsRunResult.d.mts +83 -0
  288. package/renderer/WsRunResult.d.ts +83 -0
  289. package/renderer/WsRunResult.mjs +326 -0
  290. package/renderer/WsSegmentJob.d.mts +28 -0
  291. package/renderer/WsSegmentJob.d.ts +28 -0
  292. package/renderer/WsSegmentJob.mjs +81 -0
  293. package/renderer/diplomat-runtime.d.mts +15 -0
  294. package/renderer/diplomat-runtime.d.ts +15 -0
  295. package/renderer/diplomat-runtime.mjs +779 -0
  296. package/renderer/diplomat-wasm.mjs +52 -0
  297. package/renderer/diplomat.config.mjs +5 -0
  298. package/renderer/index.d.mts +193 -0
  299. package/renderer/index.d.ts +193 -0
  300. package/renderer/index.mjs +196 -0
  301. package/renderer/nucleation.wasm +0 -0
  302. package/renderer/veneer/design.d.ts +167 -0
  303. package/renderer/veneer/design.mjs +480 -0
@@ -0,0 +1,977 @@
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 { SchematicSplitResult } from "./SchematicSplitResult.mjs"
7
+ import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
8
+
9
+
10
+
11
+ export class Schematic {
12
+ /** @internal */
13
+ get ffiValue(): pointer;
14
+ /** @internal */
15
+ constructor();
16
+
17
+
18
+ /**
19
+ * Create a new, empty schematic with the given name.
20
+ */
21
+ static create(name: string): Schematic;
22
+
23
+ /**
24
+ * Release all block/entity storage immediately, keeping an empty valid
25
+ * schematic handle. JS consumers should call this when a parsed world or
26
+ * editing session is no longer needed instead of waiting for finalizers.
27
+ */
28
+ clearContents(): void;
29
+
30
+ /**
31
+ * Return an independent deep copy. Subsequent block, region, entity,
32
+ * metadata, or transform changes do not affect the original.
33
+ */
34
+ deepClone(): Schematic;
35
+
36
+ /**
37
+ * Inspect a versioned transform-plan JSON document without modifying
38
+ * this schematic. Writes a deterministic audit-report JSON document.
39
+ */
40
+ inspectTransformPlanJson(planJson: string): string;
41
+
42
+ /**
43
+ * Atomically apply a versioned transform-plan JSON document. Policy
44
+ * rejection is represented by `report.rejected == true` and leaves the
45
+ * schematic unchanged; malformed plans raise `InvalidArgument`.
46
+ */
47
+ applyTransformPlanJson(planJson: string): string;
48
+
49
+ /**
50
+ * Apply the bundled deterministic, lossless canonicalization preset.
51
+ */
52
+ canonicalizeJson(): string;
53
+
54
+ /**
55
+ * Inspect the bundled public-registry policy without modifying this
56
+ * schematic. Applications should review `rejected` and `quarantined`
57
+ * before choosing whether to call `apply_transform_plan_json`.
58
+ */
59
+ inspectRegistrySafeJson(): string;
60
+
61
+ /**
62
+ * Split spatially independent machines while keeping nearby tiny
63
+ * detached parts with their machine. Components at least
64
+ * `min_standalone_blocks` large always remain independent; smaller
65
+ * components attach only directly to a core within `max_air_gap`.
66
+ * Attachment is non-transitive and the operation is lossless.
67
+ */
68
+ splitConnectedAttachNearby(minStandaloneBlocks: number, maxAirGap: number): SchematicSplitResult;
69
+
70
+ /**
71
+ * The allocated dimensions (width, height, length) of the schematic's
72
+ * bounding box.
73
+ */
74
+ dimensions(): Dimensions;
75
+
76
+ /**
77
+ * Returns `true` if a block was placed (out-of-range coordinates extend the
78
+ * schematic rather than erroring, matching `UniversalSchematic::set_block`).
79
+ */
80
+ setBlock(x: number, y: number, z: number, blockName: string): boolean;
81
+
82
+ /**
83
+ * The name of the block at a position. `NotFound` if the position is
84
+ * outside every region.
85
+ */
86
+ getBlockName(x: number, y: number, z: number): string;
87
+
88
+ /**
89
+ * Build a schematic from raw byte data, auto-detecting the format.
90
+ * Supports Litematic, Sponge Schematic, and McStructure (Bedrock) formats.
91
+ * `Parse` if a format was detected but failed to parse, `InvalidArgument` if
92
+ * no format was recognized.
93
+ */
94
+ static fromData(data: Array<number>): Schematic;
95
+
96
+ /**
97
+ * Decode untrusted bytes using a serialized `DecodeLimits` object.
98
+ * Empty JSON selects the conservative library defaults. Limits are
99
+ * enforced while decompressing/parsing and again before region
100
+ * allocations are accepted.
101
+ */
102
+ static fromDataBounded(data: Array<number>, limitsJson: string): Schematic;
103
+
104
+ /**
105
+ * Build a schematic from Litematic data.
106
+ */
107
+ static fromLitematic(data: Array<number>): Schematic;
108
+
109
+ /**
110
+ * The schematic as Litematic bytes, base64-encoded.
111
+ */
112
+ toLitematicB64(): string;
113
+
114
+ /**
115
+ * Build a schematic from classic `.schematic` data.
116
+ */
117
+ static fromSchematic(data: Array<number>): Schematic;
118
+
119
+ /**
120
+ * The schematic as classic `.schematic` bytes, base64-encoded.
121
+ */
122
+ toSchematicB64(): string;
123
+
124
+ /**
125
+ * Build a schematic from snapshot (fast binary) data.
126
+ */
127
+ static fromSnapshot(data: Array<number>): Schematic;
128
+
129
+ /**
130
+ * The schematic as snapshot (fast binary) bytes, base64-encoded.
131
+ */
132
+ toSnapshotB64(): string;
133
+
134
+ /**
135
+ * Build a schematic from McStructure (Bedrock) data.
136
+ */
137
+ static fromMcstructure(data: Array<number>): Schematic;
138
+
139
+ /**
140
+ * The schematic as McStructure (Bedrock) bytes, base64-encoded.
141
+ */
142
+ toMcstructureB64(): string;
143
+
144
+ /**
145
+ * Import from a single MCA region file.
146
+ */
147
+ static fromMca(data: Array<number>): Schematic;
148
+
149
+ /**
150
+ * Import from MCA with coordinate bounds.
151
+ */
152
+ static fromMcaBounded(data: Array<number>, minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number): Schematic;
153
+
154
+ /**
155
+ * Import from a zipped world folder.
156
+ */
157
+ static fromWorldZip(data: Array<number>): Schematic;
158
+
159
+ /**
160
+ * Import from zipped world with coordinate bounds.
161
+ */
162
+ static fromWorldZipBounded(data: Array<number>, minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number): Schematic;
163
+
164
+ /**
165
+ * Import from a Minecraft world directory path.
166
+ */
167
+ static fromWorldDirectory(path: string): Schematic;
168
+
169
+ /**
170
+ * Import from world directory with coordinate bounds.
171
+ */
172
+ static fromWorldDirectoryBounded(path: string, minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number): Schematic;
173
+
174
+ /**
175
+ * Export the schematic as a Minecraft world: a JSON array of
176
+ * `{"path": <relative file path>, "data_b64": <base64 bytes>}` entries
177
+ * (the old `CFileMap`). `options_json` may be empty for defaults.
178
+ */
179
+ toWorldJson(optionsJson: string): string;
180
+
181
+ /**
182
+ * Export and write world files to a directory. `options_json` may be empty.
183
+ */
184
+ saveWorld(directory: string, optionsJson: string): void;
185
+
186
+ /**
187
+ * Export the schematic as a zipped Minecraft world, base64-encoded.
188
+ * `options_json` may be empty for defaults.
189
+ */
190
+ toWorldZipB64(optionsJson: string): string;
191
+
192
+ /**
193
+ * Set a block with properties given as a JSON object of string→string
194
+ * (the old `CProperty` array).
195
+ */
196
+ setBlockWithProperties(x: number, y: number, z: number, blockName: string, propertiesJson: string): void;
197
+
198
+ /**
199
+ * Set a block from a full block string, e.g.
200
+ * `minecraft:chest[facing=north]{Items:[...]}`.
201
+ */
202
+ setBlockFromString(x: number, y: number, z: number, blockString: string): void;
203
+
204
+ /**
205
+ * Pre-resolve a plain block name to a palette index for use with `place`.
206
+ * Pair them in hot loops with many unique block names to skip the per-call
207
+ * name → palette lookup.
208
+ */
209
+ prepareBlock(blockName: string): number;
210
+
211
+ /**
212
+ * Place a block by pre-resolved palette index (from `prepare_block`).
213
+ */
214
+ place(x: number, y: number, z: number, paletteIndex: number): void;
215
+
216
+ /**
217
+ * Batch-set blocks at multiple positions to the same block (name, block
218
+ * string with properties, or block string with NBT). `positions` is flat
219
+ * `[x0,y0,z0, x1,y1,z1, ...]` (length must be a multiple of 3).
220
+ * Returns the number of blocks set.
221
+ */
222
+ setBlocks(positions: Array<number>, blockName: string): number;
223
+
224
+ /**
225
+ * Sequentially hand-place the same block at many positions in one
226
+ * local simulated component. `positions` is flat
227
+ * `[x0,y0,z0, x1,y1,z1, ...]`; placements run in that order and each
228
+ * settles before the next. Returns the number of final cells written
229
+ * back, including neighbours changed by redstone or pistons.
230
+ *
231
+ * Nearby passive blocks are loaded as environmental context, but the
232
+ * write-back is confined to the active component's effect window. Its
233
+ * runtime is therefore independent of unrelated schematic volume.
234
+ * Use `set_blocks_simulated_full_world` to opt into global updates.
235
+ *
236
+ * This is the efficient bulk form of repeated `{simulate=true}`:
237
+ * structure conversion and simulator wiring happen once for the
238
+ * complete sequence. Propagation is not constant-time—a placement can
239
+ * affect an arbitrarily large circuit—but fixed setup is amortized.
240
+ */
241
+ setBlocksSimulated(positions: Array<number>, blockName: string): number;
242
+
243
+ /**
244
+ * Explicit full-world counterpart to `set_blocks_simulated`.
245
+ * Unrelated schematic volume participates in setup and any resulting
246
+ * changes anywhere in the loaded world are written back.
247
+ */
248
+ setBlocksSimulatedFullWorld(positions: Array<number>, blockName: string): number;
249
+
250
+ /**
251
+ * Batch-get block names at multiple positions. `positions` is flat
252
+ * `[x0,y0,z0, ...]` (length must be a multiple of 3). Writes a JSON array,
253
+ * one entry per position: the block name string, or `null` for
254
+ * empty/out-of-bounds positions.
255
+ */
256
+ getBlocksJson(positions: Array<number>): string;
257
+
258
+ /**
259
+ * Stamp a merged source box into the default region. Excluded blocks
260
+ * are skipped, preserving destination content. Empty string or `[]`
261
+ * means no exclusions.
262
+ */
263
+ stampBox(source: Schematic, minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number, targetX: number, targetY: number, targetZ: number, excludedBlocksJson: string): void;
264
+
265
+ /**
266
+ * Stamp one explicitly named source region into the default region.
267
+ * The region's minimum corner is mapped to the target position.
268
+ */
269
+ stampRegion(source: Schematic, sourceRegionName: string, targetX: number, targetY: number, targetZ: number, excludedBlocksJson: string): void;
270
+
271
+ /**
272
+ * Compatibility alias for `stamp_box`.
273
+ */
274
+ copyRegion(source: Schematic, minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number, targetX: number, targetY: number, targetZ: number, excludedBlocksJson: string): void;
275
+
276
+ /**
277
+ * The full block state at a position. `NotFound` if the position is
278
+ * outside every region.
279
+ */
280
+ getBlock(x: number, y: number, z: number): BlockState;
281
+
282
+ /**
283
+ * The block at a position with its properties, as a `BlockState`.
284
+ * Kept as an explicit alias for callers migrating from the older API.
285
+ */
286
+ getBlockWithProperties(x: number, y: number, z: number): BlockState;
287
+
288
+ /**
289
+ * The full block state at a position in one specific region. This
290
+ * avoids composite lookup ambiguity when regions overlap.
291
+ */
292
+ getBlockInRegion(regionName: string, x: number, y: number, z: number): BlockState;
293
+
294
+ /**
295
+ * The block string at a position in one specific region.
296
+ */
297
+ getBlockStringInRegion(regionName: string, x: number, y: number, z: number): string;
298
+
299
+ /**
300
+ * The full block string (name, properties, NBT) at a position.
301
+ */
302
+ getBlockString(x: number, y: number, z: number): string;
303
+
304
+ /**
305
+ * The block entity at a position as JSON
306
+ * `{"id": ..., "position": [x,y,z], "nbt": {...}}` (the old `CBlockEntity`).
307
+ */
308
+ getBlockEntityJson(x: number, y: number, z: number): string;
309
+
310
+ /**
311
+ * The block entity at a position in one specific region as JSON.
312
+ */
313
+ getBlockEntityJsonInRegion(regionName: string, x: number, y: number, z: number): string;
314
+
315
+ /**
316
+ * Every block entity as a JSON array of
317
+ * `{"id": ..., "position": [x,y,z], "nbt": {...}}`.
318
+ */
319
+ getAllBlockEntitiesJson(): string;
320
+
321
+ /**
322
+ * The number of mobile entities (not block entities).
323
+ */
324
+ entityCount(): number;
325
+
326
+ /**
327
+ * Every mobile entity as a JSON array of
328
+ * `{"id": ..., "position": [x,y,z], "nbt": {...}}` (the old `CEntityArray`).
329
+ */
330
+ getEntitiesJson(): string;
331
+
332
+ /**
333
+ * Add a mobile entity. `nbt_json` is a JSON object (may be empty).
334
+ */
335
+ addEntity(id: string, x: number, y: number, z: number, nbtJson: string): void;
336
+
337
+ /**
338
+ * Add an armor stand without hand-authoring entity NBT.
339
+ *
340
+ * `armor_material` accepts `diamond`, `netherite`, `iron`, etc.; an
341
+ * empty string creates an unarmored stand. `yaw` uses Minecraft degrees.
342
+ */
343
+ addArmorStand(x: number, y: number, z: number, yaw: number, armorMaterial: string): void;
344
+
345
+ /**
346
+ * Remove a mobile entity by index.
347
+ */
348
+ removeEntity(index: number): void;
349
+
350
+ /**
351
+ * The canonical in-memory data version (the forward-conversion target).
352
+ */
353
+ static canonicalDataVersion(): number;
354
+
355
+ /**
356
+ * Convert block/item/entity data between Minecraft data versions. Forward
357
+ * (`target >= source`) is lossless; reverse is lossy. Writes a JSON loss
358
+ * report (`[]` when lossless).
359
+ */
360
+ convertToDataVersion(targetDataVersion: number, sourceDataVersion: number): string;
361
+
362
+ /**
363
+ * Convert to `target_data_version` using the schematic's captured source
364
+ * version (else `mc_version`, else canonical) as origin, updating metadata
365
+ * to the target. Writes a JSON loss report (`[]` when lossless).
366
+ */
367
+ convertToVersion(targetDataVersion: number): string;
368
+
369
+ /**
370
+ * The Minecraft data version of the file this schematic was loaded from, or
371
+ * `-1` if none was captured (versionless / freshly built).
372
+ */
373
+ sourceDataVersion(): number;
374
+
375
+ /**
376
+ * Override the source data version for formats that carry no Java data
377
+ * version, so the converter knows what to convert *from*.
378
+ */
379
+ setSourceDataVersion(version: number): void;
380
+
381
+ /**
382
+ * Serialize a `.litematic` targeting a specific Minecraft data version. A
383
+ * COPY is converted and the matching Version header written; the schematic
384
+ * is left unchanged. Writes JSON
385
+ * `{"data_b64": <base64 .litematic>, "loss": <loss report>}`.
386
+ */
387
+ toLitematicForVersionJson(targetDataVersion: number): string;
388
+
389
+ /**
390
+ * The block entity's NBT as a typed SNBT string. Round-trips losslessly.
391
+ */
392
+ getBlockEntitySnbt(x: number, y: number, z: number): string;
393
+
394
+ /**
395
+ * Set (or replace) a block entity at a position from a typed SNBT string.
396
+ */
397
+ setBlockEntity(x: number, y: number, z: number, id: string, snbt: string): void;
398
+
399
+ /**
400
+ * Remove the block entity at a position. `NotFound` if none was there.
401
+ */
402
+ removeBlockEntity(x: number, y: number, z: number): void;
403
+
404
+ /**
405
+ * Every block entity as a JSON array of `{id, position: [x,y,z], snbt}`.
406
+ * The `snbt` is the inner data only (no `Id`/`Pos`).
407
+ */
408
+ getAllBlockEntitiesSnbtJson(): string;
409
+
410
+ /**
411
+ * Every mobile entity as a JSON array of typed SNBT strings (full compound
412
+ * incl. `id`/`Pos`).
413
+ */
414
+ getEntitiesSnbtJson(): string;
415
+
416
+ /**
417
+ * Add a mobile entity from a full SNBT entity compound (must contain `id`
418
+ * and `Pos`).
419
+ */
420
+ addEntityFromSnbt(snbt: string): void;
421
+
422
+ /**
423
+ * Every IN-BOUNDS cell as a JSON array of
424
+ * `{"x", "y", "z", "name", "properties"}` (the old `CBlockArray`).
425
+ * Air cells are materialized too — on a large sparse build this
426
+ * dump is `volume()`-sized and can exhaust wasm memory; renderers
427
+ * and analyzers want `get_non_air_blocks_json`.
428
+ *
429
+ * Prefer `get_non_air_blocks_json` for a block list,
430
+ * `count_blocks_json` for a material tally and
431
+ * `non_air_blocks_packed_b64` for bulk transfer. This method is
432
+ * kept for compatibility and is the wrong tool at any real size.
433
+ */
434
+ getAllBlocksJson(): string;
435
+
436
+ /**
437
+ * Every non-air block of ONE named region (a flattened design names
438
+ * one per layer: `inst:{name}`, `bus:{name}`), same JSON shape as
439
+ * `get_all_blocks_json`. Unknown region names error.
440
+ */
441
+ getRegionNonAirBlocksJson(regionName: string): string;
442
+
443
+ /**
444
+ * Every non-air block, same JSON shape as `get_all_blocks_json`.
445
+ * `block_count()`-sized regardless of the bounding volume.
446
+ */
447
+ getNonAirBlocksJson(): string;
448
+
449
+ /**
450
+ * Non-air blocks tallied by id: `{"minecraft:stone": 123, ...}`.
451
+ * One pass, no per block allocation, so a caller that only wants a
452
+ * material list never has to pull `get_non_air_blocks_json`. "Air"
453
+ * covers `minecraft:air`, `cave_air` and `void_air` alike.
454
+ */
455
+ countBlocksJson(): string;
456
+
457
+ /**
458
+ * Apply a `{"from id": "to id"}` map in place and return how many
459
+ * blocks changed. Keys match on block id only, ignoring block
460
+ * states; values may carry states (`minecraft:oak_stairs[facing=north]`),
461
+ * but not NBT: `parse_block_string` only returns a `BlockState`, so
462
+ * any `{...}` payload on a `to` value is silently dropped rather
463
+ * than copied onto the replaced block.
464
+ * A block whose id is not a key is left alone, and so is one that
465
+ * already equals its target: the count is the number of blocks
466
+ * actually changed, so a map that rewrites stone to stone returns 0.
467
+ * Errors with `Parse` on malformed JSON or an unparseable target id.
468
+ */
469
+ replaceBlocksJson(mapJson: string): bigint;
470
+
471
+ /**
472
+ * Every non-air block as a compact binary blob, base64 encoded
473
+ * (`DiplomatWrite` is UTF-8 only, see `to_litematic_b64`). Little
474
+ * endian throughout:
475
+ *
476
+ * ```text
477
+ * u32 count
478
+ * count * { i32 x, i32 y, i32 z, u16 palette_index }
479
+ * u32 palette_json_len
480
+ * u8[palette_json_len] ["minecraft:stone", ...]
481
+ * ```
482
+ *
483
+ * Palette indices are assigned in first-seen order, so the same
484
+ * schematic always packs identically. About seven times smaller
485
+ * than `get_non_air_blocks_json` and free of per block JSON
486
+ * parsing on the far side.
487
+ *
488
+ * Palette indices are `u16`, so at most 65,535 distinct non-air
489
+ * block states can be addressed. A schematic with more than that
490
+ * writes **an empty string**, not a truncated palette: callers must
491
+ * treat an empty result as "too many distinct states, fall back to
492
+ * `get_non_air_blocks_json`". No real build has that many.
493
+ */
494
+ nonAirBlocksPackedB64(): string;
495
+
496
+ /**
497
+ * All blocks within a sub-region (chunk) of the schematic, as the same
498
+ * JSON array shape as `get_all_blocks_json`.
499
+ */
500
+ getChunkBlocksJson(offsetX: number, offsetY: number, offsetZ: number, width: number, height: number, length: number): string;
501
+
502
+ /**
503
+ * Non-air blocks inside a bounded box, retaining block-state properties.
504
+ * Visits only intersecting region cells, not the whole schematic. Bounds
505
+ * and arithmetic are checked; queries may scan at most 1,048,576 cells
506
+ * (including region overlaps) and emit at most 32 MiB of JSON. Renderers
507
+ * should request 16³ sections. Coordinates may be negative.
508
+ */
509
+ getChunkNonAirBlocksJson(offsetX: number, offsetY: number, offsetZ: number, width: number, height: number, length: number): string;
510
+
511
+ /**
512
+ * Storage metadata and full block states for palette-index streaming. Region order
513
+ * is default first, then sorted names (highest precedence first); indices are LOCAL to each region. Bounds
514
+ * describe allocated storage, never tight bounds. x is fastest, then z, then y.
515
+ * No block buffer is cloned or serialized here.
516
+ */
517
+ renderRegionsJson(): string;
518
+
519
+ /**
520
+ * A bounded window of a region's dense palette indices (including air).
521
+ * At most 65,536 cells per call; no full-world scan, coordinate tuples, or
522
+ * intermediate Rust allocation. JS bindings copy the borrowed slice before
523
+ * returning, so callers may mutate the schematic or grow WASM memory safely.
524
+ */
525
+ regionBlockIndices(regionName: string, start: number, count: number): Uint32Array;
526
+
527
+ /**
528
+ * Split the schematic into chunks (default bottom-up strategy). Writes a
529
+ * JSON array of `{"chunk_x", "chunk_y", "chunk_z", "blocks": [...]}` where
530
+ * blocks have the `get_all_blocks_json` shape (the old `CChunkArray`).
531
+ */
532
+ getChunksJson(chunkWidth: number, chunkHeight: number, chunkLength: number): string;
533
+
534
+ /**
535
+ * Split the schematic into chunks with a loading strategy: one of
536
+ * `distance_to_camera`, `top_down`, `bottom_up`, `center_outward`,
537
+ * `random` (anything else falls back to `bottom_up`). Camera coordinates
538
+ * are only used by `distance_to_camera`. Same JSON shape as
539
+ * `get_chunks_json`.
540
+ */
541
+ getChunksWithStrategyJson(chunkWidth: number, chunkHeight: number, chunkLength: number, strategy: string, cameraX: number, cameraY: number, cameraZ: number): string;
542
+
543
+ /**
544
+ * The total number of non-air blocks in the schematic.
545
+ */
546
+ blockCount(): number;
547
+
548
+ /**
549
+ * The total volume of the schematic's bounding box.
550
+ */
551
+ volume(): number;
552
+
553
+ /**
554
+ * The names of all regions, as a JSON array of strings.
555
+ */
556
+ regionNamesJson(): string;
557
+
558
+ /**
559
+ * Basic debug info about the schematic (name + region count).
560
+ */
561
+ debugInfo(): string;
562
+
563
+ /**
564
+ * A formatted schematic layout string (old `schematic_print`).
565
+ */
566
+ printString(): string;
567
+
568
+ /**
569
+ * A formatted schematic layout string (old `schematic_print_schematic`;
570
+ * same output as `print_string`).
571
+ */
572
+ printSchematicString(): string;
573
+
574
+ /**
575
+ * A detailed debug string, including a visual layout (old `debug_schematic`).
576
+ */
577
+ debugString(): string;
578
+
579
+ /**
580
+ * A detailed debug string with a JSON layout (old `debug_json_schematic`).
581
+ */
582
+ debugJsonString(): string;
583
+
584
+ /**
585
+ * The schematic name, or the empty string if not set.
586
+ *
587
+ * Total, like every other metadata accessor: absence is a blank
588
+ * field, not an error — a file that simply doesn't carry the field
589
+ * (Sponge without attribution, a fresh schematic) reads as `""`,
590
+ * the same value a litematic round-trip of an unset field yields.
591
+ */
592
+ name(): string;
593
+
594
+ /**
595
+ * Set the schematic name.
596
+ */
597
+ setName(name: string): void;
598
+
599
+ /**
600
+ * The schematic author, or the empty string if not set.
601
+ *
602
+ * Total, like every other metadata accessor: absence is a blank
603
+ * field, not an error — a file that simply doesn't carry the field
604
+ * (Sponge without attribution, a fresh schematic) reads as `""`,
605
+ * the same value a litematic round-trip of an unset field yields.
606
+ */
607
+ author(): string;
608
+
609
+ /**
610
+ * Set the schematic author.
611
+ */
612
+ setAuthor(author: string): void;
613
+
614
+ /**
615
+ * The schematic description, or the empty string if not set.
616
+ *
617
+ * Total, like every other metadata accessor: absence is a blank
618
+ * field, not an error — a file that simply doesn't carry the field
619
+ * (Sponge without attribution, a fresh schematic) reads as `""`,
620
+ * the same value a litematic round-trip of an unset field yields.
621
+ */
622
+ description(): string;
623
+
624
+ /**
625
+ * Set the schematic description.
626
+ */
627
+ setDescription(description: string): void;
628
+
629
+ /**
630
+ * The creation timestamp (milliseconds since epoch), or `-1` if not set.
631
+ */
632
+ created(): bigint;
633
+
634
+ /**
635
+ * Set the creation timestamp (milliseconds since epoch).
636
+ */
637
+ setCreated(created: bigint): void;
638
+
639
+ /**
640
+ * The modification timestamp (milliseconds since epoch), or `-1` if not set.
641
+ */
642
+ modified(): bigint;
643
+
644
+ /**
645
+ * Set the modification timestamp (milliseconds since epoch).
646
+ */
647
+ setModified(modified: bigint): void;
648
+
649
+ /**
650
+ * The Litematic format version, or `-1` if not set.
651
+ */
652
+ lmVersion(): number;
653
+
654
+ /**
655
+ * Set the Litematic format version.
656
+ */
657
+ setLmVersion(version: number): void;
658
+
659
+ /**
660
+ * The Minecraft data version, or `-1` if not set.
661
+ */
662
+ mcVersion(): number;
663
+
664
+ /**
665
+ * Set the Minecraft data version.
666
+ */
667
+ setMcVersion(version: number): void;
668
+
669
+ /**
670
+ * The WorldEdit version, or `-1` if not set.
671
+ */
672
+ weVersion(): number;
673
+
674
+ /**
675
+ * Set the WorldEdit version.
676
+ */
677
+ setWeVersion(version: number): void;
678
+
679
+ /**
680
+ * Standard embedded source provenance as canonical JSON. Returns an
681
+ * empty string when none is present.
682
+ */
683
+ provenanceJson(): string;
684
+
685
+ /**
686
+ * Validate and set standard embedded source provenance from JSON.
687
+ */
688
+ setProvenanceJson(json: string): void;
689
+
690
+ /**
691
+ * Remove embedded source provenance.
692
+ */
693
+ clearProvenance(): void;
694
+
695
+ /**
696
+ * Content-addressed processing history as a JSON array. This audit
697
+ * trail is deliberately separate from immutable source provenance.
698
+ */
699
+ transformationHistoryJson(): string;
700
+
701
+ /**
702
+ * Clear processing history without changing source provenance or
703
+ * schematic content. Intended for callers constructing a new artifact
704
+ * lineage, not for hiding registry audit records.
705
+ */
706
+ clearTransformationHistory(): void;
707
+
708
+ /**
709
+ * Mirror the default region along the X axis (in place). Block
710
+ * orientations, block entities, and entities are mirrored too.
711
+ */
712
+ flipX(): void;
713
+
714
+ /**
715
+ * Mirror the default region along the Y axis (in place).
716
+ */
717
+ flipY(): void;
718
+
719
+ /**
720
+ * Mirror the default region along the Z axis (in place).
721
+ */
722
+ flipZ(): void;
723
+
724
+ /**
725
+ * Rotate the default region about the X axis. +90° maps south (+Z)
726
+ * to down (-Y). Only multiples of 90 are accepted; invalid angles
727
+ * return `InvalidArgument` without changing the schematic. Negative
728
+ * values wrap.
729
+ */
730
+ rotateX(degrees: number): void;
731
+
732
+ /**
733
+ * Rotate the default region clockwise about the Y axis when viewed
734
+ * from above. +90° maps east (+X) to south (+Z).
735
+ */
736
+ rotateY(degrees: number): void;
737
+
738
+ /**
739
+ * Rotate the default region about the Z axis. +90° maps up (+Y) to
740
+ * west (-X).
741
+ */
742
+ rotateZ(degrees: number): void;
743
+
744
+ /**
745
+ * Move the default region and all attached block entities/entities.
746
+ */
747
+ translate(dx: number, dy: number, dz: number): void;
748
+
749
+ /**
750
+ * Mirror a named region along the X axis.
751
+ */
752
+ flipRegionX(regionName: string): void;
753
+
754
+ /**
755
+ * Mirror a named region along the Y axis.
756
+ */
757
+ flipRegionY(regionName: string): void;
758
+
759
+ /**
760
+ * Mirror a named region along the Z axis.
761
+ */
762
+ flipRegionZ(regionName: string): void;
763
+
764
+ /**
765
+ * Rotate a named region about the X axis by a multiple of 90 degrees.
766
+ */
767
+ rotateRegionX(regionName: string, degrees: number): void;
768
+
769
+ /**
770
+ * Rotate a named region clockwise about the Y axis by a multiple of
771
+ * 90 degrees.
772
+ */
773
+ rotateRegionY(regionName: string, degrees: number): void;
774
+
775
+ /**
776
+ * Rotate a named region about the Z axis by a multiple of 90 degrees.
777
+ */
778
+ rotateRegionZ(regionName: string, degrees: number): void;
779
+
780
+ /**
781
+ * Move one named region without affecting its siblings.
782
+ */
783
+ translateRegion(regionName: string, dx: number, dy: number, dz: number): void;
784
+
785
+ /**
786
+ * Rotate every region as one rigid schematic around the shared bounds.
787
+ */
788
+ rotateSchematicX(degrees: number): void;
789
+
790
+ /**
791
+ * Rotate every region as one rigid schematic around the shared bounds.
792
+ */
793
+ rotateSchematicY(degrees: number): void;
794
+
795
+ /**
796
+ * Rotate every region as one rigid schematic around the shared bounds.
797
+ */
798
+ rotateSchematicZ(degrees: number): void;
799
+
800
+ /**
801
+ * Mirror every region across the shared schematic X bounds.
802
+ */
803
+ flipSchematicX(): void;
804
+
805
+ /**
806
+ * Mirror every region across the shared schematic Y bounds.
807
+ */
808
+ flipSchematicY(): void;
809
+
810
+ /**
811
+ * Mirror every region across the shared schematic Z bounds.
812
+ */
813
+ flipSchematicZ(): void;
814
+
815
+ /**
816
+ * Move every region by the same delta, preserving their relative layout.
817
+ */
818
+ translateSchematic(dx: number, dy: number, dz: number): void;
819
+
820
+ /**
821
+ * Fill a cuboid with a block.
822
+ */
823
+ fillCuboid(minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number, blockName: string): void;
824
+
825
+ /**
826
+ * Fill a sphere with a block.
827
+ */
828
+ fillSphere(cx: number, cy: number, cz: number, radius: number, blockName: string): void;
829
+
830
+ /**
831
+ * Serialize to a named format, base64-encoded. `version` and `settings`
832
+ * may be empty strings for defaults.
833
+ */
834
+ saveAsB64(format: string, version: string, settings: string): string;
835
+
836
+ /**
837
+ * Serialize as a Sponge schematic targeting a specific format version,
838
+ * base64-encoded.
839
+ */
840
+ toSchematicVersionB64(version: string): string;
841
+
842
+ /**
843
+ * The available Sponge schematic exporter versions, as a JSON array of
844
+ * strings.
845
+ */
846
+ static availableSchematicVersionsJson(): string;
847
+
848
+ /**
849
+ * Set a block with NBT data given as a JSON object of string→string
850
+ * (may be empty).
851
+ */
852
+ setBlockWithNbt(x: number, y: number, z: number, blockName: string, nbtJson: string): void;
853
+
854
+ /**
855
+ * Set a block (by name) in a named region.
856
+ */
857
+ setBlockInRegion(regionName: string, x: number, y: number, z: number, blockName: string): void;
858
+
859
+ /**
860
+ * Whether a default or named schematic region exists.
861
+ */
862
+ hasRegion(regionName: string): boolean;
863
+
864
+ /**
865
+ * Create an empty named region. Its first block anchors its bounds.
866
+ */
867
+ createRegion(regionName: string): void;
868
+
869
+ /**
870
+ * Remove a named region. The default region cannot be removed.
871
+ */
872
+ removeRegion(regionName: string): void;
873
+
874
+ /**
875
+ * Rename a named region. The default region cannot be renamed.
876
+ */
877
+ renameRegion(oldName: string, newName: string): void;
878
+
879
+ /**
880
+ * The schematic bounding box as a JSON array
881
+ * `[min_x, min_y, min_z, max_x, max_y, max_z]`.
882
+ */
883
+ boundingBoxJson(): string;
884
+
885
+ /**
886
+ * A named region's bounding box as a JSON array
887
+ * `[min_x, min_y, min_z, max_x, max_y, max_z]`. `"default"`/`"Default"`
888
+ * address the default region.
889
+ */
890
+ regionBoundingBoxJson(regionName: string): string;
891
+
892
+ /**
893
+ * The merged-region palette block names, as a JSON array of strings.
894
+ */
895
+ paletteJson(): string;
896
+
897
+ /**
898
+ * The tight (content) dimensions.
899
+ */
900
+ tightDimensions(): Dimensions;
901
+
902
+ /**
903
+ * The allocated dimensions (same as `dimensions`; named for parity with
904
+ * the old `schematic_get_allocated_dimensions`).
905
+ */
906
+ allocatedDimensions(): Dimensions;
907
+
908
+ /**
909
+ * Every sign in the schematic, as a JSON array of
910
+ * `{"pos": [x,y,z], "text": [...]}`.
911
+ */
912
+ extractSignsJson(): string;
913
+
914
+ /**
915
+ * Compile the schematic's insign annotations to JSON.
916
+ */
917
+ compileInsignJson(): string;
918
+
919
+ /**
920
+ * Embed a `CellContract` (JSON) in the schematic's metadata,
921
+ * validating it parses first. The contract is carried through
922
+ * `.schem` save/open and autodetected on open — schematic +
923
+ * contract = one self-describing typed cell.
924
+ */
925
+ setCellContractJson(json: string): void;
926
+
927
+ /**
928
+ * The contract embedded in the schematic's metadata, as JSON.
929
+ * Errors with `NotFound` when none is embedded, `Parse` when an
930
+ * embedded string exists but is corrupt (loud, never silent).
931
+ */
932
+ cellContractJson(): string;
933
+
934
+ /**
935
+ * Resolve the schematic's cell contract from its sources in
936
+ * strict precedence — embedded metadata over Insign signs — with
937
+ * loud conflict warnings. Writes `{"contract": ..., "warnings":
938
+ * [...]}`; errors with `NotFound` when no source defines one.
939
+ */
940
+ resolveCellContractJson(): string;
941
+
942
+ /**
943
+ * Parse the schematic's IO-contract insign annotations (`#cell`
944
+ * header, `bus.*` port annotations, `#route_zone` zones) to JSON:
945
+ * `{"cell": ..., "buses": [...], "route_zones": {...}}`.
946
+ */
947
+ compileIoContractsJson(): string;
948
+
949
+ /**
950
+ * Every region's palette, as a JSON object mapping region name → array of
951
+ * block names (the default region under `"default"`).
952
+ */
953
+ allPalettesJson(): string;
954
+
955
+ /**
956
+ * The default region's palette block names, as a JSON array of strings.
957
+ */
958
+ defaultRegionPaletteJson(): string;
959
+
960
+ /**
961
+ * A named region's palette block names, as a JSON array of strings.
962
+ * `"default"`/`"Default"` address the default region.
963
+ */
964
+ regionPaletteJson(regionName: string): string;
965
+
966
+ /**
967
+ * The minimum corner of the tight (content) bounds. `NotFound` when the
968
+ * schematic has no content.
969
+ */
970
+ tightBoundsMin(): BlockPos;
971
+
972
+ /**
973
+ * The maximum corner of the tight (content) bounds. `NotFound` when the
974
+ * schematic has no content.
975
+ */
976
+ tightBoundsMax(): BlockPos;
977
+ }