巨型结构方块与普通结构方块类似,但突破了原版结构方块的大小限制。
本模组是使用巨型结构的生成逻辑的世界生成功能的必要依赖项。
该方块的运作方式与原版类似,但有两个主要变化:
- 首先,它以不同的方式序列化结构:
- 此方块会捕获结构区域内任意方块所在的整个区块大小区域(宽度和长度)。高度涵盖结构的常规高度(从巨型结构方块到设定高度的范围)。
- 每个区块都被序列化为一个独立的普通编码结构。这在技术上意味着可以通过普通结构方块加载单独的结构区块。
- 序列化还包含一个“主 NBT 文件”,其中包含了将整体巨型结构的所有区块正确重组到世界中所需的头部数据。
- 其次,这意味着除了你的电脑性能所能承受的范围外,理论上没有结构大小的限制。我已经成功序列化并反序列化了一个 100 x 100 方块(7x7 区块)以及其他更大的测试用例,没有任何问题。
使用说明
巨型结构方块只能通过 /give 命令获取。
保存 (SAVE)
其工作方式类似于普通的结构方块,用于指定要保存的区域大小以及移动该区域的偏移量。
有一个“检测 (DETECT)”选项不起作用,因为巨型结构方块不具备正确的角落检测功能。(目前“分隔符模式”无效)
有一个按钮可以切换是否将特殊方块(如空气)和实体保存到巨型结构中。
该方块会自动在输入的任何结构名称前加上 Minecraft 命名空间,后跟 “mgst_” 前缀和你输入的名称。
- 例如,如果你的结构名称是 "bigcastle",那么巨型结构的头部文件将被标识为 "minecraft:mgst_bigcastle"
你也可以使用自己的命名空间。
- 例如,如果你正在为 "bigworld" 命名空间制作 "bigcastle" 巨型结构,你可以将名称写为 "bigworld:bigcastle",它将被保存为 "bigworld:mgst_bigcastle"
注意!
目前,方块会保存所有包含规定区域部分的区块的完整宽度和长度,这意味着在加载操作时,“缓冲区”也会被放置。
加载 (LOAD)
同样作为普通结构加载工作,需要输入要加载的巨型结构名称(包括 “mgst_” 前缀)以及偏移量。
注意!
目前,偏移量和方块位置被忽略,巨型结构将从最接近坐标原点且方向一致的区块角落开始加载。
给开发者
本模组可以作为打包依赖项供模组下载,并且包含在程序中向世界生成巨型结构所需的类和注册表。如果有人感兴趣,将来会创建一份文档。
The megastructure block is similar to a regular structure block but it breaks the size limit of the vanilla one.
This mod is a compulsory dependency for worldgen systems that use megastructures in their generation logic.
This block works similar to vanilla, but with two major changes:
- Firstly, it serializes structures differently:
- This block captures the whole chunk-sized area (width and length) of any block inside the structure area. The height encompasses the regular height of the structure (from the megastructure block to the set height).
- Each chunk is serialized as a different regular encoded structure. This technically means one can load individual structure chunks through a regular structure block
- The serialization also includes a "master nbt file", that includes the header data necessary to reassemble all the chunks of the overall megastructure correctly into the world.
- This means, secondly, there is no theoretical structure limit other than what your PC is capable of. I have managed to serialize and deserialize a 100 x 100 block (7x7 chunks) correctly as well as other bigger tests no problem
Instructions
The megastructure block is only obtainable via the /give command
SAVE
Works as a regular structureblock with the size of the area to save and the offset to move said area around.
There is a "DETECT" that doesn't work because the megastructure block does not have a proper corner detection capabilities. (The "delimiter mode" does nothing at the moment)
There is a button to toggle wether special blocks like air and entities are saved on the megastructure.
The block automatically prepends any inputed structure name with the minecraft namespace followed by the "mgst_" prefix and the name you inputed.
- For example, if the name of your structure is "bigcastle", the header file of the megastructure will be identified as "minecraft:mgst_bigcastle"
You can use your own namespace instead.
- For example, if you are making the "bigcastle" megastructure for the "bigworld" namespace, you can write the name as "bigworld:bigcastle" and it will be saved as "bigworld:mgst_bigcastle"
ATTENTION!
For now the blocks saves all the width and length of all the chunks that contains part of the stabilished area, meaning that that "buffer area" will also be placed on a LOAD opperation.
LOAD
Also works as a regular structure load with the name of the megastructure to load (including the "mgst_" prefix) and the offset
ATTENTION!
For now, the offset and the block position are ignored and the megastructure starts to load on the corner of the chunk closest in orientation to the origin of coordinates
For developers
This mod can be downloaded as a packaged dependency for a mod and also includes the classes and registries needed to spawn megastructures in the world programatically. If people are interested, a doc will be created in the future
评论 0
登录后参与评分
还没有评论,来抢沙发吧