ctx.schematics.get

This commit is contained in:
2026-11-17 22:14:32 -03:00
parent c0c728c066
commit 6c38166325
4 changed files with 37 additions and 1 deletions
+4
View File
@@ -589,6 +589,10 @@ export interface SchematicApi {
// adds a schematic for place, by an id in this mod's namespace, while the server phase runs. it's checked here:
// every block, state and entity in it has to be registered
register(id: Id, schematic: Schematic): void;
// a copy of a registered schematic, a file's or one a script registered, with its id, like neoforge's
// StructureTemplateManager.get. undefined for an id nothing registered. for reading what's in it before placing it,
// like where a room's doorways are
get(id: Id): Schematic | undefined;
// puts a registered schematic in the world, all of it at once, replacing what was there, air too. replaced blocks
// get their on_break. blocks it has data for get that data as it is, the rest their on_create, then everything
// placed tells the blocks beside it. its entities come with new uuids. throws for an id nothing registered, or a