You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Forge 1.19.4模组添加Placed Feature报错:注册表存在未绑定值

Forge 1.19.4模组开发:新增树木Placed Feature崩溃问题解决

问题场景

开发1.19.4版本Forge模组添加新树木,配置Placed Feature后客户端直接崩溃,报错信息如下:

IllegalStateException: Unbound values in registry ResourceKey[minecraft:root / minecraft:worldgen/placed_feature]: [minecraft:divine_placed]

对应的Placed Feature JSON配置内容:

{
  "feature": "pantheonic:divine",
  "placement": [
    {
      "type": "minecraft:count",
      "count": {
        "type": "minecraft:weighted_list",
        "distribution": [
          {
            "data": 3,
            "weight": 9
          },
          {
            "data": 5,
            "weight": 1
          }
        ]
      }
    },
    {
      "type": "minecraft:in_square"
    },
    {
      "type": "minecraft:surface_water_depth_filter",
      "max_water_depth": 0
    },
    {
      "type": "minecraft:heightmap",
      "heightmap": "OCEAN_FLOOR"
    },
    {
      "type": "minecraft:biome"
    },
    {
      "type": "minecraft:block_predicate_filter",
      "predicate": {
        "type": "minecraft:would_survive",
        "state": {
          "Name": "pantheonic:divine_sapling",
          "Properties": {
            "stage": "0"
          }
        }
      }
    }
  ]
}

报错原因

错误里的[minecraft:divine_placed]是核心问题——游戏尝试在minecraft官方命名空间中查找这个Placed Feature,但你的模组命名空间是pantheonic,明显是命名空间不匹配导致的未绑定错误。

大概率是以下两种情况之一:

  • 引用该Placed Feature时(比如Biome生成配置、世界生成修改器),误将ID写成minecraft:divine_placed,而非正确的pantheonic:divine_placed
  • JSON文件存放路径错误,未放在模组资源包的data/pantheonic/worldgen/placed_feature/目录下,导致游戏无法识别它属于你的模组命名空间

解决方法

  1. 修正命名空间引用:
    • 检查所有用到这个Placed Feature的配置或代码,把ID统一改为pantheonic:divine_placed
  2. 核对文件路径:
    • 确保JSON文件路径为:src/main/resources/data/pantheonic/worldgen/placed_feature/divine_placed.json
    • 文件名要与ID后缀一致,比如用divine_placed作为ID,文件名就必须是divine_placed.json
  3. 检查依赖Feature:
    • 确认pantheonic:divine这个基础Feature已正确注册,其JSON文件放在data/pantheonic/worldgen/feature/目录下
  4. 清理缓存重启:
    • 删除run目录下的cache文件夹,清理Forge运行缓存后再启动游戏

内容的提问来源于stack exchange,提问作者RedstoniaYT

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.14 07:10:08