|
Structurized Reborn (结构重生)Github |相关wiki |源站链接支持: fabricStructurized Reborn 是一个简单的库,用于添加自定义村庄结构。
这是 DRAYLAR 的 _Structurized_ 的改进版本。原始版本请查看:
[链接](链接)
_Structurized Reborn_ 是一个简单的库,用于添加自定义村庄结构。
[](链接)
[](链接)
拼图修改
Structurized 提供了一个注册表,允许您向拼图中的`StructurePool`添加自定义结构,例如村庄。 假设我们想将 `village/plains/houses/plains_small_house_1` 添加到沙漠房屋池。 只需将新结构注册到所需的池中,并为其指定权重和一些可选的修改器。 在与任何其他面向服务器的注册事件(例如注册物品或方块)相同的位置调用这些`register`方法
kotlin
FabricStructurePoolRegistry.register(
Identifier(\"minecraft:village/desert/houses\"), //目标池
Identifier(\"minecraft:village/plains/houses/plains_small_house_1\"), //要添加的新结构 nbt
2, //池中结构的权重
StructureProcessorLists.MOSSIFY_10_PERCENT) //可选的处理器以添加苔藓
如果没有特殊考虑,您可以使用 `registerSimple` 简化您的工作:
kotlin
FabricStructurePoolRegistry.registerSimple(
Identifier(\"minecraft:village/desert/houses\"), //目标池
Identifier(\"minecraft:village/plains/houses/plains_small_house_1\"), //要添加的新结构 nbt
2) //池中结构的权重
灵活的注册
注册方法非常灵活,具有多个可选参数可根据需要使用。 在许多情况下,您可以使用 `registerSimple` 方法,但主要的 `register` 方法可用于执行诸如添加许多村庄结构都有的随机苔石之类的操作。
参数:
`poolId`: 必需,要修改的结构池
`structureId`: 必需,新结构 nbt 位置标识符
`weight`: 必需,生成时选择结构的概率。权重 1 到 3 左右是每个村庄大约 1 个结构
`processor`: 可选,定义要应用的自定义生成调整,例如随机苔石
`projection`: 可选,定义结构与地面的交互方式(在空间中刚性或与景观相一致)
`type`: 可选,定义您想要的 `structurePoolElement` 类型。大多数情况下不需要
回调注册
如果要对结构池进行更高级的操作,还可以直接注册到回调并添加任何您想添加的事件代码。 注册回调如下:
kotlin
StructurePoolAddCallback.EVENT.register(structurePool -> {
if(structurePool.getUnderlying().getId().toString().equals(\"minecraft:village/plains/houses\")) {
structurePool.addStructurePoolElement(new SinglePoolElement(\"village/desert/houses/desert_small_house_1\"), 50);
}
});
添加依赖性
您可以将它添加为项目的依赖项,使用 modrinth 内置的maven存储库。{VERSION} 将是您尝试使用的版本号。 例如,此库的第一个版本已上传,版本号为 *1.18.2-01*。
在 build.gradle 中:
java
repositories {
maven {
name = \"Modrinth\"
url = \"https://api.modrinth.com/maven\"
content {
includeGroup \"maven.modrinth\"
}
}
}
dependencies {
modImplementation \"maven.modrinth:Wd844r7Q:{VERSION}\"
include(\"maven.modrinth:Wd844r7Q:{VERSION}\")
}
在 build.gradle.kts 中
kotlin
repositories {
maven {
name = \"Modrinth\"
url = uri(\"https://api.modrinth.com/maven\")
content {
includeGroup(\"maven.modrinth\")
}
}
}
dependencies {
modImplementation(\"m
来自Modrinth所有游戏版本1.211.21.11.19.41.201.20.11.19.31.191.18.2所有类型fabricquiltStructurized Reborn 1.21-01structurized_reborn-1.21-01.jar下载1.21-01#ReleasePort to 1.21展开版本: 1.21-01支持游戏: 1.21, 1.21.1类型:FabricQuiltRelease下载次数: 3,323Structurized Reborn 1.20.1-01structurized_reborn-1.20.1-01.jar下载1.20.1-01#BetaPort up to 1.20/1.20.1. 1.19.4 also still supported with this version展开版本: 1.20.1-01支持游戏: 1.19.4, 1.20, 1.20.1类型:FabricBeta下载次数: 43,121Structurized Reborn 1.19.3-01structurized_reborn-1.19.3-01.jar下载1.19.3-01#BetaPort to 1.19.3展开版本: 1.19.3-01支持游戏: 1.19.3类型:FabricBeta下载次数: 188structurized_reborn-1.19-01structurized_reborn-1.19-01.jar下载1.19-01#BetaUpdated to 1.19展开版本: 1.19-01支持游戏: 1.19类型:FabricBeta下载次数: 767structurized_reborn-1.18.2-02structurized_reborn-1.18.2-02.jar下载1.18.2-02#BetaAdded support for `ListPoolElement`s, structure elements with multiple variations. *Minecraft* currently uses this for the Pillager Tower.Added a `ListPool` builder to help you generate the `ListPoolElement`. Here\'s how one would use the builder to reconstruct the Pillager Tower element:```javaListPoolElement lpe = FabricStructurePoolRegistry.ListPool.builder().addStructureElement(new Identifier(\"minecraft:pillager_outpost/watchtower\")).addStructureElement(new Identifier(\"minecraft:pillager_outpost/watchtower_overgrown\"),StructureProcessorLists.OUTPOST_ROT).addProjection(StructurePool.Projection.RIGID).buildListPool();```To register you element to the pool you want to modify, simply call `registerList`:```javaFabricStructurePoolRegistry.registerList(new Identifier(\"minecraft:pillager_outpost/towers\"),1,lpe);```展开版本: 1.18.2-02支持游戏: 1.18.2类型:FabricBeta下载次数: 399structurized_reborn-1.18.2-01structurized_reborn-1.18.2-01.jar下载1.18.2-01#BetaInitial upload展开版本: 1.18.2-01支持游戏: 1.18.2类型:FabricBeta下载次数: 132全部版本
markdown_parsed
文章类型:收录
layui.use([\'form\'], function(){
var form = layui.form;
});
Structurized Reborn |
楼主
2025-8-10 19:30:04
回复(0)
收起回复
|