This commit is contained in:
DaanV2
2021-06-08 18:26:40 +02:00
parent a4961fc8e2
commit 9b9154b3d5
14 changed files with 476 additions and 18 deletions

View File

@@ -14,6 +14,7 @@
"title": "Format Version"
},
"minecraft:aggregate_feature": { "$ref": "./features/minecraft.aggregate_feature.json" },
"minecraft:beards_and_shavers": { "$ref": "./features/minecraft.beards_and_shavers.json" },
"minecraft:cave_carver_feature": { "$ref": "./features/minecraft.cave_carver_feature.json" },
"minecraft:conditional_list": { "$ref": "./features/minecraft.conditional_list.json" },
"minecraft:geode_feature": { "$ref": "./features/minecraft.geode_feature.json" },

View File

@@ -0,0 +1,76 @@
{
"title": "Beards And Shavers",
"description": "`minecraft:beards_and_shavers` will build a `beard` or `shave` out space so as to provide a clear space for a feature to place.\nSucceeds if: a beard/shave is made (this should always happen).\nFails if: will always return placement pos, but interior feature placement not guaranteed.",
"type": "object",
"additionalProperties": false,
"required": ["description", "places_feature", "bounding_box_max", "bounding_box_min", "y_delta", "surface_block_type", "subsurface_block_type"],
"properties": {
"description": {
"title": "Description",
"description": "",
"type": "object",
"required": ["identifier"],
"properties": {
"identifier": {
"title": "Identifier",
"description": "The name of this feature in the form `namespace_name:feature_name`. `feature_name` must match the filename.",
"type": "string",
"$ref": "../../../../general/feature/identifier.json"
}
}
},
"places_feature": {
"title": "Places Feature",
"description": "Named reference of feature to be placed.",
"type": "string",
"$ref": "../../../../general/feature/identifier.json"
},
"bounding_box_min": {
"title": "Bounding Box Min",
"description": "Dimensions of the Bounding Box",
"type": "array",
"items": [
{ "type": "number", "title": "X" },
{ "type": "number", "title": "Y" },
{ "type": "number", "title": "Z" }
]
},
"bounding_box_max": {
"title": "Bounding Box Max",
"description": "Dimensions of the Bounding Box",
"type": "array",
"items": [
{ "type": "number", "title": "X" },
{ "type": "number", "title": "Y" },
{ "type": "number", "title": "Z" }
]
},
"y_delta": {
"title": "Y Delta",
"description": "Y Delta for BAS",
"type": "number"
},
"surface_block_type": {
"title": "Surface Block Type",
"description": "Reference to the block to be placed.",
"type": "string",
"$ref": "../../../../general/block/identifier.json"
},
"subsurface_block_type": {
"title": "Subsurface Block Type",
"description": "Reference to the block to be placed.",
"type": "string",
"$ref": "../../../../general/block/identifier.json"
},
"beard_raggedness_min": {
"title": "Beard Raggedness Min",
"description": "Y Delta for BAS",
"type": "number"
},
"beard_raggedness_max": {
"title": "Beard Raggedness Max",
"description": "Y Delta for BAS",
"type": "number"
}
}
}

View File

