<本站文本内容除另有声明外,转载时均必须注明出处。(详情…中文Minecraft Wiki是完全公开的。请勇于扩充与修正内容!Minecraft中文Wiki微博正在更新!或许有兴趣去看看想与其他用户进行编辑上的沟通?社区专页正是为此创建的。翻译或创建页面之前,不妨看看译名标准化Wiki条例页面。需要管理员的协助?在管理员告示板留言也许可以帮到您。>

基岩版beta特性文档

来自Minecraft Wiki
跳转至: 导航搜索
Information icon.svg
此特性为基岩版独有。
错误:未知参数。

This is the features documentation for Bedrock Edition beta 1.16.20.52. New features, components, and capabilities in this release are not final and might change without notice before the final release. Be sure to check the documentation once the release is out of beta if the add-on isn't working properly. Resource and behavior packs created for the beta are not guaranteed to work on the final release.

Features[编辑 | 编辑源代码]

All features should specify the version that they target via the "format_version" field. The remainder of the feature data is divided up into independent JSON sub-objects, or components. In general you can think of the presence of a component as defining what game behaviors a feature participates in with the component fields defining how it participates. Additionally, there are four types of features, which is Aggregate Feature, Ore Feature, Scatter Feature, and Single Block Feature. Your Feature JSON file should be created in 'features' directory in your root of your Behavior Pack.


Aggregate Feature[编辑 | 编辑源代码]

Aggregate Feature is used to apply a series of features.

Here is a sample of an Aggregate Feature in fern_double_plant_feature.json
{
  "format_version": "1.13.0",
  "minecraft:aggregate_feature": {
    "description": {
      "identifier": "fern_double_plant_feature"
    },
    "early_out": "first_failure",
    "features": [
      "fern_double_plant_lower_feature",
      "fixup_fern_double_plant_upper_position_feature"
    ]
  }
}


Ore Feature[编辑 | 编辑源代码]

Ore Feature is used for generating blocks in a spread area.

Here is a sample of an Ore Feature in andesite_feature.json
{
  "format_version": "1.13.0",
  "minecraft:ore_feature": {
    "description": {
      "identifier": "andesite_feature"
    },
    "count": 33,
    "places_block": {
      "name": "minecraft:stone",
      "states": {
        "stone_type": "andesite"
      }
    },
    "may_replace": [
      {
        "name": "minecraft:stone",
        "states": {
          "stone_type": "andesite"
        }
      },
      {
        "name": "minecraft:stone",
        "states": {
          "stone_type": "andesite_smooth"
        }
      },
      {
        "name": "minecraft:stone",
        "states": {
          "stone_type": "diorite"
        }
      },
      {
        "name": "minecraft:stone",
        "states": {
          "stone_type": "diorite_smooth"
        }
      },
      {
        "name": "minecraft:stone",
        "states": {
          "stone_type": "granite"
        }
      },
      {
        "name": "minecraft:stone",
        "states": {
          "stone_type": "granite_smooth"
        }
      },
      {
        "name": "minecraft:stone",
        "states": {
          "stone_type": "stone"
        }
      }
    ]
  }
}


Scatter Feature[编辑 | 编辑源代码]

Scatter Feature used to set generating offset, and generating chance for a feature.

Here is a sample of a Scatter Feature in fern_double_plant_patch_feature.json
{
  "format_version": "1.13.0",
  "minecraft:scatter_feature": {
    "description": {
      "identifier": "fern_double_plant_patch_feature"
    },
    "iterations": 64,
    "coordinate_eval_order": "zyx",
    "x": {
      "extent": [ -8, 8 ],
      "distribution": "gaussian"
    },
    "z": {
      "extent": [ -8, 8 ],
      "distribution": "gaussian"
    },
    "y": {
      "extent": [ -4, 4 ],
      "distribution": "gaussian"
    },
    "project_input_to_floor": false,
    "places_feature": "fern_double_plant_feature"
  }
}


Single Block Feature[编辑 | 编辑源代码]

Single Block Feature used to set a block generation.

Here is a sample of a Single Block Feature in sunflower_double_plant_lower_feature.json
{
  "format_version": "1.13.0",
  "minecraft:single_block_feature": {
    "description": {
      "identifier": "sunflower_double_plant_lower_feature"
    },
    "places_block": {
      "name": "minecraft:double_plant",
      "states": {
        "double_plant_type": "sunflower",
        "upper_block_bit": false
      }
    },
    "enforce_survivability_rules": false,
    "enforce_placement_rules": true,
    "may_replace": [
      "minecraft:air"
    ]
  }
}

Feature Rules[编辑 | 编辑源代码]

Your written features here will be assigned and applied here. This is important for your features to generate, otherwise it won't appear in your worlds. Additionally, you can set a condition for which biome tag will the feature to generate. Feature Rules JSON should be created in 'feature_rules' directory in your root of your Behavior Pack.

Here is a sample of overworld_underground_andesite_feature.json
{
  "format_version": "1.13.0",
  "minecraft:feature_rules": {
    "description": {
      "identifier": "overworld_underground_andesite_feature",
      "places_feature": "andesite_feature"
    },
    "conditions": {
      "placement_pass": "underground_pass",
      "minecraft:biome_filter": [
        {
          "any_of": [
            {
              "test": "has_biome_tag",
              "operator": "==",
              "value": "overworld"
            },
            {
              "test": "has_biome_tag",
              "operator": "==",
              "value": "overworld_generation"
            }
          ]
        }
      ]
    },
    "distribution": {
      "iterations": 10,
      "coordinate_eval_order": "zyx",
      "x": {
        "distribution": "uniform",
        "extent": [ 0, 16 ]
      },
      "y": {
        "distribution": "uniform",
        "extent": [ 0, 80 ]
      },
      "z": {
        "distribution": "uniform",
        "extent": [ 0, 16 ]
      }
    }
  }
}