Biome Modifier for Fabric

模组

· 作者 Viola-Siemens

一个允许用户利用数据包轻松且兼容地修改生物群系的库模组。

0 本站下载 0 关注 更新于 9 个月前

最新 1.21.2+1.0.2 · 1.21.3 · Fabric

一键开服(送7天)

Biome-Modifier-for-Fabric

Banner

摘要

这是一个库模组,允许用户利用数据包轻松且兼容地修改生物群系。

开发者用法

众所周知,对于 Forge 整合包,开发者可以使用以下 示例 来修改生物群系:

{
  "type": "forge:add_features",
  "biomes": "#forge:is_plains",
  "features": [
    "emeraldcraft:wild_cabbage",
    "emeraldcraft:wild_chili"
  ],
  "step": "vegetal_decoration"
}

让我们让它在 Fabric 上也能工作!

数据包开发者应将所有生物群系修饰器(格式为 *.json)放置在 data/<modid>/biome_modifiers/ 目录中。通过此模组,所有生物群系修饰器都将应用于每个生物群系。

所有生物群系修饰器应遵循以下格式:

{
  "type": "<modifier type>",
  "biomes": "<registry name of a single biome/list of registry names of biomes/a tag of biomes>",
  "priority": priority,
  "<other keys...>": "<other values...>"
}

其中 type 代表生物群系修饰器的类型,biomes 代表要修改的所有生物群系。

注意 priority 字段是可选的。数值越小,它将被越早应用于生物群系(例如,优先级为 99 的修饰器将比优先级为 100 的修饰器更早应用)。默认值为 1000。

不同的生物群系修饰器类型

我们目前提供 9 种不同类型的生物群系修饰器:

biome_modifier:none

此类型允许开发者替换其他数据包中的其他生物群系修饰器。

{
  "type": "biome_modifier:none"
}

biome_modifier:add_features

此生物群系修饰器将 features 字段中提到的所有已放置特性添加到目标生物群系中。

如果注册表中缺少任何已放置特性,将会记录错误(在安全模式下不会导致游戏崩溃)。

{
  "type": "biome_modifier:add_features",
  "biomes": "<registry name(s) of biomes>",
  "features": "<registry name of a single feature/list of registry names of features>",
  "step": "<step of decoration generation>"
}

biome_modifier:remove_features

此生物群系修饰器从目标生物群系中移除 features 字段中提到的所有已放置特性。

如果目标生物群系中缺少任何已放置特性,将会记录警告且不会导致游戏崩溃。

如果注册表中缺少任何已放置特性,将会记录错误(在安全模式下不会导致游戏崩溃)。

{
  "type": "biome_modifier:remove_features",
  "biomes": "<registry name(s) of biomes>",
  "features": "<registry name of a single feature/list of registry names of features>",
  "step": "<step of decoration generation>"
}

biome_modifier:add_spawns

此生物群系修饰器将 spawns 字段中提到的所有实体生成项添加到目标生物群系中。

如果注册表中缺少任何实体类型,将会记录错误(在安全模式下不会导致游戏崩溃)。

{
  "type": "biome_modifier:add_spawns",
  "biomes": "<registry name(s) of biomes>",
  "spawners": [
    {
      "type": "<registry name of a single entity type>",
      "weight": weight,
      "minCount": minCount,
      "maxCount": maxCount
    }
    //If you only add one spawner, you can also replace the list with the only object.
  ]
}

biome_modifier:remove_spawns

此生物群系修饰器从目标生物群系中移除 entity_types 字段中提到的所有实体生成项。

如果目标生物群系中缺少任何实体类型,将会记录警告且不会导致游戏崩溃。

如果注册表中缺少任何实体类型,将会记录错误(在安全模式下不会导致游戏崩溃)。

{
  "type": "biome_modifier:remove_spawns",
  "biomes": "<registry name(s) of biomes>",
  "entity_types": [
    "<registry name of a single entity type>"
    //If you only remove one spawner, you can also replace the list with the only string.
  ]
}

biome_modifier:add_spawn_costs

此生物群系修饰器将 spawn_costs 字段中提到的所有实体生成项添加到目标生物群系的生成成本中。

与 biome_modifier:add_spawns 不同,此修饰器是将生成项添加到生成成本中(即生成潜力、生成密度)。

如果注册表中缺少任何实体类型,将会记录错误(在安全模式下不会导致游戏崩溃)。

{
  "type": "biome_modifier:add_spawn_costs",
  "biomes": "<registry name(s) of biomes>",
  "spawn_costs": {
    "<registry name of a single entity type>": {
      "charge": charge,
      "energy_budget": energy_budget
    }
  }
}

biome_modifier:remove_spawn_costs

此生物群系修饰器从目标生物群系的生成成本中移除 entity_types 字段中提到的所有实体生成项。

与 biome_modifier:remove_spawns 不同,此修饰器是从生成成本中移除生成项(即生成潜力、生成密度)。

如果目标生物群系中缺少任何实体类型,将会记录警告且不会导致游戏崩溃。

如果注册表中缺少任何实体类型,将会记录错误(在安全模式下不会导致游戏崩溃)。

{
  "type": "biome_modifier:remove_spawn_costs",
  "biomes": "<registry name(s) of biomes>",
  "entity_types": [
    "<registry name of a single entity type>"
    //If you only remove one spawner, you can also replace the list with the only string.
  ]
}

biome_modifier:add_carvers

此生物群系修饰器将 carvers 字段中提到的所有凿刻器添加到目标生物群系中。

如果注册表中缺少任何凿刻器,将会记录错误(在安全模式下不会导致游戏崩溃)。

{
  "type": "biome_modifier:add_carvers",
  "biomes": "<registry name(s) of biomes>",
  "carvers": "<registry name of a single carver/list of registry names of carvers>",
  "step": "<step of carver generation>"
}

biome_modifier:remove_carvers

此生物群系修改器会从目标生物群系中移除 carvers 字段中提及的所有洞穴生成器。

如果目标生物群系中缺少任何洞穴生成器,将会记录警告日志,但不会导致游戏崩溃。

如果注册表中缺少任何洞穴生成器,将会记录错误日志(在安全模式下不会导致游戏崩溃)。

{
  "type": "biome_modifier:remove_carvers",
  "biomes": "<生物群系的注册名>",
  "carvers": "<单个洞穴生成器的注册名/或一组洞穴生成器的注册名列表>",
  "step": "<洞穴生成阶段>"
}

示例

我们为模组提供了三个数据包示例:

Extra Ores

这个数据包为主世界添加了额外的矿石方块。

使用此数据包的世界的 X 射线视图。

主世界无矿石

此数据包移除了主世界中所有的矿石方块,仅保留可供玩家获取矿石的矿脉。

使用此数据包的世界的 X 射线视图。图中仅有的铁矿石是特意放置的。

下界的僵尸

此数据包使僵尸能够在下界生成。

僵尸在下界荒地生成。

你是这个资源的作者?登录后可认领此资源。

评论 0

0.0
暂无评分
5 星
0
4 星
0
3 星
0
2 星
0
1 星
0
我的评分

登录后参与评分

还没有评论,来抢沙发吧

评论配图

相似资源