minecraft-bedrock-json-types
Version:
Typescript types for Minecraft Bedrock's add-on json configuration files.
1,730 lines • 65.2 kB
TypeScript
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
/**
* A version that tells minecraft what type of data format can be expected when reading this file.
*/
type FormatVersion = string;
/**
* The name of this feature in the form `namespace_name:feature_name`. `feature_name` must match the filename.
*/
type Identifier = string;
/**
* Collection of features to be placed one by one. No guarantee of order. All features use the same input position.
*
* @minItems 1
*/
type Features = [Feature1, ...(Feature1)[]];
/**
* Feature identifer
*/
type Feature1 = string;
/**
* Do not continue placing features once either the first success or first failure has occurred.
*/
type EarlyOut = ("none" | "first_failure" | "first_success");
/**
* Reference to the block to fill the cave with.
*/
type FillWith = string;
/**
* How many blocks to increase the cave radius by, from the center point of the cave.
*/
type WidthModifier = (string | number);
/**
* The chance to skip doing the carve (1 / value).
*/
type SkipCarveChance = number;
/**
* The height limit where we attempt to carve
*/
type HeightLimit = number;
/**
* The scaling in y
*
* @minItems 2
* @maxItems 2
*/
type YScale = [Min, Max];
type Min = number;
type Max = number;
/**
* @minItems 2
* @maxItems 2
*/
type HorizontalRadiusMultiplier = [Min1, Max1];
type Min1 = number;
type Max1 = number;
/**
* @minItems 2
* @maxItems 2
*/
type VerticalRadiusMultiplier = [Min2, Max2];
type Min2 = number;
type Max2 = number;
/**
* @minItems 2
* @maxItems 2
*/
type FloorLevel = [Min3, Max3];
type Min3 = number;
type Max3 = number;
/**
* Reference to the block to fill the cave with.
*/
type OreBlock = string;
/**
* UNDOCUMENTED
*/
type MaxEmptyCorners = number;
/**
* The block to fill the inside of the geode.
*/
type Filler = string;
/**
* The block that forms the inside layer of the geode shell.
*/
type InnerLayer = string;
/**
* The block that has a chance of generating instead of inner_layer.
*/
type AlternateInnerLayer = string;
/**
* The block that forms the middle layer of the geode shell.
*/
type MiddleLayer = string;
/**
* The block that forms the outer shell of the geode.
*/
type OuterLayer = string;
/**
* A list of blocks that may be replaced during placement. Omit this field to allow any block to be replaced.
*
* @minItems 1
*/
type InnerPlacements = [BlockReference, ...(BlockReference)[]];
/**
* A block that may be replaced during placement.
*/
type BlockReference = string;
/**
* The minimum distance each distribution point must be from the outer wall. [0,10]
*/
type MinimumOuterWallDistance = number;
/**
* The maximum distance each distribution point can be from the outer wall. [0,20]
*/
type MaximumOuterWallDistance = number;
/**
* The minimum number of points inside the distance field that can get generated. The distance field is the area consisting of all points with a minimum distance to all destribution points. [0,10]
*/
type MinimumDistributionPoints = number;
/**
* The maximum number of points inside the distance field that can get generated. The distance field is the area consisting of all points with a minimum distance to all destribution points. [0,20]
*/
type MaximumDistributionPoints = number;
/**
* The lowest possible value of random offset applied to the position of each distribution point. [0,10]
*/
type MinimumPointOffset = number;
/**
* The highest possible value of random offset applied to the position of each distribution point. [0,10]
*/
type MaximumPointOffset = number;
/**
* The maximum possible radius of the geode generated.
*/
type MaximumRadius = number;
/**
* An offset applied to each distribution point that forms the geode crack opening. [0,10]
*/
type CrackPointOffset = number;
/**
* The likelihood of a geode generating with a crack in its shell. [0,1]
*/
type GenerateCrackChance = number;
/**
* How large the crack opening of the geode should be when generated. [0,5]
*/
type BaseCrackSize = number;
/**
* A multiplier applied to the noise that is applied to the distribution points within the geode. Higher = more noisy.
*/
type NoiseMultiplier = number;
/**
* The likelihood that a special block will be placed on the inside of the geode. [0,1]
*/
type UsePotentialPlacementsChance = number;
/**
* The likelihood that a block in the innermost layer of the geode will be replaced with an alternate option. [0,1]
*/
type UseAlternateLayer0Chance = number;
/**
* If true, the potential placement block will only be placed on the alternate layer0 blocks that get placed. Potential placement blocks are blocks that depend on the existance of another block to be placed. The latter are the layer0 alternate blocks.
*/
type PlacementsRequireLayer0Alternate = boolean;
/**
* The threshold of invalid blocks for a geode to have a distribution point in before it aborts generation entirely.
*/
type InvalidBlocksThreshold = number;
/**
* Age of the head of the plant.
*/
type Age = (number | Range);
/**
* The maximum plant height.
*/
type RangeMax = number;
/**
* The minimum plant height.
*/
type RangeMin = number;
/**
* Collection of weighted heights that placement will select from.
*
* @minItems 1
*/
type HeightDistribution = [Items, ...(Items)[]];
/**
* Collection of weighted heights that placement will select from.
*
* @minItems 2
* @maxItems 2
*/
type Items = [PlantHeight, Weight];
/**
* Plant height.
*/
type PlantHeight = (number | Range);
/**
* Weight used in random selection. Value is relative to other weights in the collection.
*/
type Weight = number;
/**
* Direction that the plant grows towards. Valid values: UP and DOWN
*/
type GrowthDirection = ("UP" | "DOWN" | "up" | "down");
/**
* Collection of weighted block descriptor that placement will select from for the body of the plant.
*
* @minItems 1
*/
type BodyBlocks = [Blocks, ...(Blocks)[]];
/**
* Collection of weighted block descriptor that placement will select from for the plant.
*
* @minItems 2
* @maxItems 2
*/
type Blocks = [PlantBodyBlock, Age1];
/**
* Plant body block.
*/
type PlantBodyBlock = string;
/**
* A described range.
*/
type Age1 = (number | [] | [A] | [A, B] | {
range_min?: RangeMin1;
range_max?: RangeMax1;
});
/**
* The first value of the range.
*/
type A = number;
/**
* The second value of the range.
*/
type B = number;
/**
* The minimum value of the range.
*/
type RangeMin1 = number;
/**
* The maximum value of the range.
*/
type RangeMax1 = number;
/**
* Collection of weighted block descriptor that placement will select from for the body of the plant.
*
* @minItems 1
*/
type HeadBlocks = [Blocks, ...(Blocks)[]];
/**
* Plant blocks can be placed in water.
*/
type AllowWater = boolean;
/**
* Reference to the block to be placed.
*/
type PlacesBlock = string;
/**
* How far, in blocks, this feature can search for a valid position to place.
*/
type SearchRange = number;
/**
* Can this feature be placed on the ground (top face of a block)?.
*/
type CanPlaceOnFloor = boolean;
/**
* Can this feature be placed on the ceiling (bottom face of a block)?.
*/
type CanPlaceOnCeiling = boolean;
/**
* Can this feature be placed on the wall (side faces of a block)?.
*/
type CanPlaceOnWall = boolean;
/**
* For each block placed by this feature, how likely will that block spread to another?.
*/
type ChanceOfSpreading = number;
/**
* How far, in blocks, this feature can search for a valid position to place.
*
* @minItems 1
*/
type CanPlaceOn = [Block, ...(Block)[]];
/**
* 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.
*/
type Block = string;
/**
* Reference to the block to fill the cave with.
*/
type Identifier1 = string;
/**
* How many blocks to increase the cave radius by, from the center point of the cave.
*/
type Identifier2 = (string | number);
/**
* The chance to skip doing the carve (1 / value).
*/
type SkipCarveChance1 = number;
/**
* The height limit where we attempt to carve
*/
type HeightLimit1 = number;
/**
* The scaling in y
*
* @minItems 2
* @maxItems 2
*/
type YScale1 = [Min4, Max4];
type Min4 = number;
type Max4 = number;
/**
* @minItems 2
* @maxItems 2
*/
type HorizontalRadiusMultiplier1 = [Min5, Max5];
type Min5 = number;
type Max5 = number;
/**
* @minItems 2
* @maxItems 2
*/
type VerticalRadiusMultiplier1 = [Min6, Max6];
type Min6 = number;
type Max6 = number;
/**
* @minItems 2
* @maxItems 2
*/
type FloorLevel1 = [Min7, Max7];
type Min7 = number;
type Max7 = number;
/**
* The number of blocks to be placed.
*/
type Count = number;
/**
* 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.
*
* @minItems 1
*/
type ReplaceRules = [RepalceRule, ...(RepalceRule)[]];
/**
* Reference to the block to be placed.
*/
type PlacesBlock1 = string;
/**
* A list of blocks that may be replaced during placement. Omit this field to allow any block to be replaced.
*
* @minItems 1
*/
type MayReplace = [BlockIdentifier, ...(BlockIdentifier)[]];
/**
* A minecraft block identifier.
*/
type BlockIdentifier = string;
/**
* Chance of discarding placement if neighboring block is Air.
*/
type DiscardChanceOnAirExposure = number;
/**
* A minecraft block identifier.
*/
type BlockIdentifier1 = string;
/**
* Defines the cubic radius of the blob.
*/
type PlacementRadiusAroundFloor = number;
/**
* The probability of trying to place a block at each position within the placement bounds.
*/
type PlacementProbabilityPerValidPosition = number;
/**
* Defines a block face that is allowed to be exposed to air and/or water. Other faces need to be embedded for blocks to be placed by this feature. Defaults to upwards face
*/
type ExposedFace = ("up" | "down" | "side" | "north" | "east" | "west" | "south");
/**
* Named reference of feature to be placed.
*/
type PlacesFeature = string;
/**
* If true, snaps the y-value of the scattered position to the terrain heightmap. If false or unset, y-value is unmodified.
*/
type ProjectInputToFloor = boolean;
/**
* Number of scattered positions to generate.
*/
type Iterations = (string | number);
type ScatterChance = ({
numerator?: Numerator;
denominator?: Denominator;
} | MolangNumber);
/**
* UNDOCUMENTED.
*/
type Numerator = number;
/**
* UNDOCUMENTED.
*/
type Denominator = number;
/**
* Probability (0-100] that this scatter will occur. Not evaluated each iteration; either no iterations will run, or all will.
*/
type MolangNumber = (string | number);
/**
* The order in which coordinates will be evaluated. Should be used when a coordinate depends on another. If omitted, defaults to `xzy`.
*/
type CoordinateEvalOrder = ("xyz" | "xzy" | "yxz" | "yzx" | "zxy" | "zyx");
type X = (MolangNumber1 | {
distribution: Distribution;
step_size?: StepSize;
grid_offset?: StepSize1;
extent: Extent;
});
/**
* Expression for the coordinate (evaluated each iteration). Mutually exclusive with random distribution object below.
*/
type MolangNumber1 = (string | number);
/**
* Type of distribution - uniform random, gaussian (centered in the range), triangle (centered in the range), or grid (either fixed-step or jittered).
*/
type Distribution = ("uniform" | "gaussian" | "inverse_gaussian" | "triangle" | "fixed_grid" | "jittered_grid");
/**
* When the distribution type is grid, defines the distance between steps along this axis.
*/
type StepSize = number;
/**
* When the distribution type is grid, defines the offset along this axis.
*/
type StepSize1 = number;
/**
* The lower and upper bound as an offset from the input position
*/
type Extent = [] | [LowerBound] | [LowerBound, UpperBound];
/**
* Lower bound (inclusive) of the scatter range, as an offset from the input point to scatter around.
*/
type LowerBound = (string | number);
/**
* Upper bound (inclusive) of the scatter range, as an offset from the input point to scatter around.
*/
type UpperBound = (string | number);
type X1 = (MolangNumber1 | {
distribution: Distribution;
step_size?: StepSize;
grid_offset?: StepSize1;
extent: Extent;
});
type X2 = (MolangNumber1 | {
distribution: Distribution;
step_size?: StepSize;
grid_offset?: StepSize1;
extent: Extent;
});
/**
* Named reference of feature to be placed.
*/
type PlacesFeature1 = string;
/**
* Maximum extent of the bounding volume expressed as [ x, y, z ].
*/
type Max8 = [] | [MaximumX] | [MaximumX, MaximumY] | [MaximumX, MaximumY, MaximumZ];
type MaximumX = number;
type MaximumY = number;
type MaximumZ = number;
/**
* Maxium extent of the bounding volume expressed as [ x, y, z ].
*/
type Min8 = [] | [MinimumX] | [MinimumX, MinimumY] | [MinimumX, MinimumY, MinimumZ];
type MinimumX = number;
type MinimumY = number;
type MinimumZ = number;
/**
* Axis that the search will sweep along through the `search_volume`.
*/
type SearchAxis = ("-x" | "+x" | "-y" | "+y" | "-z" | "+z");
/**
* Number of valid positions the search must find in order to place the referenced feature.
*/
type RequiredSuccesses = number;
/**
* List of features to be placed in sequence. The output position of the previous feature is used as the input position to the next.
*
* @minItems 1
*/
type Features1 = [Feature2, ...(Feature2)[]];
/**
* A feature to be placed in sequence. The output position of the previous feature is used as the input position to the next.
*/
type Feature2 = string;
/**
* A minecraft block identifier.
*/
type BlockIdentifier2 = string;
/**
* If true, enforce the block's canPlace check.
*/
type EnforcePlacementRules = boolean;
/**
* If true, enforce the block's canSurvive check.
*/
type EnforceSurvivabilityRules = boolean;
/**
* Automatically rotate the block to attach sensibly.
*/
type AutoRotate = boolean;
/**
* UNDOCUMENTED.
*/
type Top = (BlockIdentifier3 | BlockIdentifier4[]);
/**
* A minecraft block identifier.
*/
type BlockIdentifier3 = string;
/**
* A minecraft block identifier.
*/
type BlockIdentifier4 = string;
/**
* UNDOCUMENTED.
*/
type Bottom = (BlockIdentifier3 | BlockIdentifier4[]);
/**
* UNDOCUMENTED.
*/
type North = (BlockIdentifier3 | BlockIdentifier4[]);
/**
* UNDOCUMENTED.
*/
type South = (BlockIdentifier3 | BlockIdentifier4[]);
/**
* UNDOCUMENTED.
*/
type East = (BlockIdentifier3 | BlockIdentifier4[]);
/**
* UNDOCUMENTED.
*/
type West = (BlockIdentifier3 | BlockIdentifier4[]);
/**
* UNDOCUMENTED.
*/
type All = (BlockIdentifier3 | BlockIdentifier4[]);
/**
* UNDOCUMENTED.
*/
type Sides = (BlockIdentifier3 | BlockIdentifier4[]);
/**
* A minecraft block identifier.
*/
type BlockIdentifier5 = string;
/**
* A list of blocks that may be replaced during placement. Omit this field to allow any block to be replaced.
*/
type MayReplace1 = BlockIdentifier5[];
/**
* Named reference of feature to be snapped.
*/
type FeatureToSnap = string;
/**
* Range to search for a floor or ceiling for snaping the feature.
*/
type VerticalSearchRange = number;
/**
* Defines the surface that the y-value of the placement position will be snapped to. Valid values: `ceiling` and `floor'
*/
type Surface = ("ceiling" | "floor" | "random_horizontal");
/**
* Determines whether the feature can snap through air blocks
*/
type AllowAirPlacement = boolean;
/**
* Determines whether the feature can snap through water blocks
*/
type AllowUnderwaterPlacement = boolean;
/**
* Reference to the structure to be placed.
*/
type StructureName = string;
/**
* 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 AdjustmentRadius = number;
/**
* Direction the structure will face when placed in the world. Defaults to `random` if omitted.
*/
type FacingDirection = ("north" | "south" | "east" | "west" | "random");
/**
* A minecraft block identifier.
*/
type BlockIdentifier6 = string;
/**
* List of blocks the owning structure is allowed to intersect with.
*/
type BlockAllowlist = BlockIdentifier6[];
/**
* A minecraft block identifier.
*/
type BlockIdentifier7 = string;
/**
* List of blocks the owning structure is allowed to intersect with.
*/
type BlockWhitelist = BlockIdentifier7[];
/**
* Named reference of feature to be placed.
*/
type FeatureToPlace = string;
/**
* The minimum number of blocks required to be between the estimated surface level and a valid place for this feature.
*/
type MinimumDistanceBelowSurface = number;
type BaseBlock = (BlockIdentifier | BlockIdentifier8[]);
/**
* A minecraft block identifier.
*/
type BlockIdentifier8 = string;
/**
* List of blocks that the base cluster of a tree can replace.
*/
type MayReplace2 = BlockIdentifier[];
/**
* Number of clusters that can be generated.
*/
type NumClusters = number;
/**
* Radius where the clusters that can be generated.
*/
type ClustersRadius = number;
/**
* List of blocks where a tree can grow on.
*/
type MayGrowOn = BlockIdentifier[];
/**
* List of blocks that a tree can replace.
*/
type MayReaplce = BlockIdentifier[];
/**
* List of blocks that a tree can grow through.
*/
type MayGrowThrough = BlockIdentifier[];
/**
* The width of the tree trunk.
*/
type TrunkWidth = number;
/**
* Min height for the trunk.
*/
type Base = number;
/**
* Intervals used to randomize the trunk height, the value of each interval will create a random number where (0 <= rand < interval)), and will be added to the height.
*
* @minItems 1
*/
type Intervals = [number, ...(number)[]];
/**
* Min height where the canopy can be placed.
*/
type MinimumHeightForCanopy = number;
/**
* If true, diagonal branches will be created.
*/
type AllowDiagonalGrowth = boolean;
/**
* Number of blocks below the tree height at which diagonal branches can be created.
*/
type LeanHeight = (number | [] | [A] | [A, B] | {
range_min?: RangeMin1;
range_max?: RangeMax1;
});
/**
* Number of steps taken in X/Z direction while creating a diagonal branch.
*/
type LeanSteps = (number | [] | [A] | [A, B] | {
range_min?: RangeMin1;
range_max?: RangeMax1;
});
/**
* Length for the diagonal branch in the Y axis.
*/
type LeanLength = (number | [] | [A] | [A, B] | {
range_min?: RangeMin1;
range_max?: RangeMax1;
});
/**
* The block that forms the tree trunk.
*/
type TrunkBlock = string;
/**
* Length for the branch in the Y axis.
*/
type BranchLength = (number | [] | [A] | [A, B] | {
range_min?: RangeMin1;
range_max?: RangeMax1;
});
/**
* Starting Y position for the branch.
*/
type BranchPosition = (number | [] | [A] | [A, B] | {
range_min?: RangeMin1;
range_max?: RangeMax1;
});
/**
* Probability of creating a branch.
*/
type BranchChance = ({
numerator?: Numerator1;
denominator?: Denominator1;
[k: string]: unknown;
} | number);
/**
* UNDOCUMENTED.
*/
type Numerator1 = number;
/**
* UNDOCUMENTED.
*/
type Denominator1 = number;
/**
* The size of the canopy.
*/
type CanopySize = number;
/**
* The block thata forms the canopy of the tree.
*/
type LeafBlock = string;
/**
* If true the canopy uses a simple pattern.
*/
type SimplifyCanopy = boolean;
/**
* Min canopy position offset.
*/
type Min9 = number;
/**
* Max canopy position offset.
*/
type Max9 = number;
/**
* Min width for the canopy.
*/
type MinWidth = number;
/**
* The numerator for the slope fraction.
*/
type Rise = number;
/**
* The denominator for the slope fraction.
*/
type Run = number;
/**
* Determines the chance of creating leaf blocks for every layer of the canopy. Larger numbers create a denser tree.
*/
type VariationChance = (ChanceInformation | ChanceInformation[]);
/**
* Chance of something happening represented either as a fraction or a percentage.
*/
type ChanceInformation = ({
numerator?: Numerator1;
denominator?: Denominator1;
[k: string]: unknown;
} | number);
/**
* Chance of something happening represented either as a fraction or a percentage.
*/
type ChanceInformation1 = ({
numerator?: Numerator1;
denominator?: Denominator1;
[k: string]: unknown;
} | number);
/**
* A minecraft block identifier.
*/
type BlockIdentifier9 = string;
/**
* Number of decoration blocks to place.
*/
type NumSteps = number;
/**
* Directions to spread decoration blocks.
*/
type StepDirection = ("down" | "up" | "out" | "away");
/**
* Number of layers for the canopy.
*/
type Height = number;
/**
* The radius of the canopy.
*/
type Radius = number;
/**
* Chance of something happening represented either as a fraction or a percentage.
*/
type ChanceInformation2 = ({
numerator?: Numerator1;
denominator?: Denominator1;
[k: string]: unknown;
} | number);
/**
* Chance of something happening represented either as a fraction or a percentage.
*/
type ChanceInformation3 = ({
numerator?: Numerator1;
denominator?: Denominator1;
[k: string]: unknown;
} | number);
/**
* Chance of something happening represented either as a fraction or a percentage.
*/
type ChanceInformation4 = ({
numerator?: Numerator1;
denominator?: Denominator1;
[k: string]: unknown;
} | number);
/**
* Chance of something happening represented either as a fraction or a percentage.
*/
type ChanceInformation5 = ({
numerator?: Numerator1;
denominator?: Denominator1;
[k: string]: unknown;
} | number);
/**
* Max number of attempts to create leaf blocks.
*/
type LeafPlacementAttempts = number;
/**
* The blocks that form the canopy of the tree
*
* @minItems 1
*/
type LeafBlocks = [LeafBlock] | [LeafBlock, Weight1];
/**
* Weight used in random selection. Value is relative to other weights in the collection.
*/
type Weight1 = number;
/**
* Chance of something happening represented either as a fraction or a percentage.
*/
type ChanceInformation6 = ({
numerator?: Numerator1;
denominator?: Denominator1;
[k: string]: unknown;
} | number);
/**
* A minecraft block identifier.
*/
type BlockIdentifier10 = string;
/**
* Number of decoration blocks to place.
*/
type NumSteps1 = number;
/**
* Directions to spread decoration blocks.
*/
type StepDirection1 = ("down" | "up" | "out" | "away");
/**
* A minecraft block identifier.
*/
type BlockIdentifier11 = string;
/**
* Chance of something happening represented either as a fraction or a percentage.
*/
type ChanceInformation7 = ({
numerator?: Numerator1;
denominator?: Denominator1;
[k: string]: unknown;
} | number);
/**
* Width of the tree trunk.
*/
type CoreWidth = number;
/**
* The radius of the canopy.
*/
type Radius1 = number;
/**
* Modifier for the base radius of the canopy.
*/
type RadiusStepModifier = number;
/**
* Width of the tree trunk.
*/
type CoreWidth1 = number;
/**
* Roofed canopies feature a base and a top layer, and an extra cap layer on some occasions, this value controls the number of layers in the middle.
*/
type CanopyHeight = number;
/**
* Width of the tree trunk.
*/
type CoreWidth2 = number;
/**
* Radius used for the base and top layers.
*/
type OuterRadius = number;
/**
* Radius used for the middle layers.
*/
type InnerRadius = number;
/**
* Min canopy position offset.
*/
type LowerOffset = number;
/**
* Max canopy position offset.
*/
type UpperOffset = number;
/**
* Max radius of the canopy.
*/
type MaxRadius = number;
/**
* Min height for the trunk.
*/
type Base1 = number;
/**
* Intervals used to randomize the trunk height, the value of each interval will create a random number where (0 <= rand < interval)), and will be added to the height.
*
* @minItems 1
*/
type Intervals1 = [number, ...(number)[]];
/**
* Tree variant with one branch.
*/
type OneBranch = number;
/**
* Tree variant with two branches.
*/
type TwoBranches = number;
/**
* Tree variant with three branch.
*/
type TwoBranchesAndTrunk = number;
/**
* Branch length in X/Z axis.
*/
type BranchHorizontalLength = (number | [] | [A] | [A, B] | {
range_min?: RangeMin1;
range_max?: RangeMax1;
});
/**
* Branch starting position relative to the top of the tree
*/
type BranchStartOffsetFromTop = (number | [] | [A] | [A, B] | {
range_min?: RangeMin1;
range_max?: RangeMax1;
});
/**
* Branch end position relative to the top of the tree
*/
type BranchEndOffsetFromTop = (number | [] | [A] | [A, B] | {
range_min?: RangeMin1;
range_max?: RangeMax1;
});
/**
* Chance of something happening represented either as a fraction or a percentage.
*/
type ChanceInformation8 = ({
numerator?: Numerator1;
denominator?: Denominator1;
[k: string]: unknown;
} | number);
/**
* Length of the fallen log.
*/
type LogLength = number;
/**
* height of the stump.
*/
type StumpHeight = number;
/**
* Modifier for the length of the fallen log.
*/
type HeightModifier = number;
/**
* Feature that can be used to decorate the fallen log.
*/
type LogDecorationFeature = string;
/**
* Min height for the trunk.
*/
type Base2 = number;
/**
* Modifier for the trunk height.
*/
type Variance = number;
/**
* Final tree height is multiplied by this scale.
*/
type Scale = number;
/**
* Slope for the branch, where 0 is horizontal and 1 is vertical.
*/
type Slope = number;
/**
* Density of foliage.
*/
type Density = number;
/**
* Min height for branches. Represented by a percentage of the tree height.
*/
type MinAltitudeFactor = number;
/**
* Scale modifier for the tree radius.
*/
type WidthScale = number;
/**
* Min height for foliage. Represented by a percentage of the tree height.
*/
type FoliageAltitudeFactor = number;
/**
* Min height for the trunk.
*/
type Base3 = number;
/**
* Tree height modifier A.
*/
type HeightRandA = number;
/**
* Tree height modifier B.
*/
type HeightRandB = number;
/**
* Length for the branch in the Y axis.
*/
type BranchLength1 = (number | [] | [A] | [A, B] | {
range_min?: RangeMin1;
range_max?: RangeMax1;
});
/**
* Number of branches to place.
*/
type BranchSteps = (number | [] | [A] | [A, B] | {
range_min?: RangeMin1;
range_max?: RangeMax1;
});
/**
* Chance of something happening represented either as a fraction or a percentage.
*/
type ChanceInformation9 = ({
numerator?: Numerator1;
denominator?: Denominator1;
[k: string]: unknown;
} | number);
/**
* Min height for the trunk.
*/
type Base4 = number;
/**
* Intervals used to randomize the trunk height, the value of each interval will create a random number where (0 <= rand < interval)), and will be added to the height.
*
* @minItems 1
*/
type Intervals2 = [number, ...(number)[]];
/**
* Min height where the canopy can be placed.
*/
type MinimumHeightForCanopy1 = number;
/**
* Length for the branch.
*/
type BranchLength2 = number;
/**
* Slope for the branch, where 0 is horizontal and 1 is vertical.
*/
type BranchSlope = number;
/**
* Randomized distance between branches.
*/
type BranchInterval = (number | [] | [A] | [A, B] | {
range_min?: RangeMin1;
range_max?: RangeMax1;
});
/**
* Min altitude where branches can spawn.
*/
type Min10 = number;
/**
* Max altitude where branches can spawn.
*/
type Max10 = number;
/**
* Defines the height of the trunk.
*/
type TrunkHeight5 = (number | [] | [A] | [A, B] | {
range_min?: RangeMin1;
range_max?: RangeMax1;
});
/**
* Modifier for the height of the trunk.
*/
type HeightModifier1 = (number | [] | [A] | [A, B] | {
range_min?: RangeMin1;
range_max?: RangeMax1;
});
/**
* Specifies if the trunk can be submerged.
*/
type CanBeSubmerged = ({
max_depth?: MaxDepth;
} | boolean);
/**
* Defines the max depth at which the trunk can be submerged.
*/
type MaxDepth = number;
/**
* The size of the canopy.
*/
type CanopySize1 = number;
/**
* Min canopy position offset.
*/
type Min11 = number;
/**
* Max canopy position offset.
*/
type Max11 = number;
/**
* Min width for the canopy.
*/
type MinWidth1 = number;
/**
* The numerator for the slope fraction.
*/
type Rise1 = number;
/**
* The denominator for the slope fraction.
*/
type Run1 = number;
/**
* Determines the chance of creating leaf blocks for every layer of the canopy. Larger numbers create a denser tree.
*/
type VariationChance1 = (ChanceInformation | ChanceInformation[]);
/**
* Chance of something happening represented either as a fraction or a percentage.
*/
type ChanceInformation10 = ({
numerator?: Numerator1;
denominator?: Denominator1;
[k: string]: unknown;
} | number);
/**
* A minecraft block identifier.
*/
type BlockIdentifier12 = string;
/**
* Number of decoration blocks to place.
*/
type NumSteps2 = number;
/**
* Directions to spread decoration blocks.
*/
type StepDirection2 = ("down" | "up" | "out" | "away");
/**
* Chance of something happening represented either as a fraction or a percentage.
*/
type ChanceInformation11 = ({
numerator?: Numerator1;
denominator?: Denominator1;
[k: string]: unknown;
} | number);
/**
* Chance of something happening represented either as a fraction or a percentage.
*/
type ChanceInformation12 = ({
numerator?: Numerator1;
denominator?: Denominator1;
[k: string]: unknown;
} | number);
/**
* Chance of something happening represented either as a fraction or a percentage.
*/
type ChanceInformation13 = ({
numerator?: Numerator1;
denominator?: Denominator1;
[k: string]: unknown;
} | number);
/**
* Chance of something happening represented either as a fraction or a percentage.
*/
type ChanceInformation14 = ({
numerator?: Numerator1;
denominator?: Denominator1;
[k: string]: unknown;
} | number);
/**
* Max number of attempts to create leaf blocks.
*/
type LeafPlacementAttempts1 = number;
/**
* The blocks that form the canopy of the tree
*
* @minItems 1
*/
type LeafBlocks1 = [LeafBlock] | [LeafBlock, Weight2];
/**
* Weight used in random selection. Value is relative to other weights in the collection.
*/
type Weight2 = number;
/**
* A minecraft block identifier.
*/
type BlockIdentifier13 = string;
/**
* Chance of something happening represented either as a fraction or a percentage.
*/
type ChanceInformation15 = ({
numerator?: Numerator1;
denominator?: Denominator1;
[k: string]: unknown;
} | number);
/**
* Width of the tree trunk.
*/
type CoreWidth3 = number;
/**
* The radius of the canopy.
*/
type Radius2 = number;
/**
* Modifier for the base radius of the canopy.
*/
type RadiusStepModifier1 = number;
/**
* Width of the tree trunk.
*/
type CoreWidth4 = number;
/**
* Roofed canopies feature a base and a top layer, and an extra cap layer on some occasions, this value controls the number of layers in the middle.
*/
type CanopyHeight1 = number;
/**
* Width of the tree trunk.
*/
type CoreWidth5 = number;
/**
* Radius used for the base and top layers.
*/
type OuterRadius1 = number;
/**
* Radius used for the middle layers.
*/
type InnerRadius1 = number;
/**
* Min canopy position offset.
*/
type LowerOffset1 = number;
/**
* Max canopy position offset.
*/
type UpperOffset1 = number;
/**
* Max radius of the canopy.
*/
type MaxRadius1 = number;
/**
* Max number of attempts to create leaf blocks.
*/
type LeafPlacementAttempts2 = number;
/**
* The blocks that form the canopy of the tree
*
* @minItems 1
*/
type LeafBlocks2 = [LeafBlock] | [LeafBlock, Weight3];
/**
* Weight used in random selection. Value is relative to other weights in the collection.
*/
type Weight3 = number;
/**
* Max width that the roots can occupy. The width increases up to the max width while moving downwards. When a max width is reached, roots will grow vertically
*/
type MaxRootWidth = number;
/**
* Max length that the roots can occupy.
*/
type MaxRootLength = number;
/**
* A minecraft block identifier.
*/
type BlockIdentifier14 = string;
/**
* Chance of something happening represented either as a fraction or a percentage.
*/
type ChanceInformation16 = ({
numerator?: Numerator1;
denominator?: Denominator1;
[k: string]: unknown;
} | number);
/**
* A minecraft block identifier.
*/
type BlockIdentifier15 = string;
/**
* A minecraft block identifier.
*/
type BlockIdentifier16 = string;
/**
* A minecraft block identifier.
*/
type BlockIdentifier17 = string;
/**
* Root offset from the trunk
*/
type YOffset = (number | [] | [A] | [A, B] | {
range_min?: RangeMin1;
range_max?: RangeMax1;
});
/**
* List of blocks that a root can grow through.
*/
type RootsMayGrowThrough = BlockIdentifier[];
/**
* A minecraft block identifier.
*/
type BlockIdentifier18 = string;
/**
* How many blocks to increase the cave radius by, from the center point of the cave.
*/
type WidthModifier1 = (string | number);
/**
* The chance to skip doing the carve (1 / value).
*/
type SkipCarveChance2 = number;
/**
* The height limit where we attempt to carve
*/
type HeightLimit2 = number;
/**
* The scaling in y
*
* @minItems 2
* @maxItems 2
*/
type YScale2 = [Min12, Max12];
type Min12 = number;
type Max12 = number;
/**
* @minItems 2
* @maxItems 2
*/
type HorizontalRadiusMultiplier2 = [Min13, Max13];
type Min13 = number;
type Max13 = number;
/**
* @minItems 2
* @maxItems 2
*/
type VerticalRadiusMultiplier2 = [Min14, Max14];
type Min14 = number;
type Max14 = number;
/**
* @minItems 2
* @maxItems 2
*/
type FloorLevel2 = [Min15, Max15];
type Min15 = number;
type Max15 = number;
/**
* A minecraft block identifier.
*/
type BlockIdentifier19 = string;
/**
* A minecraft block identifier.
*/
type BlockIdentifier20 = string;
/**
* Blocks that can be replaced by the ground blocks on the patch.
*/
type ReplaceableBlocks = BlockIdentifier20[];
/**
* A minecraft block identifier.
*/
type BlockIdentifier21 = string;
/**
* Feature that will be placed by the patch.
*/
type VegetationFeature = string;
/**
* Determines if a vegetation patch will grow from the ceiling or the floor.
*/
type Surface1 = ("floor" | "ceiling");
/**
* Depth of the base covered by the ground blocks.
*/
type Depth = number;
/**
* Probability of putting the ground blocks one block deeper. Adds some randomness to the bottom of the patch.
*/
type ExtraDeepBlockChance = number;
/**
* Vertical range used to determine a suitable surface position for the patch.
*/
type VerticalRange = number;
/**
* Probability of spawning vegetation on the patch. Larger numbers create a denser vegetation patch.
*/
type VegatationChance = number;
/**
* Horizontal area that the vegetation patch will cover.
*/
type HorizontalRadius = number;
/**
* Probability of spawning vegetation on the edge of the patch radius.
*/
type ExtraEgdeColumnChance = number;
/**
* If true, waterlogs the positions occupied by the ground blocks.
*/
type Waterlogged = boolean;
/**
* Collection of weighted features that placement will select from.
*
* @minItems 1
*/
type Features2 = [Feature3, ...(Feature3)[]];
/**
* Named reference to a feature.
*/
type Feature3 = [] | [Feature4] | [Feature4, Weight4];
/**
* Named reference to a feature.
*/
type Feature4 = string;
/**
* Weight used in random selection. Value is relative to other weights in the collection.
*/
type Weight4 = number;
/**
* Features are decorations scattered throughout the world. Things such as trees, plants, flowers, springs, ore, and coral are all features. Basically, if it isn't the terrain or a mob, it's probably a feature!
*/
export interface Feature {
format_version: FormatVersion;
"minecraft:aggregate_feature"?: AggregateFeature;
"minecraft:cave_carver_feature"?: CaveCarverFeature;
"minecraft:fossil_feature"?: FossilFeature;
"minecraft:geode_feature"?: GeodeFeature;
"minecraft:growing_plant_feature"?: GrowingPlantFeature;
"minecraft:multiface_feature"?: MultifaceFeature;
"minecraft:nether_cave_carver_feature"?: NetherCaveCarverFeature;
"minecraft:ore_feature"?: OreFeature;
"minecraft:partially_exposed_blob_feature"?: PartiallyExposedBlobFeature;
"minecraft:scatter_feature"?: ScatterFeature;
"minecraft:search_feature"?: SearchFeature;
"minecraft:sequence_feature"?: SequenceFeature;
"minecraft:single_block_feature"?: SingleBlockFeature;
"minecraft:snap_to_surface_feature"?: SnapToSurfaceFeature;
"minecraft:structure_template_feature"?: StructureTemplateFeature;
"minecraft:surface_relative_threshold_feature"?: SurfaceRelativeThresholdFeature;
"minecraft:tree_feature"?: TreeFeature;
"minecraft:underwater_cave_carver_feature"?: UnderwaterCaveCarverFeature;
"minecraft:vegetation_patch_feature"?: VegetationPatchFeature;
"minecraft:weighted_random_feature"?: WeightedRandomFeature;
}
/**
* 'minecraft:aggregate_feature` places a collection of features in an arbitary order. All features in the collection use the same input position. Features should not depend on each other, as there is no guarantee on the order the features will be placed.
* Succeeds if: At lease one feature is placed successfully.
* Fails if: All features fail to be placed.
*/
interface AggregateFeature {
description: Description;
features: Features;
early_out?: EarlyOut;
}
/**
* Feature's description containing the identifier
*/
interface Description {
identifier: Identifier;
[k: string]: unknown;
}
/**
* `minecraft:cave_carver_feature` carves a cave through the world in the current chunk, and in every chunk around the current chunk in an 8 radial pattern. This feature will also only work when placed specifically in the pass `pregeneration_pass`.
*/
interface CaveCarverFeature {
description: Description;
fill_with?: FillWith;
width_modifier?: WidthModifier;
skip_carve_chance?: SkipCarveChance;
height_limit?: HeightLimit;
y_scale?: YScale;
horizontal_radius_multiplier?: HorizontalRadiusMultiplier;
vertical_radius_multiplier?: VerticalRadiusMultiplier;
floor_level?: FloorLevel;
}
/**
* 'minecraft:fossil_feature' generates a skeletal structure composed of bone blocks and parametric ore blocks.
*/
interface FossilFeature {
description: Description;
ore_block?: OreBlock;
max_empty_corners?: MaxEmptyCorners;
}
/**
* `minecraft:geode_feature` generates a rock formation to simulate a geode. Each layer of, and block within, the geode can be replaced.
* Succeeds if: At least one block within the geode is placed.
* Fails if: All blocks within the geode fail to be placed.
*/
interface GeodeFeature {
description: Description;
filler: Filler;
inner_layer: InnerLayer;
alternate_inner_layer: AlternateInnerLayer;
middle_layer: MiddleLayer;
outer_layer: OuterLayer;
inner_placements?: InnerPlacements;
min_outer_wall_distance: MinimumOuterWallDistance;
max_outer_wall_distance: MaximumOuterWallDistance;
min_distribution_points: MinimumDistributionPoints;
max_distribution_points: MaximumDistributionPoints;
min_point_offset: MinimumPointOffset;
max_point_offset: MaximumPointOffset;
max_radius: MaximumRadius;
crack_point_offset: CrackPointOffset;
generate_crack_chance: GenerateCrackChance;
base_crack_size: BaseCrackSize;
noise_multiplier: NoiseMultiplier;
use_potential_placements_chance: UsePotentialPlacementsChance;
use_alternate_layer0_chance: UseAlternateLayer0Chance;
placements_require_layer0_alternate: PlacementsRequireLayer0Alternate;
invalid_blocks_threshold: InvalidBlocksThreshold;
}
/**
* `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.
* The 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.
* This feature can be used to define growing plants with variable body and head blocks, e.g. Cave Vines.
*/
interface GrowingPlantFeature {
description: Description;
age?: Age;
height_distribution: HeightDistribution;
growth_direction: GrowthDirection;
body_blocks: BodyBlocks;
head_blocks: HeadBlocks;
allow_water?: AllowWater;
}
/**
* A range.
*/
interface Range {
range_max: RangeMax;
range_min: RangeMin;
[k: string]: unknown;
}
/**
* `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.
* This feature will also try to spread the `place_block` block around the location in world the feature is placed.
* Succeeds if: At least one block is successfully placed.
* Fails if: All block placements fail.
*/
interface MultifaceFeature {
description: Description;
places_block: PlacesBlock;
search_range: SearchRange;
can_place_on_floor: CanPlaceOnFloor;
can_place_on_ceiling: CanPlaceOnCeiling;
can_place_on_wall: CanPlaceOnWall;
chance_of_spreading: ChanceOfSpreading;
can_place_on?: CanPlaceOn;
}
/**
* `minecraft:nether_cave_carver_feature` carves a cave through the Nether in the current chunk, and in every chunk around the current chunk in an 8 radial pattern.This feature will also only work when placed specifically in the pass `pregeneration_pass`.
*/
interface NetherCaveCarverFeature {
description: Description;
fill_with?: Identifier1;
width_modifier?: Identifier2;
skip_carve_chance?: SkipCarveChance1;
height_limit?: HeightLimit1;
y_scale?: YScale1;
horizontal_radius_multiplier?: HorizontalRadiusMultiplier1;
vertical_radius_multiplier?: VerticalRadiusMultiplier1;
floor_level?: FloorLevel1;
}
/**
* `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.
* Succeeds if: At least one ore block is successfully placed.
* Fails if: All ore block placements fail.
*/
interface OreFeature {
description: Description;
count: Count;
replace_rules?: ReplaceRules;
discard_chance_on_air_exposure?: DiscardChanceOnAirExposure;
}
/**
* If a rule is resolved, the rest will not be resolved for that block position.
*/
interface RepalceRule {
places_block: PlacesBlock1;
may_replace?: MayReplace;
[k: string]: unknown;
}
/**
* 'minecraft:partially_exposed_blob_feature' generates a blob of the specified block with the specified dimensions For the most part the blob is embedded in the specified surface, however a single side is allowed to be exposed.
*/
interface PartiallyExposedBlobFeature {
description: Description;
places_block: BlockIdentifier1;
placement_radius_around_floor: PlacementRadiusAroundFloor;
placement_probability_per_valid_position: PlacementProbabilityPerValidPosition;
exposed_face?: ExposedFace;
}
/**
* `minecraft:scatter_feature` scatters a feature throughout a chunk. The `x`, `y`, and `z` fields are per-coordinate parameters.
* Note 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.
* Succeeds if: At least one feature placement succeeds.
* Fails if: All feature placements fail.
*/
interface ScatterFeature {
description: Description;
places_feature: PlacesFeature;
project_input_to_floor?: ProjectInputToFloor;
iterations: Iterations;
scatter_chance?: ScatterChance;
coordinate_eval_order?: CoordinateEvalOrder;
x?: X;
y?: X1;
z?: X2;
}
/**
* `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.
* Succeeds if: The number of valid positions is equal to the value specified by `required_successes`.
* Fails if: The number of valid positions is less than the value specified by `required_successes`.
*/
interface SearchFeature {
description: Description;
places_feature?: PlacesFeature1;
search_volume?: PlacesFeature2;
search_axis: SearchAxis;
required_successes?: RequiredSuccesses;
}
/**
* Axis-aligned bounding box that will be searched for valid placement positions. Expressed as offsets from the input position.
*/
interface PlacesFeature2 {
max: Max8;
min: Min8;
}
/**
* `minecraft:sequence_feature` places a collection of features sequentially, in the order they appear in data. The output position of the previous feature is used as the input position for the next. For example, a tree feature is placed at (0, 0, 0) and places blocks up to (0, 10, 0). The next feature in the sequence begins at (0, 10, 0).
* Succeeds if: All features in the sequence are successfully placed.
* Fails if: Any feature in the sequence fails to be placed. Features that have not yet been placed at the time of failure are skipped.
*/
interface SequenceFeature {
description: Description;
features: Features1;
}
/**
* `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.
* Succeeds if: The block is successfully placed in the world.
* Fails if: The block fails to be placed.
*/
interface SingleBlockFeature {
description: Description;
places_block: BlockIdentifier2;
enforce_placement_rules: EnforcePlacementRules;
enforce_survivability_rules: EnforceSurvivabilityRules;
may_attach_to?: MayAttachTo;
may_replace?: MayReplace1;
}
/**
* The list of valid block and block faces the given block may attach to when being placed.
*/
interface MayAttachTo {
min_sides_must_attach?: MinimumSidesMustAttach;
auto_rotate?: AutoRotate;
top?: Top;
bottom?: Bottom;
north?: North;
south?: South;
east?: East;
west?: West;
all?: All;
sides?: Sides;
}
/**
* Minimum number of sides that must be attached when being placed.
*/
interface MinimumSidesMustAttach {
[k: string]: unknown;
}
/**
* `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.
* If the snap position goes outside of the placement biome, placement will fail.
*/
interface SnapToSurfaceFeature {
description: Description;
feature_to_snap: FeatureToSnap;
vertical_search_range: VerticalSearchRange;
surface?: Surface;
allow_air_placement?: AllowAirPlacement;
allow_underwater_placement?: AllowUnderwaterPlacement;
}
/**
* `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.
* Succeeds if: The structure is placed in the world.
* Fails if: The structure fails to be placed within the world.
*/
interface StructureTemplateFeature {
description: Description;
structure_name: StructureName;
adjustment_radius?: AdjustmentRadius;
facing_direction?: FacingDirection;
/**
* Specific constraints that must be satisfied when placing this structure.
*/
constraints: {
grounded?: Grounded;
unburied?: Unburied;
block_intersection?: Unburied1;
};
}
/**
* When specified, ensures the structure is on the ground.
*/
interface Grounded {
}
/**
* When specified, ensures the structure has air above it.
*/
interface Unburied {
}
/**
* When specified, ensures the structure has air ab