Minecraft:Structure set: Difference between revisions
More actions
Sync: updated from Minecraft |
Sync: updated from Minecraft |
||
| (One intermediate revision by the same user not shown) | |||
| Line 18: | Line 18: | ||
****{{nbt|float|spacing}}: Size in chunks of the grid space used to place the structure | ****{{nbt|float|spacing}}: Size in chunks of the grid space used to place the structure | ||
****{{nbt|float|separation}}: Padding between placements of set placements. | ****{{nbt|float|separation}}: Padding between placements of set placements. | ||
****{{nbt|string|spread_type}}: Algorithm used when placing structures. Can be <code>linear</code>. | ****{{nbt|string|spread_type}}: Algorithm used when placing structures. Can be <code>linear</code> or <code>triangular</code>. | ||
***{{nbt|list|structures}}: Weighted list of structures that can be placed. | ***{{nbt|list|structures}}: Weighted list of structures that can be placed. | ||
****{{nbt|compound}}: A structure to be placed. | ****{{nbt|compound}}: A structure to be placed. | ||
| Line 39: | Line 39: | ||
=== concentric_rings === | === concentric_rings === | ||
{{exclusive|java|section=1}} | {{exclusive|java|section=1}} | ||
[[File:Strongholds 1.9.svg|300px|thumb|right| | [[File:Strongholds 1.9.svg|300px|thumb|right|Concentric rings, used in [[stronghold]]s]] | ||
A fixed number of structures are placed in concentric rings around the origin of the world. In vanilla, this placement is only used for [[Minecraft:stronghold]]s. | A fixed number of structures are placed in concentric rings around the origin of the world. In vanilla, this placement is only used for [[Minecraft:stronghold]]s. | ||
Latest revision as of 11:12, 29 May 2026
A structure set is used to determine the position of structures in the world during world generation. They are configured using Minecraft:JSON files stored within a Minecraft:data pack in the path Template:Cd or an Minecraft:add-on in the path Template:Cd. Structure sets are not referenced in a dimension or biome. Instead, the existence of the resource is enough to make the structures generate. The valid biomes of a structure are determined by the structure itself (see Minecraft:Structure/JSON format).
The structure sets uses the Template:Nbt to determine the placement of structures. For any position a random structure is selected from the Template:Nbt list. If the selected structure can't be placed because its not in a valid biome, a different structure is selected.
JSON format
Template:El: Minecraft:Structure set/JSON format
- Template:Nbt
- Template:Nbt: The version of the game to run this file as. Can be a version above 1.21.20.
- Template:Nbt:
- Template:Nbt
- Template:Nbt: The identifier used for the structure set.
- Template:Nbt: How the structures should be placed.
- Template:Nbt: The type of spread. Can be
minecraft:random_spread. - Template:Nbt: A random 8 number sequence used for randomizing placement similarly to a world seed.
- Template:Nbt: Size in chunks of the grid space used to place the structure
- Template:Nbt: Padding between placements of set placements.
- Template:Nbt: Algorithm used when placing structures. Can be
linearortriangular.
- Template:Nbt: The type of spread. Can be
- Template:Nbt: Weighted list of structures that can be placed.
- Template:Nbt: A structure to be placed.
- Template:Nbt: A structure identifier.
- Template:Nbt: Determines the chance of it being chosen over others. Must be a positive integer.
- Template:Nbt: A structure to be placed.
- Template:Nbt
Placement types
The placement type determines how the structures are spread in a world. There are two placement types.
random_spread
Structures are spread evenly throughout the entire world. In vanilla, this placement type is used for most structures (like Minecraft:bastion remnants or Minecraft:swamp hutsTemplate:Only). Starting from chunk 0 0 and moving outwards Template:Nbt number of chunks, a grid of initial positions is created. After that the offset is applied to each position by X and Z separately based on the additional fields.
- additional fields:
- Template:Nbt: (optional, defaults to Template:Cd) One of Template:Cd or Template:Cd. Template:Cd sets offset to a random value between 0 and Template:Cd (inclusive). Template:Cd takes the sum of 2 random numbers between 0 and Template:Cd (inclusive) then divides that sum by 2, rounding down to nearest integer. This value results in less random offset, where values have a much higher chance to be closer to the middle of the distribution, than to the sides.
- Template:Nbt: Average distance between two neighboring generation attempts. Value between 0 and 4096 (inclusive).
- Template:Nbt: Minimum distance (in chunks) between two neighboring attempts. Value between 0 and 4096 (inclusive). Has to be strictly smaller than Template:Nbt. The maximum distance of two neighboring generation attempts is Template:Cd.
concentric_rings
A fixed number of structures are placed in concentric rings around the origin of the world. In vanilla, this placement is only used for Minecraft:strongholds.
- additional fields:
- Template:Nbt: The thickness of a ring plus the thickness of a gap between two rings. Ring and gap are equal in thickness. Value between 0 and 1023 (inclusive). Unit is 6 chunks
- Template:Nbt: The total number of generation attempts in this dimension. Value between 1 and 4095 (inclusive).
- Template:NbtTemplate:Nbt: Template:Json ref/biome — Biomes in which the structure is likely to be generated. After choosing the initial position of generation, a search in a square with a radius of 112 blocks begins. It proceeds from -X to +X, from -Z to +Z in 4×4 squares. When a position inside a biome from Template:NbtTemplate:Nbt is found, it is considered the new position. If multiple positions are found, one is chosen randomly. If no positions are found, the initial position is used.
- Template:Nbt: How many attempts are on the closest ring to spawn. Value between 0 and 1023 (inclusive). The number of attempts on the Nth ring is: Template:Cd, until the number of attempts reaches the total Template:Nbt.
Default structure sets
| Structure set | Structures | Template:Tooltip | Template:Tooltip | Salt | Notes |
|---|---|---|---|---|---|
ancient_cities
|
Template:EnvLink | 8 | 24 | 20083232 | |
buried_treasures
|
Template:EnvLink | 0 | 1 | 0 | Probability of 1%, locate_offset of x:9, y:0, z:9 |
desert_pyramids
|
Template:EnvLink | 8 | 32 | 14357617 | |
end_cities
|
Template:EnvLink | 11 | 20 | 10387313 | |
igloos
|
Template:EnvLink | 8 | 32 | 14357618 | |
jungle_temples
|
Template:EnvLink | 8 | 32 | 14357619 | |
mineshafts
|
Template:EnvLink Template:EnvLink |
0 | 1 | 0 | Probability of 0.4% |
nether_complexes
|
40% Template:EnvLink 60% Template:EnvLink |
4 | 27 | 30084232 | |
nether_fossils
|
Template:EnvLink | 1 | 2 | 14357921 | |
ocean_monuments
|
Template:EnvLink | 5 | 32 | 10387313 | Triangular spread type |
ocean_ruins
|
Template:EnvLink | 8 | 20 | 14357621 | |
pillager_outposts
|
Template:EnvLink | 8 | 32 | 165745296 | Probability of 20%, exclusion zone of 10 chunks from any village |
ruined_portals
|
Template:EnvLink | 15 | 40 | 34222645 | |
shipwrecks
|
Template:EnvLink | 4 | 24 | 165745295 | |
strongholds
|
Template:EnvLink | 0 | Concentric rings distance=32 count=128 spread=3 | ||
swamp_huts
|
Template:EnvLink | 8 | 32 | 14357620 | |
trail_ruins
|
Template:EnvLink | 8 | 34 | 83469867 | |
trial_chambers
|
Template:EnvLink | 12 | 34 | 94251327 | |
villages
|
Template:EnvLink Template:EnvLink Template:EnvLink Template:EnvLink Template:EnvLink |
8 | 34 | 10387312 | |
woodland_mansions
|
Template:EnvLink | 20 | 80 | 10387319 | Triangular spread type |
External links
Template:Navbox Java Edition technical
Minecraft:de:Konstruktionssammlung Minecraft:fr:Ensemble de structures Minecraft:pt:Conjunto de estruturas Minecraft:zh:结构集