用比快速念出本项目名字五遍更省事的方法,创建你自己的结构模组!
每个结构的信息(例如其名称、下沉到地下的深度、稀有度和适用的生物群系)都可以通过 JSON 文件进行设置。目前该模组仅支持单块结构(一个 NBT 文件),但我计划未来支持更多类型。
教程即将推出;基础入门信息如下。
安装此模组的 1.16.1 版本前请阅读 (1.16.4 版本是安全的)
Mojang 在 1.16 中引入了一个影响所有添加结构的模组的 Bug。如果结构被移除或重命名(在本模组中,如果你不小心更改了结构的 JSON 文件就可能发生这种情况),加载世界时可能会导致世界损坏。请在 1.16.1 - 1.16.3 中使用任何添加结构的模组打开世界之前备份你的世界。不建议在长期存在的世界中使用此模组的 1.16.1 版本,但如果确实要使用,请务必定期备份。有关更多详细信息,请参阅 Mojang 的 Bug 跟踪器上的 MC-194811。
Forge 在 Forge 版本 35.1.0(适用于 MC 1.16.4+)中修复了结构 Bug,因此从本模组的 1.16.4 版本开始将不再受结构 Bug 的影响,并且以前损坏的世界可能可以通过在运行 Forge 35.1.0 或更高版本时访问并保存损坏的区块来修复。
入门指南
1. 为此模组创建一个新的 Minecraft 实例
这并非严格必要,但强烈推荐。如果不这样做,你可能会意外打开一个你不想打开的世界,并被迫保留当前的结构,或者冒着损坏世界的风险。具体操作细节因你使用的启动器而异,但使用默认启动器时,你需要前往顶部的“Installations”(安装配置),然后点击新建按钮。确保游戏版本为 1.16.1 的 Forge,并在“game directory”(游戏目录)处,在你的 Minecraft 安装路径下新建一个文件夹(%appdata%/.minecraft/<此处填入你的配置文件名>)。如果遇到任何问题,网上有许多关于如何执行此操作的深入文章。
2. 设置你的结构文件夹
在页面的文件部分,模组 jar 文件的下载下方应该还有一个额外的文件部分,其中包含一个带有示例的 zip 文件夹。你也可以通过 这个链接 从我的 GitHub 上下载它。下载 zip 文件夹,解压后将其放入你将要使用的配置文件的根目录中(默认为 %appdata%/.minecraft,但如果你执行了第一步,则为 (%appdata%/.minecraft/<profileNameHere>)。如果你不想下载 zip 文件夹,目录结构如下。页面底部还包含一个示例 json 文件。
Minecraft 游戏目录
............|_shulkerssupersimplestructuresystem
......................|_-structurejsons
......................|_-structureNBTs
所有描述你结构的 json 文件都将放在 structurejsons 文件夹中,而你在游戏中制作的结构块数据 NBT 文件将放在 structureNBTs 文件夹中。
作为参考,这是我的游戏目录的样子:
3. 创建你的结构
这里的内容太多了,我目前没时间一一列举,但如果你下载示例文件夹,里面会包含几个注释详细的结构 json 文件,它们应该能清楚地说明你需要如何描述你的结构。它还包含一组我已制作好的 nbt 文件,你可以尝试制作自己的 json 文件并让它们在你的世界中生成,以便进行练习。当你想要制作自己的结构时,YouTube 上有一些很棒的教程,比我在文字中描述的更为详尽。你可以找到一个好的视频(也就是我学习制作结构 nbt 文件的来源)在这里。
如果你想为结构中的箱子添加战利品表,你可以像覆盖任何原版战利品表一样添加战利品表。然后,你可以在设计结构时使用命令来设置箱子的战利品表,从而让箱子使用自定义战利品表(或原版战利品表)。
既然大家都喜欢看图片,而这大段文字又很枯燥,那就看看示例文件夹中包含 nbt 文件的一些结构吧!最后两张图片是在我的结构世界中拍摄的,我在那里为我的模组制作结构部件;如果你是结构文件的新手,这就是它们的制作方式!
4. 与你的朋友分享你的创作!(或者自己留着欣赏)
如果你想和你的朋友们分享你的结构,你只需要将 Minecraft 游戏目录中的 shulkerssupersimplestructuressystem 文件夹压缩成 zip 格式,然后让他们解压并放入他们的目录即可!当然,他们也需要安装这个模组。
提示与技巧
- 描述结构的 json 文件会在启动 Minecraft 时加载,但 nbt 文件直到你打开世界才会被读取。如果你正在修改 nbt 文件,则无需完全关闭 Minecraft,只需返回到主菜单即可。
- 潜影盒也可以拥有战利品表(loot tables)!
示例 json 文件:
抱歉格式不佳,粘贴到这里时所有的制表符和换行都被移除了。
{{
"comment":"#### 你可以删除任何以 comment 开头的行。JSON 不支持注释,因此我们只能这样处理。",
"comment2":"#### 注意此文件名的格式。如果文件名中包含大写字母、空格或大多数特殊字符,Minecraft 将会报错",
"comment3":"#### 文件名允许使用的字符包括小写字母 a-z、0-9、下划线 (_) 和连字符 (-)",
"comment4":"#### 在启动 Minecraft 之前,请确保在任何编辑器中关闭此文件。某些编辑器可能无法释放文件句柄,导致解析失败'",
"comment_name": "//// 你可以随意命名你的结构,这将作为使用 /locate 命令时显示的名称。但一旦设定,请勿更改。",
"comment_name2":"//// 1.16.1 版本中存在一个严重的 Bug:移除或重命名结构可能会导致世界损坏",
"comment_name3":"//// 此外请注意,该名称只能包含小写字母,不能包含特殊字符或数字",
"structureName":"dirthutexample",
"comment_seed": "//// 为每个添加的结构设置一个大且唯一的数字非常重要。否则,你的结构会相互重叠生成",
"comment_seed2": "//// 该数字必须小于 int_max(即 2147483647)",
"seed":1235437262,
"comment_biomes": "//// 结构可以生成的生物群系。这些使用的是生物群系的注册键。如果 F3 调试屏幕中的生物群系名称不起作用,请查阅 Wiki,其名称可能有所不同",
"biomes":[ "ocean", "plains", "desert", "extreme_hills", "forest", "taiga", "swampland", "river", "hell", "sky", "frozen_ocean", "frozen_river", "ice_flats", "ice_mountains", "mushroom_island", "mushroom_island_shore", "beaches", "desert_hills", "forest_hills", "taiga_hills", "smaller_extreme_hills", "jungle", "jungle_hills", "jungle_edge", "deep_ocean", "stone_beach", "cold_beach", "birch_forest", "birch_forest_hills", "roofed_forest", "taiga_cold", "taiga_cold_hills", "redwood_taiga", "redwood_taiga_hills", "extreme_hills_with_trees", "savanna", "savanna_rock", "mesa", "mesa_rock", "mesa_clear_rock", "mutated_plains", "mutated_desert", "mutated_extreme_hills", "mutated_forest", "mutated_taiga", "mutated_swampland", "mutated_ice_flats", "mutated_jungle", "mutated_jungle_edge", "mutated_birch_forest", "mutated_birch_forest_hills", "mutated_roofed_forest", "mutated_taiga_cold", "mutated_redwood_taiga", "mutated_redwood_taiga_hills", "mutated_extreme_hills_with_trees", "mutated_savanna", "mutated_savanna_rock", "mutated_mesa", "mutated_mesa_rock", "mutated_mesa_clear_rock" ],
"comment_spawnRate":"//// 结构尝试生成的间隔距离(以区块为单位)。在设置相同的生成率的情况下,有效生物群系较少的结构会更加稀有",
"spawnRate":12,
"comment_yOffset":"//// 将结构的底部从地面水平向下偏移的 Y 轴层级数。负数将使结构向上偏移",
"blockLevelsBelowGround":2,
"comment_filename":"//// 包含你结构的 NBT 文件名。如果在名称中不包含文件扩展名,游戏将会崩溃",
"fileName":"dangerous_dirt_hut.nbt"}
Create your own structure mod with less hassle than trying to say this project's name 5 times fast!
Information about each structure such as its name, how far to sink it into the ground, rarity, and valid biomes can be set through a json file. Currently the mod only supports single piece structures (one nbt file), but I plan to make more possible.
Tutorials coming soon; basic getting started info below.
Read before installing this mod for 1.16.1 (1.16.4 is safe)
Mojang introduced a bug in 1.16 which affects all mods which add structures. If a structure is removed or renamed (things you can do in this mod if you're not careful when changing a structure's json file), it is possible to corrupt your worlds upon loading. Please back up your worlds before opening them with any mods which add structures in 1.16.1 - 1.16.3. It is inadvisable to use the 1.16.1 version of this mod on a long-standing world, but if you do be sure to take regular backups. See MC-194811 on Mojang's bug tracker for more details.
Forge included a fix for the structure bug in Forge version 35.1.0 (for MC 1.16.4+), so the 1.16.4 version of this mod onwards will not be affected by the structure bug, and any previously corrupted worlds may be able to be fixed by visiting and saving the corrupted chunks while running Forge version 35.1.0 or higher.
Getting Started
1. Make a new minecraft instance for this mod
This isn't strictly necessary, but is highly recommended. If you don't, you risk accidentally opening a world you didn't mean to and be forced to keep your current structures or risk corrupting the world. The details on how to do this will vary depending on which launcher you use, but using the default launcher you will want to go to Installations on the top and press the new button. Make sure the game version is forge for 1.16.1, and where it says game directory, make a new folder under your minecraft install (%appdata%/.minecraft/<profileNameHere>). If you run into any issues there are many in-depth articles online regarding how to do this.
2. Set up the folders for your structures
In the files section of this page, below the download for the mod jar there should be an additional files section containing a zip folder with examples. You can also download it off of my github using this link. Download the zip folder, uncompress it, and put it in the base directory of the profile which you will be using (%appdata%/.minecraft by default, but if you did the first step it will be (%appdata%/.minecraft/<profileNameHere>). If you don't want to download the zip folder, the directory layout is below. An example json file is included at the bottom of the page.
Minecraft Game Directory
............|_shulkerssupersimplestructuresystem
......................|_-structurejsons
......................|_-structureNBTs
All of your json files describing your structures will go in the structurejsons folder, and all of your NBT files made in-game containing the block data for your structures will go in the structureNBTs folder.
For reference, this is what my game directory looks like
3. Make your structures
There's too much for me to include here and I don't have the time at the moment, but if you download the examples folder it contains a few structure json files which are heavily commented and should make it clear how you need to describe your structures. It also contains a set of nbt files I've made so you can try making your own json files and get them spawning in your world if you want to practice. When you want to make your own structures, there are some great tutorials on youtube which describe it better than I could here in text. You can find a good video (and the one which I learned how to make structure nbt files from) here.
If you wish to add loot tables for chests in your structure, you can add the loot tables as you would override any vanilla loot table. You can then set the chests to use your custom loot tables (or vanilla loot tables) using commands to set the loot table for the chest when you place it while designing your structure.
Since everyone likes pictures, and this wall of text is boring, have a look at some of the structures which I have included nbt files for in the example folder! The bottom two pictures are taken in my structure world where I make structure pieces for my mods; if you're new to structure files, that's how they're made!
4. Share your creations with your friends! (or keep them to yourself)
If you want to share your structures with your friends, all you have to do is zip up the shulkerssupersimplestructuressystem folder in your Minecraft Game Directory and have them unzip it and put it in their directory! They will also need this mod installed of course.
Tips and tricks
- The jsons describing the structures are loaded when you launch minecraft, but the nbt files aren't opened until you open your world. If you're making changes to the nbt files you shouldn't have to completely close Minecraft, just go back to the title screen
- Shulker boxes can have loot tables too!
Example json file:
Sorry for the poor formatting, all the tabs and newlines got removed when I pasted it here
{{
"comment":"#### You can remove any lines starting with the word comment. JSON doesn't support comments so this is how we have to do them.",
"comment2":"#### Note the format of the name of this file. Minecraft will throw errors if you have capital letters, spaces, or most special characters in the file name",
"comment3":"#### The valid characters for file names include lowercase a-z, 0-9, the underscore character (_), and the minus character (-)",
"comment4":"#### Make sure to close this file in any editors before launching minecraft. Some editors won't let go of the file and cause it to fail to parse'",
"comment_name": "//// You can name your structure whatever you want and this is what will show up using /locate, but once you have set this don't change it.",
"comment_name2":"//// There's a nasty bug in 1.16.1 where removing or renaiming structures can corrupt worlds",
"comment_name3":"//// Also note that this name can only contain lowercase letters and no special characters or numbers",
"structureName":"dirthutexample",
"comment_seed": "//// It is very important that you set this to a large, unique number for each structure you add. Otherwise your structures will generate on top of each other",
"comment_seed2": "//// This number must be under int_max which is 2147483647",
"seed":1235437262,
"comment_biomes": "//// The biomes it can spawn in. These use the registry keys for the biomes. If the f3 biome name doesn't work then check the wiki, it may be different",
"biomes":[ "ocean", "plains", "desert", "extreme_hills", "forest", "taiga", "swampland", "river", "hell", "sky", "frozen_ocean", "frozen_river", "ice_flats", "ice_mountains", "mushroom_island", "mushroom_island_shore", "beaches", "desert_hills", "forest_hills", "taiga_hills", "smaller_extreme_hills", "jungle", "jungle_hills", "jungle_edge", "deep_ocean", "stone_beach", "cold_beach", "birch_forest", "birch_forest_hills", "roofed_forest", "taiga_cold", "taiga_cold_hills", "redwood_taiga", "redwood_taiga_hills", "extreme_hills_with_trees", "savanna", "savanna_rock", "mesa", "mesa_rock", "mesa_clear_rock", "mutated_plains", "mutated_desert", "mutated_extreme_hills", "mutated_forest", "mutated_taiga", "mutated_swampland", "mutated_ice_flats", "mutated_jungle", "mutated_jungle_edge", "mutated_birch_forest", "mutated_birch_forest_hills", "mutated_roofed_forest", "mutated_taiga_cold", "mutated_redwood_taiga", "mutated_redwood_taiga_hills", "mutated_extreme_hills_with_trees", "mutated_savanna", "mutated_savanna_rock", "mutated_mesa", "mutated_mesa_rock", "mutated_mesa_clear_rock" ],
"comment_spawnRate":"//// How far apart, in chunks, your structure will try to generate. Structures with fewer valid biomes will be rarer with the same spawn rate set",
"spawnRate":12,
"comment_yOffset":"//// How many y levels down to shift your structure from having the bottom at ground level. A negative number will make it go up instead",
"blockLevelsBelowGround":2,
"comment_filename":"//// The name of the nbt file with your structure. If you don't include the file extention in the name it will crash the game",
"fileName":"dangerous_dirt_hut.nbt"}
评论 0
登录后参与评分
还没有评论,来抢沙发吧