@@ -1,7 +1,7 @@
{
"type": "object",
"title": "Growing Plant Feature",
"description": "'minecraft:growing_plant_feature' places a growing plant in the world. A growing plant is a column that is anchored either to the ceiling or the floor, based on its growth direction.\nThe growing plant has a body and a head, where the head is the tip of the plant, and the body consists of the remainder blocks.\nThis feature can be used to define growing plants with variable body and head blocks, e.g. Cave Vines.",
"description": "`minecraft:growing_plant_feature` places a growing plant in the world. A growing plant is a column that is anchored either to the ceiling or the floor, based on its growth direction.\nThe growing plant has a body and a head, where the head is the tip of the plant, and the body consists of the remainder blocks.\nThis feature can be used to define growing plants with variable body and head blocks, e.g. Cave Vines.",
"additionalProperties": false,
"required": ["description", "height_distribution", "growth_direction", "body_blocks", "head_blocks"],
"definitions": {

View File

@@ -1,9 +1,17 @@
{
"title": "Multiface Feature",
"description": "`minecraft:multiface_feature` places one or a few multiface blocks on floors/walls/ceilings. Despite the name, any block can be placed by this feature. During placement, existing world blocks are checked to see if this feature can be placed on them based on the list provided in the `can_place_on` field. If no `can_replace_on` field is specified, the `place_block` block can be placed on any existing block.\nThis feature will also try to spread the 'place_block' block around the location in world the feature is placed.\nSucceeds if: At least one block is successfully placed.\nFails if: All block placements fail.",
"description": "`minecraft:multiface_feature` places one or a few multiface blocks on floors/walls/ceilings. Despite the name, any block can be placed by this feature. During placement, existing world blocks are checked to see if this feature can be placed on them based on the list provided in the `can_place_on` field. If no `can_replace_on` field is specified, the `place_block` block can be placed on any existing block.\nThis feature will also try to spread the `place_block` block around the location in world the feature is placed.\nSucceeds if: At least one block is successfully placed.\nFails if: All block placements fail.",
"type": "object",
"additionalProperties": false,
"required": ["description"],
"required": [
"description",
"places_block",
"search_range",
"can_place_on_floor",
"can_place_on_ceiling",
"can_place_on_wall",
"chance_of_spreading"
],
"properties": {
"description": {
"title": "Description",
@@ -18,6 +26,52 @@
"$ref": "../../../../general/feature/identifier.json"
}
}
},
"places_block": {
"title": "Places Block",
"description": "Reference to the block to be placed.",
"type": "string",
"$ref": "../../../../general/block/identifier.json"
},
"search_range": {
"title": "Search Range",
"description": "How far, in blocks, this feature can search for a valid position to place.",
"type": "integer",
"minimum": 1,
"maximum": 64
},
"can_place_on_floor": {
"title": "Can Place On Floor",
"description": "Can this feature be placed on the ground (top face of a block)?",
"type": "boolean"
},
"can_place_on_ceiling": {
"title": "Can Place On Ceiling",
"description": "Can this feature be placed on the ceiling (bottom face of a block)?",
"type": "boolean"
},
"can_place_on_wall": {
"title": "Can Place On Wall",
"description": "Can this feature be placed on the wall (side faces of a block)?",
"type": "boolean"
},
"chance_of_spreading": {
"title": "Chance of Spreading",
"description": "For each block placed by this feature, how likely will that block spread to another?",
"type": "number",
"minimum": 0.0,
"maximum": 1.0
},
"can_place_on": {
"title": "Can Place On",
"description": " How far, in blocks, this feature can search for a valid position to place.",
"type": "array",
"minItems": 1,
"items": {
"title": "Block",
"description": " A list of blocks that the block in this feature can be placed on. Omit this field to allow any block to be placed on.",
"$ref": "../../../../general/block/identifier.json"
}
}
}
}

View File

@@ -1,6 +1,9 @@
{
"type": "object",
"title": "Ore Feature",
"description": "`minecraft:ore_feature` places a vein of blocks to simulate ore deposits. Despite the name, any block can be placed by this feature. During placement, existing world blocks are checked to see if they can be replaced by the new ore block based on the list provided in the `may_replace` field of a `replace_rules` entry. If no `may_replace` field is specified in a `replace_rule` entry, the ore block can replace any existing block.\nSucceeds if: At least one ore block is successfully placed.\nFails if: All ore block placements fail.",
"additionalProperties": false,
"required": ["count", "description"],
"properties": {
"description": {
"title": "Description",
@@ -15,6 +18,40 @@
"$ref": "../../../../general/feature/identifier.json"
}
}
},
"count": {
"title": "Count",
"description": "The number of blocks to be placed.",
"type": "number",
"minimum": 1
},
"replace_rules": {
"title": "Replace Rules",
"description": "Collection of replace rules that will be checked in order of definition. If a rule is resolved, the rest will not be resolved for that block position.",
"type": "array",
"minItems": 1,
"items": {
"title": "Repalce Rule",
"description": "If a rule is resolved, the rest will not be resolved for that block position.",
"type": "object",
"required": ["places_block"],
"properties": {
"places_block": {
"title": "Places Block",
"description": "Reference to the block to be placed.",
"$ref": "../../../../general/block/identifier.json"
},
"may_replace": {
"title": "May replace",
"description": "A list of blocks that may be replaced during placement. Omit this field to allow any block to be replaced.",
"type": "array",
"minItems": 1,
"items": {
"$ref": "../../../../general/block/identifier.json"
}
}
}
}
}
}
}

