Minecraft Wiki

除另有声明,转载时均必须注明出处若簡繁轉換出錯,請以遊戲內為準请勇于扩充与修正内容有兴趣逛逛我们的微博沟通交流,欢迎到社区专页需要协助,请在告示板留言

了解更多

Minecraft Wiki
Advertisement
Clock
此条目需要更新。

条目中某些信息可以参照英文版进行翻译更新。

Information icon
此特性为基岩版独有。

Template:Bedrock Edition Developer Documentation

参见:基岩版地物文档
Information icon
此特性为基岩版独有。

这是基岩版1.13.0地物文档

版本: 1.13.0.34

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 are 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 the feature generates. 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 ]
      }
    }
  }
}
Advertisement