跳到主要内容

secret_realm_generation_type(秘境生成方式)

secret_realm_generation_type​

秘境 的 generation 用这一族决定实例维度怎么造出来。数据包只能选用已注册的类型,不能新增。

generation 里引用的注册表项(stem、dimension_type、biome)都在实例创建时解析:数据包注册表是并行加载的,解码那一刻读到的未必已经绑定。解析失败即创建失败(GENERATION_FAILED)并记一条日志,不会留下半个实例。

"generation": { "type": "mxt:void", "biome": "minecraft:the_void", "dimension_type": "minecraft:the_end" }

mxt:stem​

拿一个已注册的维度生成器当模板,开一份新维度键的实例。

字段类型默认说明
stem维度生成器 id必填例如 minecraft:overworld、minecraft:the_end。
{ "type": "mxt:stem", "stem": "minecraft:the_end" }

mxt:flat​

超平坦世界。

字段类型默认说明
presetString必填原版超平坦层串,例如 "1*minecraft:bedrock,2*minecraft:dirt,minecraft:grass_block;minecraft:plains"。
dimension_type维度类型 idminecraft:overworld实例用哪种维度类型。
structuresBooleantrue是否生成结构。
{ "type": "mxt:flat", "preset": "1*minecraft:bedrock,2*minecraft:dirt,minecraft:grass_block;minecraft:plains" }

mxt:void​

空世界:没有地层、一个生物群系、默认不生成结构,适合全靠 structures 造景的秘境。

字段类型默认说明
biome生物群系 idminecraft:the_void整份实例用的生物群系。
dimension_type维度类型 id无实例用哪种维度类型。
structuresBooleanfalse是否生成结构。
{ "type": "mxt:void", "biome": "minecraft:the_void", "dimension_type": "minecraft:the_end" }

mxt:template​

从存档目录 <服务器目录>/mxt_secret_realm/<template>/ 复制 region、entities、poi 后再加载;手工搭好的地图走这条。

字段类型默认说明
templateString必填模板目录名,只认 [A-Za-z0-9_-]+;不匹配就是创建失败。
stem维度生成器 id必填加载这份模板用的维度生成器。
{ "type": "mxt:template", "template": "trial_arena", "stem": "minecraft:overworld" }

mxt:existing​

不创建任何维度,直接用一个已存在的维度(含数据包 dimension/ 条目)。max_instances 对它没有意义,实例结束时也不会卸载或删除那个维度。

字段类型默认说明
dimension维度 id必填直接拿这个已有维度当实例。
{ "type": "mxt:existing", "dimension": "minecraft:the_end" }

边界也归它:只有这一档会在写了 border 时去动那个真实维度的边框,别的档新造出来的维度一律显式设成原版默认边界。