View File

@@ -1,6 +1,9 @@
{
"type": "object",
"title": "Rect Layout",
"description": "`minecraft:rect_layout` places a vein of blocks to simulate ore deposits. Despite the name, any block can be placed by this feature. During placement, existing world blocks are checked to see if they can be replaced by the new ore block based on the list provided in the `may_replace` field of a `replace_rules` entry. If no `may_replace` field is specified in a `replace_rule` entry, the ore block can replace any existing block.\nSucceeds if: At least one ore block is successfully placed.\nFails if: All ore block placements fail.",
"additionalProperties": false,
"required": ["description", "feature_areas"],
"properties": {
"description": {
"title": "Description",
@@ -15,6 +18,42 @@
"$ref": "../../../../general/feature/identifier.json"
}
}
},
"ratio_of_empty_space": {
"title": "Ratio Of Empty Space",
"description": "Ratio of a Chunk to be filled with empty space rather than features.",
"type": "number"
},
"feature_areas": {
"title": "Feature Areas",
"description": "UNDOCUMENTATED",
"minItems": 1,
"maxItems": 4294967295,
"items": {
"type": "object",
"title": "Feature Area",
"description": "",
"additionalProperties": false,
"properties": {
"feature": {
"title": "Feature",
"description": "Feature to be placed.",
"type": "string",
"$ref": "../../../../general/feature/identifier.json"
},
"area_dimensions": {
"title": "Area Dimensions",
"description": "Dimensions (size) of the associated Feature.",
"type": "array",
"minItems": 2,
"maxItems": 2,
"items": [
{ "title": "Width", "type": "integer", "minimum": 0 },
{ "title": "Length", "type": "integer", "minimum": 0 }
]
}
}
}
}
}
}

View File

@@ -1,6 +1,9 @@
{
"type": "object",
"title": "Rect Layout",
"description": "`minecraft:scan_surface` scans the surface of a Chunk, calling place() on the surface of each block column.\nSucceeds if: A Feature was successfully placed during the scan.\nFails if: No Feature was placed during the course of the scan.",
"additionalProperties": false,
"required": ["description", "scan_surface_feature"],
"properties": {
"description": {
"title": "Description",
@@ -15,6 +18,12 @@
"$ref": "../../../../general/feature/identifier.json"
}
}
},
"scan_surface_feature": {
"title": "Scan Surface Feature",
"description": "Named reference of feature to be placed",
"type": "string",
"$ref": "../../../../general/feature/identifier.json"
}
}
}

View File

@@ -1,6 +1,63 @@
{
"type": "object",
"title": "Scatter Feature",
"description": "`minecraft:scatter_feature` scatters a feature throughout a chunk. The `x`, `y`, and `z` fields are per-coordinate parameters.\nNote that coordinates represent an offset from the input position, not an absolute position. Coordinates may be a single value, a random distribution, or molang expression that resolves to a numeric value. The `coordinate_eval_order` field is provided for finer control of coordinate resolution (particularly when using the `grid` distribution). `iterations` controls how many individual placements should occur if the `scatter_chance` check succeeds. The `scatter_chance` check happens once, so either all placements will run or none will.\nSucceeds if: At least one feature placement succeeds.\nFails if: All feature placements fail.",
"additionalProperties": false,
"required": ["description", "places_feature"],
"definitions": {
"coordinate": {
"title": "Coordinate",
"oneOf": [
{
"$ref": "../../../molang/number.json",
"description": "Expression for the coordinate (evaluated each iteration). Mutually exclusive with random distribution object below."
},
{
"type": "object",
"description": "Distribution for the coordinate (evaluated each iteration). Mutually exclusive with Molang expression above.",
"additionalProperties": false,
"required": ["extent", "distribution"],
"properties": {
"distribution": {
"title": "Distribution",
"description": "Type of distribution - uniform random, gaussian (centered in the range), or grid (either fixed-step or jittered)",
"type": "string",
"enum": ["uniform", "gaussian", "inverse_gaussian", "fixed_grid", "jittered_grid"]
},
"step_size": {
"title": "Step Size",
"description": "When the distribution type is grid, defines the distance between steps along this axis",
"type": "integer",
"minimum": 1
},
"grid_offset": {
"title": "Step Size",
"description": "When the distribution type is grid, defines the offset along this axis",
"type": "integer",
"minimum": 0
},
"extent": {
"title": "Extent",
"description": "UNDOCUMENTATED",
"type": "array",
"items": [
{
"title": "Lower bound",
"$ref": "../../../molang/number.json",
"description": "Lower bound (inclusive) of the scatter range, as an offset from the input point to scatter around"
},
{
"title": "Upper bound",
"$ref": "../../../molang/number.json",
"description": "Upper bound (inclusive) of the scatter range, as an offset from the input point to scatter around"
}
]
}
}
}
]
}
},
"properties": {
"description": {
"title": "Description",
@@ -15,6 +72,68 @@
"$ref": "../../../../general/feature/identifier.json"
}
}
},
"places_feature": {
"title": "Places Feature",
"description": "Named reference of feature to be placed",
"type": "string",
"$ref": "../../../../general/feature/identifier.json"
},
"project_input_to_floor": {
"title": "Project Input To Floor",
"description": "If true, snaps the y-value of the scattered position to the terrain heightmap. If false or unset, y-value is unmodified.",
"type": "boolean"
},
"iterations": {
"title": "Iterations",
"description": "Number of scattered positions to generate",
"$ref": "../../../../molang/number.json"
},
"scatter_chance": {
"title": "Scatter Chance",
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"description": "Probability numerator / denominator that this scatter will occur. Not evaluated each iteration; either no iterations will run, or all will.",
"properties": {
"numerator": {
"title": "Numerator",
"description": "UNDOUCMNEATED",
"type": "integer",
"minimum": 1
},
"denominator": {
"title": "Denominator",
"description": "UNDOUCMNEATED",
"type": "integer",
"minimum": 1
}
}
},
{
"$ref": "../../../../molang/number.json",
"description": "Probability (0-100] that this scatter will occur. Not evaluated each iteration; either no iterations will run, or all will."
}
]
},
"coordinate_eval_order": {
"title": "coordinate_eval_order",
"description": "The order in which coordinates will be evaluated. Should be used when a coordinate depends on another. If omitted, defaults to `xzy`.",
"type": "string",
"enum": ["xyz", "xzy", "yxz", "yzx", "zxy", "zyx"]
},
"x": {
"title": "X",
"$ref": "#/definitions/coordinate"
},
"y": {
"title": "X",
"$ref": "#/definitions/coordinate"
},
"z": {
"title": "X",
"$ref": "#/definitions/coordinate"
}
}
}

View File

@@ -1,6 +1,9 @@
{
"type": "object",
"title": "Search Feature",
"description": "`minecraft:search_feature` sweeps a volume searching for a valid placement location for its referenced feature. The `search_volume` field specifies the axis-aligned bounding box that defines the boundaries of the search. The search sweeps along the axis defined by the `search_axis` field, layer by layer. For example, if `search_axis` = '-x', blocks with greater x values will be checked before blocks with lower x values. Each layer is searched from the bottom-left to the top-right before moving to the next layer along the axis. By default, only one valid position must be found, but this can be altered by specifying the `required_successes` field. If fewer than the required successes are found, no placement will occur.\nSucceeds if: The number of valid positions is equal to the value specified by `required_successes`.\nFails if: The number of valid positions is less than the value specified by `required_successes`.",
"additionalProperties": false,
"required": ["description"],
"properties": {
"description": {
"title": "Description",
@@ -15,6 +18,53 @@
"$ref": "../../../../general/feature/identifier.json"
}
}
},
"places_feature": {
"title": "Places Feature",
"description": "Named reference of feature to be placed",
"type": "string",
"$ref": "../../../../general/feature/identifier.json"
},
"search_volume": {
"title": "Places Feature",
"description": "Axis-aligned bounding box that will be searched for valid placement positions. Expressed as offsets from the input position.",
"type": "object",
"additionalProperties": false,
"required": ["min", "max", "search_axis"],
"properties": {
"max": {
"title": "Max",
"description": "Maximum extent of the bounding volume expressed as [ x, y, z ]",
"type": "array",
"items": [
{ "title": "Max X", "type": "integer" },
{ "title": "Max Y", "type": "integer" },
{ "title": "Max Z", "type": "integer" }
]
},
"min": {
"title": "Min",
"description": "Maxium extent of the bounding volume expressed as [ x, y, z ]",
"type": "array",
"items": [
{ "title": "Min X", "type": "integer" },
{ "title": "Min Y", "type": "integer" },
{ "title": "Min Z", "type": "integer" }
]
},
"search_axis": {
"title": "Search Axis",
"description": "Axis that the search will sweep along through the `search_volume`",
"type": "string",
"enum": ["-x", "+x", "-y", "+y", "-z", "+z"]
},
"required_successes": {
"title": "Required successes",
"description": "Number of valid positions the search must find in order to place the referenced feature",
"type": "integer",
"minimum": 1
}
}
}
}
}

View File

@@ -1,5 +1,5 @@
{
"title": "Single block feature",
"title": "Single Block Feature",
"description": "`minecraft:single_block_feature` places a single block in the world. The `may_place_on` and `may_replace` fields are allowlists which specify where the block can be placed. If these fields are omitted, the block can be placed anywhere. The block's internal survivability and placement rules can optionally be enforced with the `enforce_survivability_rules` and `enforce_placement_rules` fields. These rules are specified per-block and are typically designed to produce high quality gameplay or natural behavior. However, enabling this enforcement may make it harder to debug placement failures.\n Succeeds if: The block is successfully placed in the world.\n Fails if: The block fails to be placed.",
"type": "object",
"additionalProperties": false,

View File

@@ -1,5 +1,5 @@
{
"title": "",
"title": "Snap To Surface Feature",
"description": "`minecraft:snap_to_surface_feature` snaps the y-value of a feature placement pos to the floor or the ceiling within the provided `vertical_search_range`. The placement biome is preserved. \nIf the snap position goes outside of the placement biome, placement will fail.",
"type": "object",
"additionalProperties": false,

View File

@@ -1,6 +1,9 @@
{
"title": "Structure Template Feature",
"description": "`minecraft:structure_template_feature` places a structure in the world. The structure must be stored as a .mcstructure file in the `structures` subdirectory of a behavior pack. It is possible to reference structures that are part of other behavior packs, they do not need to come from the same behavior pack as this feature. Constraints can be defined to specify where the structure is allowed to be placed. During placement, the feature will search for a position within the 'adjustment_radius' that satisfies all constraints. If none are found, the structure will not be placed.\nSucceeds if: The structure is placed in the world.\nFails if: The structure fails to be placed within the world.",
"type": "object",
"additionalProperties": false,
"required": ["description", "structure_name", "constraints"],
"properties": {
"description": {
"title": "Description",
@@ -15,6 +18,75 @@
"$ref": "../../../../general/feature/identifier.json"
}
}
},
"structure_name": {
"title": "Structure Name",
"description": "Reference to the structure to be placed.",
"type": "string"
},
"adjustment_radius": {
"title": "Adjustment Radius",
"description": "How far the structure is allowed to move when searching for a valid placement position. Search is radial, stopping when the nearest valid position is found. Defaults to 0 if omitted.",
"type": "integer",
"minimum": 0,
"maximum": 16
},
"facing_direction": {
"title": "Facing Direction",
"description": "Direction the structure will face when placed in the world. Defaults to `random` if omitted.",
"type": "string",
"enum": ["north", "south", "east", "west", "random"]
},
"constraints": {
"title": "",
"description": "Specific constraints that must be satisfied when placing this structure.",
"type": "object",
"additionalProperties": false,
"properties": {
"grounded": {
"title": "Grounded",
"description": "When specified, ensures the structure is on the ground.",
"type": "object",
"additionalProperties": false,
"properties": {}
},
"unburied": {
"title": "Unburied",
"description": "When specified, ensures the structure has air above it.",
"type": "object",
"additionalProperties": false,
"properties": {}
},
// When specified, ensures the structure only intersects with allowlisted blocks.
"block_intersection": {
"title": "Unburied",
"description": "When specified, ensures the structure has air above it.",
"type": "object",
"additionalProperties": false,
"properties": {
"block_allowlist": {
"title": "Block Allowlist",
"description": "List of blocks the owning structure is allowed to intersect with.",
"type": "array",
"items": {
"title": "Block",
"type": "string",
"$ref": "../../../../general/block/identifier.json"
}
},
"block_whitelist": {
"title": "Block Whitelist",
"description": "List of blocks the owning structure is allowed to intersect with.",
"type": "array",
"items": {
"title": "Block",
"type": "string",
"$ref": "../../../../general/block/identifier.json"
}
}
}
}
}
}
}
}