搬运一批Bedrock wiki内容,完善翻译
This commit is contained in:
166
docs/wiki/world-generation/biome-tags.md
Normal file
166
docs/wiki/world-generation/biome-tags.md
Normal file
@@ -0,0 +1,166 @@
|
||||
---
|
||||
title: Biome Tags
|
||||
category: Documentation
|
||||
mentions:
|
||||
- MedicalJewel105
|
||||
---
|
||||
|
||||
This page was created with [Wiki Content Generator](https://github.com/Bedrock-OSS/bedrock-wiki-content-generator). If there are issues, contact us on [Bedrock OSS](https://discord.gg/XjV87YN) Discord server.
|
||||
*Last updated on 08 August 2023*
|
||||
|
||||
## Biome tag per Biome
|
||||
|
||||
| Biome | Biome Tags |
|
||||
| -------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
||||
| bamboo_jungle | animal, bamboo, jungle, monster, overworld |
|
||||
| bamboo_jungle_hills | animal, bamboo, hills, jungle, monster, overworld |
|
||||
| basalt_deltas | nether, basalt_deltas, spawn_many_magma_cubes, spawn_ghast |
|
||||
| beach | beach, monster, overworld, warm |
|
||||
| birch_forest | animal, birch, forest, monster, overworld, bee_habitat |
|
||||
| birch_forest_hills | animal, birch, forest, hills, monster, overworld, bee_habitat |
|
||||
| birch_forest_hills_mutated | animal, birch, forest, hills, monster, mutated, overworld_generation |
|
||||
| birch_forest_mutated | animal, birch, forest, monster, mutated, bee_habitat, overworld_generation |
|
||||
| cold_beach | beach, cold, monster, overworld |
|
||||
| cold_ocean | cold, monster, ocean, overworld |
|
||||
| cold_taiga | animal, cold, forest, monster, overworld, taiga |
|
||||
| cold_taiga_hills | animal, cold, forest, hills, monster, overworld, taiga |
|
||||
| cold_taiga_mutated | animal, cold, forest, monster, mutated, taiga, overworld_generation |
|
||||
| crimson_forest | nether, netherwart_forest, crimson_forest, spawn_few_zombified_piglins, spawn_piglin |
|
||||
| deep_cold_ocean | cold, deep, monster, ocean, overworld |
|
||||
| deep_frozen_ocean | deep, frozen, monster, ocean, overworld |
|
||||
| deep_lukewarm_ocean | deep, lukewarm, monster, ocean, overworld |
|
||||
| deep_ocean | deep, monster, ocean, overworld |
|
||||
| deep_warm_ocean | deep, monster, ocean, overworld, warm |
|
||||
| desert | desert, monster, overworld |
|
||||
| desert_hills | desert, hills, monster, overworld |
|
||||
| desert_mutated | desert, monster, mutated, overworld_generation |
|
||||
| dripstone_caves | caves, overworld, dripstone_caves, monster |
|
||||
| extreme_hills | animal, extreme_hills, monster, overworld |
|
||||
| extreme_hills_edge | animal, edge, extreme_hills, monster, mountain, overworld |
|
||||
| extreme_hills_mutated | animal, extreme_hills, monster, mutated, overworld |
|
||||
| extreme_hills_plus_trees | animal, extreme_hills, forest, monster, mountain, overworld |
|
||||
| extreme_hills_plus_trees_mutated | animal, extreme_hills, forest, monster, mutated, overworld |
|
||||
| flower_forest | flower_forest, monster, mutated, overworld, bee_habitat |
|
||||
| forest | animal, forest, monster, overworld, bee_habitat |
|
||||
| forest_hills | animal, hills, monster, overworld, forest, bee_habitat |
|
||||
| frozen_ocean | frozen, monster, ocean, overworld |
|
||||
| frozen_peaks | mountains, monster, overworld, frozen, frozen_peaks |
|
||||
| frozen_river | frozen, overworld, river |
|
||||
| grove | mountains, monster, overworld, grove |
|
||||
| hell | nether, nether_wastes, spawn_magma_cubes, spawn_zombified_piglin, spawn_few_piglins, spawn_ghast, spawn_endermen |
|
||||
| ice_mountains | frozen, ice, mountain, overworld |
|
||||
| ice_plains | frozen, ice, ice_plains, overworld |
|
||||
| ice_plains_spikes | frozen, ice_plains, monster, mutated, overworld |
|
||||
| jagged_peaks | mountains, monster, overworld, frozen, jagged_peaks |
|
||||
| jungle | animal, jungle, monster, overworld, rare |
|
||||
| jungle_edge | animal, edge, jungle, monster, overworld |
|
||||
| jungle_edge_mutated | animal, edge, jungle, monster, mutated, overworld_generation |
|
||||
| jungle_hills | animal, hills, jungle, monster, overworld |
|
||||
| jungle_mutated | animal, jungle, monster, mutated, overworld_generation |
|
||||
| legacy_frozen_ocean | frozen, ocean, overworld |
|
||||
| lukewarm_ocean | lukewarm, monster, ocean, overworld |
|
||||
| lush_caves | caves, lush_caves, overworld, monster |
|
||||
| meadow | mountains, monster, overworld, meadow, bee_habitat |
|
||||
| mega_taiga | animal, forest, mega, monster, overworld, rare, taiga |
|
||||
| mega_taiga_hills | animal, forest, hills, mega, monster, overworld, taiga |
|
||||
| mesa | mesa, monster, overworld |
|
||||
| mesa_bryce | animal, mesa, monster, mutated, overworld |
|
||||
| mesa_plateau | mesa, monster, overworld, plateau, rare |
|
||||
| mesa_plateau_mutated | mesa, monster, mutated, overworld, plateau, stone |
|
||||
| mesa_plateau_stone | mesa, monster, overworld, plateau, rare, stone |
|
||||
| mesa_plateau_stone_mutated | mesa, monster, mutated, overworld, plateau |
|
||||
| mushroom_island | mooshroom_island, overworld |
|
||||
| mushroom_island_shore | mooshroom_island, overworld, shore |
|
||||
| ocean | monster, ocean, overworld |
|
||||
| plains | animal, monster, overworld, plains, bee_habitat |
|
||||
| redwood_taiga_hills_mutated | animal, forest, hills, mega, monster, mutated, taiga, overworld_generation |
|
||||
| redwood_taiga_mutated | animal, forest, mega, monster, mutated, overworld, taiga |
|
||||
| river | overworld, river |
|
||||
| roofed_forest | animal, forest, monster, no_legacy_worldgen, overworld, roofed |
|
||||
| roofed_forest_mutated | animal, forest, monster, mutated, roofed, overworld_generation |
|
||||
| savanna | animal, monster, overworld, savanna |
|
||||
| savanna_mutated | animal, monster, mutated, overworld, savanna |
|
||||
| savanna_plateau | animal, monster, overworld, plateau, savanna |
|
||||
| savanna_plateau_mutated | animal, monster, mutated, overworld, plateau, savanna |
|
||||
| snowy_slopes | mountains, monster, overworld, snowy_slopes, frozen |
|
||||
| soulsand_valley | nether, soulsand_valley, spawn_ghast, spawn_endermen |
|
||||
| stone_beach | beach, monster, overworld, stone |
|
||||
| stony_peaks | mountains, monster, overworld |
|
||||
| sunflower_plains | animal, monster, mutated, overworld, plains, bee_habitat |
|
||||
| swampland | animal, monster, overworld, swamp |
|
||||
| swampland_mutated | animal, monster, mutated, swamp, overworld_generation |
|
||||
| taiga | animal, forest, monster, overworld, taiga |
|
||||
| taiga_hills | animal, forest, hills, monster, overworld, taiga |
|
||||
| taiga_mutated | animal, forest, monster, mutated, taiga, overworld_generation |
|
||||
| the_end | the_end |
|
||||
| warm_ocean | monster, ocean, overworld, warm |
|
||||
| warped_forest | nether, netherwart_forest, warped_forest, spawn_endermen |
|
||||
|
||||
## Biome per Biome Tag
|
||||
|
||||
| Biome Tag | Biomes |
|
||||
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| animal | bamboo_jungle, bamboo_jungle_hills, birch_forest, birch_forest_hills, birch_forest_hills_mutated, birch_forest_mutated, cold_taiga, cold_taiga_hills, cold_taiga_mutated, extreme_hills, extreme_hills_edge, extreme_hills_mutated, extreme_hills_plus_trees, extreme_hills_plus_trees_mutated, forest, forest_hills, jungle, jungle_edge, jungle_edge_mutated, jungle_hills, jungle_mutated, mega_taiga, mega_taiga_hills, mesa_bryce, plains, redwood_taiga_hills_mutated, redwood_taiga_mutated, roofed_forest, roofed_forest_mutated, savanna, savanna_mutated, savanna_plateau, savanna_plateau_mutated, sunflower_plains, swampland, swampland_mutated, taiga, taiga_hills, taiga_mutated |
|
||||
| bamboo | bamboo_jungle, bamboo_jungle_hills |
|
||||
| basalt_deltas | basalt_deltas |
|
||||
| beach | beach, cold_beach, stone_beach |
|
||||
| bee_habitat | birch_forest, birch_forest_hills, birch_forest_mutated, flower_forest, forest, forest_hills, meadow, plains, sunflower_plains |
|
||||
| birch | birch_forest, birch_forest_hills, birch_forest_hills_mutated, birch_forest_mutated |
|
||||
| caves | dripstone_caves, lush_caves |
|
||||
| cold | cold_beach, cold_ocean, cold_taiga, cold_taiga_hills, cold_taiga_mutated, deep_cold_ocean |
|
||||
| crimson_forest | crimson_forest |
|
||||
| deep | deep_cold_ocean, deep_frozen_ocean, deep_lukewarm_ocean, deep_ocean, deep_warm_ocean |
|
||||
| desert | desert, desert_hills, desert_mutated |
|
||||
| dripstone_caves | dripstone_caves |
|
||||
| edge | extreme_hills_edge, jungle_edge, jungle_edge_mutated |
|
||||
| extreme_hills | extreme_hills, extreme_hills_edge, extreme_hills_mutated, extreme_hills_plus_trees, extreme_hills_plus_trees_mutated |
|
||||
| flower_forest | flower_forest |
|
||||
| forest | birch_forest, birch_forest_hills, birch_forest_hills_mutated, birch_forest_mutated, cold_taiga, cold_taiga_hills, cold_taiga_mutated, extreme_hills_plus_trees, extreme_hills_plus_trees_mutated, forest, forest_hills, mega_taiga, mega_taiga_hills, redwood_taiga_hills_mutated, redwood_taiga_mutated, roofed_forest, roofed_forest_mutated, taiga, taiga_hills, taiga_mutated |
|
||||
| frozen | deep_frozen_ocean, frozen_ocean, frozen_peaks, frozen_river, ice_mountains, ice_plains, ice_plains_spikes, jagged_peaks, legacy_frozen_ocean, snowy_slopes |
|
||||
| frozen_peaks | frozen_peaks |
|
||||
| grove | grove |
|
||||
| hills | bamboo_jungle_hills, birch_forest_hills, birch_forest_hills_mutated, cold_taiga_hills, desert_hills, forest_hills, jungle_hills, mega_taiga_hills, redwood_taiga_hills_mutated, taiga_hills |
|
||||
| ice | ice_mountains, ice_plains |
|
||||
| ice_plains | ice_plains, ice_plains_spikes |
|
||||
| jagged_peaks | jagged_peaks |
|
||||
| jungle | bamboo_jungle, bamboo_jungle_hills, jungle, jungle_edge, jungle_edge_mutated, jungle_hills, jungle_mutated |
|
||||
| lukewarm | deep_lukewarm_ocean, lukewarm_ocean |
|
||||
| lush_caves | lush_caves |
|
||||
| meadow | meadow |
|
||||
| mega | mega_taiga, mega_taiga_hills, redwood_taiga_hills_mutated, redwood_taiga_mutated |
|
||||
| mesa | mesa, mesa_bryce, mesa_plateau, mesa_plateau_mutated, mesa_plateau_stone, mesa_plateau_stone_mutated |
|
||||
| monster | bamboo_jungle, bamboo_jungle_hills, beach, birch_forest, birch_forest_hills, birch_forest_hills_mutated, birch_forest_mutated, cold_beach, cold_ocean, cold_taiga, cold_taiga_hills, cold_taiga_mutated, deep_cold_ocean, deep_frozen_ocean, deep_lukewarm_ocean, deep_ocean, deep_warm_ocean, desert, desert_hills, desert_mutated, dripstone_caves, extreme_hills, extreme_hills_edge, extreme_hills_mutated, extreme_hills_plus_trees, extreme_hills_plus_trees_mutated, flower_forest, forest, forest_hills, frozen_ocean, frozen_peaks, grove, ice_plains_spikes, jagged_peaks, jungle, jungle_edge, jungle_edge_mutated, jungle_hills, jungle_mutated, lukewarm_ocean, lush_caves, meadow, mega_taiga, mega_taiga_hills, mesa, mesa_bryce, mesa_plateau, mesa_plateau_mutated, mesa_plateau_stone, mesa_plateau_stone_mutated, ocean, plains, redwood_taiga_hills_mutated, redwood_taiga_mutated, roofed_forest, roofed_forest_mutated, savanna, savanna_mutated, savanna_plateau, savanna_plateau_mutated, snowy_slopes, stone_beach, stony_peaks, sunflower_plains, swampland, swampland_mutated, taiga, taiga_hills, taiga_mutated, warm_ocean |
|
||||
| mooshroom_island | mushroom_island, mushroom_island_shore |
|
||||
| mountain | extreme_hills_edge, extreme_hills_plus_trees, ice_mountains |
|
||||
| mountains | frozen_peaks, grove, jagged_peaks, meadow, snowy_slopes, stony_peaks |
|
||||
| mutated | birch_forest_hills_mutated, birch_forest_mutated, cold_taiga_mutated, desert_mutated, extreme_hills_mutated, extreme_hills_plus_trees_mutated, flower_forest, ice_plains_spikes, jungle_edge_mutated, jungle_mutated, mesa_bryce, mesa_plateau_mutated, mesa_plateau_stone_mutated, redwood_taiga_hills_mutated, redwood_taiga_mutated, roofed_forest_mutated, savanna_mutated, savanna_plateau_mutated, sunflower_plains, swampland_mutated, taiga_mutated |
|
||||
| nether | basalt_deltas, crimson_forest, hell, soulsand_valley, warped_forest |
|
||||
| nether_wastes | hell |
|
||||
| netherwart_forest | crimson_forest, warped_forest |
|
||||
| no_legacy_worldgen | roofed_forest |
|
||||
| ocean | cold_ocean, deep_cold_ocean, deep_frozen_ocean, deep_lukewarm_ocean, deep_ocean, deep_warm_ocean, frozen_ocean, legacy_frozen_ocean, lukewarm_ocean, ocean, warm_ocean |
|
||||
| overworld | bamboo_jungle, bamboo_jungle_hills, beach, birch_forest, birch_forest_hills, cold_beach, cold_ocean, cold_taiga, cold_taiga_hills, deep_cold_ocean, deep_frozen_ocean, deep_lukewarm_ocean, deep_ocean, deep_warm_ocean, desert, desert_hills, dripstone_caves, extreme_hills, extreme_hills_edge, extreme_hills_mutated, extreme_hills_plus_trees, extreme_hills_plus_trees_mutated, flower_forest, forest, forest_hills, frozen_ocean, frozen_peaks, frozen_river, grove, ice_mountains, ice_plains, ice_plains_spikes, jagged_peaks, jungle, jungle_edge, jungle_hills, legacy_frozen_ocean, lukewarm_ocean, lush_caves, meadow, mega_taiga, mega_taiga_hills, mesa, mesa_bryce, mesa_plateau, mesa_plateau_mutated, mesa_plateau_stone, mesa_plateau_stone_mutated, mushroom_island, mushroom_island_shore, ocean, plains, redwood_taiga_mutated, river, roofed_forest, savanna, savanna_mutated, savanna_plateau, savanna_plateau_mutated, snowy_slopes, stone_beach, stony_peaks, sunflower_plains, swampland, taiga, taiga_hills, warm_ocean |
|
||||
| overworld_generation | birch_forest_hills_mutated, birch_forest_mutated, cold_taiga_mutated, desert_mutated, jungle_edge_mutated, jungle_mutated, redwood_taiga_hills_mutated, roofed_forest_mutated, swampland_mutated, taiga_mutated |
|
||||
| plains | plains, sunflower_plains |
|
||||
| plateau | mesa_plateau, mesa_plateau_mutated, mesa_plateau_stone, mesa_plateau_stone_mutated, savanna_plateau, savanna_plateau_mutated |
|
||||
| rare | jungle, mega_taiga, mesa_plateau, mesa_plateau_stone |
|
||||
| river | frozen_river, river |
|
||||
| roofed | roofed_forest, roofed_forest_mutated |
|
||||
| savanna | savanna, savanna_mutated, savanna_plateau, savanna_plateau_mutated |
|
||||
| shore | mushroom_island_shore |
|
||||
| snowy_slopes | snowy_slopes |
|
||||
| soulsand_valley | soulsand_valley |
|
||||
| spawn_endermen | hell, soulsand_valley, warped_forest |
|
||||
| spawn_few_piglins | hell |
|
||||
| spawn_few_zombified_piglins | crimson_forest |
|
||||
| spawn_ghast | basalt_deltas, hell, soulsand_valley |
|
||||
| spawn_magma_cubes | hell |
|
||||
| spawn_many_magma_cubes | basalt_deltas |
|
||||
| spawn_piglin | crimson_forest |
|
||||
| spawn_zombified_piglin | hell |
|
||||
| stone | mesa_plateau_mutated, mesa_plateau_stone, stone_beach |
|
||||
| swamp | swampland, swampland_mutated |
|
||||
| taiga | cold_taiga, cold_taiga_hills, cold_taiga_mutated, mega_taiga, mega_taiga_hills, redwood_taiga_hills_mutated, redwood_taiga_mutated, taiga, taiga_hills, taiga_mutated |
|
||||
| the_end | the_end |
|
||||
| warm | beach, deep_warm_ocean, warm_ocean |
|
||||
| warped_forest | warped_forest |
|
||||
1876
docs/wiki/world-generation/biomes.md
Normal file
1876
docs/wiki/world-generation/biomes.md
Normal file
File diff suppressed because it is too large
Load Diff
116
docs/wiki/world-generation/custom-ores.md
Normal file
116
docs/wiki/world-generation/custom-ores.md
Normal file
@@ -0,0 +1,116 @@
|
||||
---
|
||||
title: Generating Custom Ores
|
||||
category: Tutorials
|
||||
tags:
|
||||
- experimental
|
||||
mentions:
|
||||
- DerpMcaddon
|
||||
- SirLich
|
||||
- 7dev7urandom
|
||||
- Chikorita-Lover
|
||||
---
|
||||
|
||||
`ore_feature`'s are basic but important features! They can form clusters of blocks by replacing blocks where they are generated. This tutorial will show you how to make mineral ores that naturally generate.
|
||||
|
||||
The use of features and feature rules requires Creation of Custom Biomes to be enabled in your world settings. If your block doesn't generate, make sure it's enabled!
|
||||
|
||||
:::tip
|
||||
For this tutorial, I'll be using 2 custom blocks, Titanite Ore and Deepslate Titanite Ore. For how to make custom blocks, visit the [Blocks Intro](/blocks/blocks-intro) page.
|
||||
:::
|
||||
|
||||
## The Feature File
|
||||
|
||||
<CodeHeader>BP/features/titanite_ore_feature.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.17.0",
|
||||
"minecraft:ore_feature": {
|
||||
"description": {
|
||||
"identifier": "wiki:titanite_ore_feature"
|
||||
},
|
||||
"count": 8, // Placement attempts
|
||||
"replace_rules": [
|
||||
{
|
||||
// Replace all stone variants (andesite, granite, and diorite) with titanite ore
|
||||
"places_block": "wiki:titanite_ore",
|
||||
"may_replace": ["minecraft:stone"]
|
||||
},
|
||||
{
|
||||
// Replace deepslate with deepslate titanite ore
|
||||
"places_block": "wiki:deepslate_titanite_ore",
|
||||
"may_replace": ["minecraft:deepslate"]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## The Feature Rule
|
||||
|
||||
<CodeHeader>BP/feature_rules/overworld_underground_titanite_ore_feature.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.13.0",
|
||||
"minecraft:feature_rules": {
|
||||
"description": {
|
||||
"identifier": "wiki:overworld_underground_titanite_ore_feature",
|
||||
"places_feature": "wiki:titanite_ore_feature" // Identifier from the feature file
|
||||
},
|
||||
"conditions": {
|
||||
"placement_pass": "underground_pass",
|
||||
"minecraft:biome_filter": [
|
||||
// Scatter the ore throughout the Overworld
|
||||
{
|
||||
"any_of": [
|
||||
{
|
||||
"test": "has_biome_tag",
|
||||
"operator": "==",
|
||||
"value": "overworld"
|
||||
},
|
||||
{
|
||||
"test": "has_biome_tag",
|
||||
"operator": "==",
|
||||
"value": "overworld_generation"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"distribution": {
|
||||
"iterations": 10, // Placement attempts of the cluster, not the ore blocks
|
||||
"coordinate_eval_order": "zyx",
|
||||
"x": {
|
||||
"distribution": "uniform",
|
||||
"extent": [0, 16]
|
||||
},
|
||||
"y": {
|
||||
"distribution": "uniform", // You can use "triangle" to make ores more common in the middle of the extent
|
||||
"extent": [
|
||||
0, // Minimum y level for the ore to generate
|
||||
62 // Maximum y level for the ore to generate
|
||||
]
|
||||
},
|
||||
"z": {
|
||||
"distribution": "uniform",
|
||||
"extent": [0, 16]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
You can look for the ore by exploring caves, but if your ores are rare, you can use commands instead to check if they're generating. Simply place this command into a repeating command block, then fly around:
|
||||
|
||||
- `execute @a ~ ~ ~ fill ~8 ~8 ~8 ~-8 ~-8 ~-8 air 0 replace wiki:titanite_ore`
|
||||
|
||||
Stone ores:
|
||||
|
||||

|
||||
|
||||
Deepslate ores:
|
||||
|
||||

|
||||
182
docs/wiki/world-generation/feature-block-conditions.md
Normal file
182
docs/wiki/world-generation/feature-block-conditions.md
Normal file
@@ -0,0 +1,182 @@
|
||||
---
|
||||
title: Block Conditions for Features
|
||||
category: Tutorials
|
||||
tags:
|
||||
- experimental
|
||||
mentions:
|
||||
- PavelDobCZ23
|
||||
- SmokeyStack
|
||||
- ThomasOrs
|
||||
---
|
||||
|
||||
Sometimes you might need to place any feature conditionally depending on what blocks are below or above it for example. Not many features have the option to conditionally place them like so, but with a simple trick we can use it on anything we want.
|
||||
|
||||
:::tip
|
||||
This technique utilizes `aggregate_feature` and `single_block_feature` features. If you want to learn more about those, visit [Feature Types](/world-generation/feature-types) article.
|
||||
:::
|
||||
|
||||
## Files
|
||||
|
||||
### Features
|
||||
|
||||
This feature places a `single_block_feature` which can be specified with the conditions we need for some other feature. The block can be kept there if it doesn't interrupt your desired features, but we will replace it with air in the next feature so that it doesn't cause any issues later on. This feature acts as a "dummy" feature because we only want its condition part but we don't need it to actually place anything.
|
||||
|
||||
<CodeHeader>BP/features/block_condition_feature.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.18.0",
|
||||
"minecraft:single_block_feature": {
|
||||
"description": {
|
||||
"identifier": "wiki:block_condition_feature"
|
||||
},
|
||||
"places_block": "minecraft:cobblestone", //Any block that isn't in "may_replace" list.
|
||||
"enforce_placement_rules": false,
|
||||
"enforce_survivability_rules": false,
|
||||
"may_replace": ["minecraft:air"], //Only blocks the feature is allowed to be placed in.
|
||||
"may_attach_to": { //Attachment conditions - what blocks can surround the feature when its being placed
|
||||
"bottom": ["minecraft:grass"] //Only blocks the feature can be placed on top of.
|
||||
}
|
||||
}
|
||||
}
|
||||
//This "dummy" feature will only allow the feature to generate in the air, right above a grass block.
|
||||
```
|
||||
|
||||
This next feature is the one that is going to replace the cobblestone with the original air block that was there, however it can be omitted if you choose a block you actually want there or if it won't cause you any issues later.
|
||||
|
||||
<CodeHeader>BP/features/block_replacement_feature.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.18.0",
|
||||
"minecraft:single_block_feature": {
|
||||
"description": {
|
||||
"identifier": "wiki:block_replacement_feature"
|
||||
},
|
||||
"places_block": "minecraft:air", //Replaces the block with another one which doesn't cause us any issue.
|
||||
"enforce_placement_rules": false,
|
||||
"enforce_survivability_rules": false,
|
||||
"may_replace": ["minecraft:cobblestone"] //The block that we specified in the previous feature.
|
||||
}
|
||||
}
|
||||
//This feature will replace the block with air that originally was there so it won't cause us any issue.
|
||||
```
|
||||
|
||||
This is a feature that places the condition "dummy" feature, the feature that gets rid of the "dummy" block placed by the condition and after that the actual features we want to conditionally place. It uses `early_out` with value `first_failure` to make the aggregate stop if the conditional placement fails. It is the feature placed by a feature rule.
|
||||
|
||||
<CodeHeader>BP/features/aggregate_placement_rock_feature.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.18.0",
|
||||
"minecraft:aggregate_feature": {
|
||||
"description": {
|
||||
"identifier": "wiki:aggregate_placement_rock_feature"
|
||||
},
|
||||
"features": [
|
||||
"wiki:block_condition_feature", //Single block feature that is used as "dummy" feature to act as our condition.
|
||||
"wiki:block_replacement_feature", //This feature replaces the "dummy" block we used in the feature above to not cause us any issues later.
|
||||
//Any feature from this point on is what we actually want to place.
|
||||
"wiki:rock_ore_feature"
|
||||
],
|
||||
"early_out": "first_failure" //This makes sure that if the first(or any) feature fails, it will not continue to place anything else in the list.
|
||||
}
|
||||
}
|
||||
//This is a feature that places all the features one by one in order and is placed by the feature rule.
|
||||
```
|
||||
|
||||
This is the actual feature we want to be conditionally placed. It is `ore_feature` which doesn't have actual condition for us to allow it to only be placed in air and on a grass block, so this technique has helped us achieve that.
|
||||
|
||||
<CodeHeader>BP/features/rock_ore_feature.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.18.0",
|
||||
"minecraft:ore_feature": {
|
||||
"description": {
|
||||
"identifier": "wiki:rock_ore_feature"
|
||||
},
|
||||
"count": 12,
|
||||
"replace_rules": [
|
||||
{
|
||||
"places_block": "minecraft:stone",
|
||||
"may_replace": ["minecraft:air","minecraft:grass"]
|
||||
},
|
||||
{
|
||||
"places_block": {
|
||||
"name": "minecraft:dirt",
|
||||
"states": {
|
||||
"dirt_type": "coarse"
|
||||
}
|
||||
},
|
||||
"may_replace": ["minecraft:dirt"]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
:::tip
|
||||
If you want to learn more about ore features, you can visit [Generating Custom Ores](/world-generation/custom-ores) tutorial.
|
||||
:::
|
||||
|
||||
### Feature Rule
|
||||
|
||||
<CodeHeader>BP/feature_rules/overworld_after_surface_rock_feature.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.18.0",
|
||||
"minecraft:feature_rules": {
|
||||
"description": {
|
||||
"identifier": "wiki:overworld_after_surface_rock_feature",
|
||||
"places_feature": "wiki:aggregate_placement_rock_feature"
|
||||
},
|
||||
"conditions": {
|
||||
//Places the feature in any overworld biome along with features in the after_surface_pass
|
||||
"placement_pass": "after_surface_pass",
|
||||
"minecraft:biome_filter": [
|
||||
{
|
||||
"any_of": [
|
||||
{
|
||||
"test": "has_biome_tag",
|
||||
"operator": "==",
|
||||
"value": "overworld"
|
||||
},
|
||||
{
|
||||
"test": "has_biome_tag",
|
||||
"operator": "==",
|
||||
"value": "overworld_generation"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"distribution": {
|
||||
//1 in 3 chance to attempt 1 placement in chunk
|
||||
"scatter_chance": 33,
|
||||
"iterations": 1,
|
||||
"coordinate_eval_order": "xzy",
|
||||
"x": {
|
||||
"distribution": "uniform",
|
||||
"extent": [0, 15]
|
||||
},
|
||||
//Places the feature along the heightmap
|
||||
"y": "q.heightmap(v.worldx,v.worldz)",
|
||||
"z": {
|
||||
"distribution": "uniform",
|
||||
"extent": [0, 15]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Summary
|
||||
|
||||
After reading this tutorial you should be able to use block conditions on any feature you want. This was a very basic example as this can be used for far more complex creations and can be used with any feature.
|
||||
|
||||
Like that we have made a rock feature that can only be placed in air blocks and above grass blocks.
|
||||
|
||||
Generation screenshot:
|
||||
|
||||

|
||||
1724
docs/wiki/world-generation/feature-types.md
Normal file
1724
docs/wiki/world-generation/feature-types.md
Normal file
File diff suppressed because it is too large
Load Diff
116
docs/wiki/world-generation/heightmap-noise.md
Normal file
116
docs/wiki/world-generation/heightmap-noise.md
Normal file
@@ -0,0 +1,116 @@
|
||||
---
|
||||
title: Heightmap Noise
|
||||
category: Tutorials
|
||||
tags:
|
||||
- experimental
|
||||
- tutorial
|
||||
mentions:
|
||||
- Apex360
|
||||
- SirLich
|
||||
---
|
||||
|
||||
:::tip
|
||||
This tutorial assumes you have a basic understanding of molang, features and feature rules.
|
||||
:::
|
||||
|
||||
In this tutorial we're gonna see how we can make noise based terrain using the `q.noise` molang query.
|
||||
|
||||
## Single Block Feature
|
||||
|
||||
First we will define the single block feature. It will define the block that is going to be generated. For this tutorial I'll use stone.
|
||||
|
||||
<CodeHeader>BP/features/stone_feature.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.13.0",
|
||||
"minecraft:single_block_feature": {
|
||||
"description": {
|
||||
"identifier": "wiki:stone_feature"
|
||||
},
|
||||
"places_block": "minecraft:stone",
|
||||
"enforce_survivability_rules": false,
|
||||
"enforce_placement_rules": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Scatter Feature
|
||||
|
||||
The scatter feature is the main feature which we'll be using to generate the terrain.
|
||||
|
||||
<CodeHeader>BP/features/column.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.13.0",
|
||||
"minecraft:scatter_feature": {
|
||||
"description": {
|
||||
"identifier": "wiki:column"
|
||||
},
|
||||
"iterations": "t.height=64+(q.noise(v.originz/64,v.originx/64))*16; return t.height;",
|
||||
"places_feature": "wiki:stone_feature",
|
||||
"x": 0,
|
||||
"z": 0,
|
||||
"y": {
|
||||
"extent": [-64, "t.height"],
|
||||
"distribution": "fixed_grid"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Let me explain whats happening in the `iterations`:
|
||||
In the iterations we've defined a temp `t.height` in which we've defined our main noise function.
|
||||
In `t.height` the value that we're adding first is the base height, basically the height at which the function starts.
|
||||
After that we're querying perlin using the `q.noise` query which returns values ranging from -1 to 1 and dividing that by a value which smooths out the function.
|
||||
Then we're multiplying the whole function by a value which in simple words is basically the variation in the terrain.
|
||||
|
||||
So what's happening here is that we are getting values from the `t.height` temp and assigning them to the y extent ranging from -64 to the value thus generating a column. Now this value is going to vary column by column but not in a random way as `q.noise` queryies Perlin noise, meaning the values are relative to each other. So instead of getting values like 64,69,45,100,7,56 we are getting values like 64,65,66,68,69,68,66,65 and so on.
|
||||
|
||||
## Feature Rule
|
||||
|
||||
<CodeHeader>BP/feature_rules/column_grid_placement.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.13.0",
|
||||
"minecraft:feature_rules": {
|
||||
"description": {
|
||||
"identifier": "wiki:column_grid_placement",
|
||||
"places_feature": "wiki:column"
|
||||
},
|
||||
"conditions": {
|
||||
"placement_pass": "first_pass",
|
||||
"minecraft:biome_filter": {
|
||||
"any_of": [
|
||||
{
|
||||
"test": "has_biome_tag",
|
||||
"value": "overworld"
|
||||
},
|
||||
{
|
||||
"test": "has_biome_tag",
|
||||
"value": "overworld_generation"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"distribution": {
|
||||
"iterations": 256,
|
||||
"x": {
|
||||
"extent": [0, 15],
|
||||
"distribution": "fixed_grid"
|
||||
},
|
||||
"y": 0,
|
||||
"z": {
|
||||
"extent": [0, 15],
|
||||
"distribution": "fixed_grid"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
In this we have set the `iteration` to 256 as the area of a whole chunk is 256 (16x16) to make the columns generate in the whole chunk.
|
||||
|
||||
And our custom noise based terrain is finished! Feel free to mess with the values.
|
||||
10
docs/wiki/world-generation/index.md
Normal file
10
docs/wiki/world-generation/index.md
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
title: World Generation
|
||||
categories:
|
||||
- title: General
|
||||
color: blue
|
||||
- title: Tutorials
|
||||
color: green
|
||||
- title: Documentation
|
||||
color: red
|
||||
---
|
||||
393
docs/wiki/world-generation/structure-features.md
Normal file
393
docs/wiki/world-generation/structure-features.md
Normal file
@@ -0,0 +1,393 @@
|
||||
---
|
||||
title: Generating Custom Structures
|
||||
category: Tutorials
|
||||
mentions:
|
||||
- DerpMcaddon
|
||||
- SirLich
|
||||
tags:
|
||||
- experimental
|
||||
---
|
||||
|
||||
Structure feature is one of the most basic feature. It places exported `.mcstructure` file in the world.
|
||||
This tutorial will show you how to make:
|
||||
|
||||
- Surface structure,
|
||||
|
||||
- Underground structure,
|
||||
|
||||
- Floating structure,
|
||||
|
||||
- Underwater structure, and
|
||||
|
||||
- Water surface structure
|
||||
|
||||
:::tip
|
||||
For exporting structure on android devices, use this [resource pack](https://mcpedl.com/export-structure-button-android-addon/)
|
||||
:::
|
||||
|
||||
Make sure you put the `.mcstructure` file inside of `BP/structures/`!
|
||||
|
||||
## Surface Structure
|
||||
|
||||
### Feature File
|
||||
|
||||
<CodeHeader>BP/features/house_feature.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.13.0",
|
||||
"minecraft:structure_template_feature": {
|
||||
"description": {
|
||||
"identifier": "wiki:house_feature"
|
||||
},
|
||||
"structure_name": "mystructure:house",
|
||||
"adjustment_radius": 4,
|
||||
"facing_direction": "random",
|
||||
"constraints": {
|
||||
"grounded": {},
|
||||
"unburied": {},
|
||||
"block_intersection": {
|
||||
"block_allowlist": [
|
||||
"minecraft:air" //The structure can only replace air
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Feature Rule
|
||||
|
||||
<CodeHeader>BP/feature_rules/plains_house_feature.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.13.0",
|
||||
"minecraft:feature_rules": {
|
||||
"description": {
|
||||
"identifier": "wiki:plains_house_feature",
|
||||
"places_feature": "wiki:house_feature"
|
||||
},
|
||||
"conditions": {
|
||||
"placement_pass": "first_pass",
|
||||
"minecraft:biome_filter": {
|
||||
"test": "has_biome_tag",
|
||||
"operator": "==",
|
||||
"value": "plains"
|
||||
}
|
||||
},
|
||||
"distribution": {
|
||||
"iterations": 1,
|
||||
"x": {
|
||||
"extent": [0, 16],
|
||||
"distribution": "uniform"
|
||||
},
|
||||
"y": "q.heightmap(v.worldx, v.worldz)", //Generates the feature on the highest block on the column
|
||||
"z": {
|
||||
"extent": [0, 16],
|
||||
"distribution": "uniform"
|
||||
},
|
||||
"scatter_chance": {
|
||||
"numerator": 1,
|
||||
"denominator": 25
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
|
||||
## Underground Structure
|
||||
|
||||
### Feature File
|
||||
|
||||
<CodeHeader>BP/features/bunker_feature.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.13.0",
|
||||
"minecraft:structure_template_feature": {
|
||||
"description": {
|
||||
"identifier": "wiki:bunker_feature"
|
||||
},
|
||||
"structure_name": "mystructure:bunker",
|
||||
"adjustment_radius": 4,
|
||||
"facing_direction": "random",
|
||||
"constraints": {
|
||||
"block_intersection": {
|
||||
"block_allowlist": [
|
||||
"minecraft:air", //Makes the feature only replace air and stone
|
||||
"minecraft:stone"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Feature Rule
|
||||
|
||||
<CodeHeader>BP/feature_rules/overworld_bunker_feature.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.13.0",
|
||||
"minecraft:feature_rules": {
|
||||
"description": {
|
||||
"identifier": "wiki:overworld_bunker_feature",
|
||||
"places_feature": "wiki:bunker_feature"
|
||||
},
|
||||
"conditions": {
|
||||
"placement_pass": "first_pass",
|
||||
"minecraft:biome_filter": {
|
||||
"test": "has_biome_tag",
|
||||
"operator": "==",
|
||||
"value": "overworld"
|
||||
}
|
||||
},
|
||||
"distribution": {
|
||||
"iterations": 1,
|
||||
"x": {
|
||||
"extent": [0, 16],
|
||||
"distribution": "uniform"
|
||||
},
|
||||
"y": {
|
||||
"extent": [
|
||||
11,
|
||||
50 //Makes the structure generate between y11 and y50
|
||||
],
|
||||
"distribution": "uniform"
|
||||
},
|
||||
"z": {
|
||||
"extent": [0, 16],
|
||||
"distribution": "uniform"
|
||||
},
|
||||
"scatter_chance": {
|
||||
"numerator": 1,
|
||||
"denominator": 15
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
|
||||
## Floating Feature
|
||||
|
||||
### Feature File
|
||||
|
||||
<CodeHeader>BP/features/balloon_feature.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.13.0",
|
||||
"minecraft:structure_template_feature": {
|
||||
"description": {
|
||||
"identifier": "wiki:balloon_feature"
|
||||
},
|
||||
"structure_name": "mystructure:balloon",
|
||||
"adjustment_radius": 4,
|
||||
"facing_direction": "random",
|
||||
"constraints": {
|
||||
"block_intersection": {
|
||||
"block_allowlist": [
|
||||
"minecraft:air" //Makes the structure only replace air
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Feature Rule
|
||||
|
||||
<CodeHeader>BP/feature_rules/overworld_balloon_feature.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.13.0",
|
||||
"minecraft:feature_rules": {
|
||||
"description": {
|
||||
"identifier": "wiki:overworld_baloon_feature",
|
||||
"places_feature": "wiki:balloon_feature"
|
||||
},
|
||||
"conditions": {
|
||||
"placement_pass": "first_pass",
|
||||
"minecraft:biome_filter": {
|
||||
"test": "has_biome_tag",
|
||||
"operator": "==",
|
||||
"value": "overworld"
|
||||
}
|
||||
},
|
||||
"distribution": {
|
||||
"iterations": 1,
|
||||
"x": {
|
||||
"extent": [0, 16],
|
||||
"distribution": "uniform"
|
||||
},
|
||||
"y": {
|
||||
"extent": [
|
||||
100, //Makes the structure generate from y100 to y200
|
||||
200
|
||||
],
|
||||
"distribution": "uniform"
|
||||
},
|
||||
"z": {
|
||||
"extent": [0, 16],
|
||||
"distribution": "uniform"
|
||||
},
|
||||
"scatter_chance": {
|
||||
"numerator": 1,
|
||||
"denominator": 25
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
|
||||
## Underwater Structure
|
||||
|
||||
::: tip
|
||||
For underwater structures, make sure you waterlogged the structure, because Minecraft won't waterlog them automatically!
|
||||
:::
|
||||
|
||||
### Feature File
|
||||
|
||||
<CodeHeader>BP/features/aqua_temple_feature.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.13.0",
|
||||
"minecraft:structure_template_feature": {
|
||||
"description": {
|
||||
"identifier": "wiki:aqua_temple_feature"
|
||||
},
|
||||
"structure_name": "mystructure:aqua_temple",
|
||||
"adjustment_radius": 4,
|
||||
"facing_direction": "random",
|
||||
"constraints": {
|
||||
"block_intersection": {
|
||||
"block_allowlist": [
|
||||
"minecraft:water" //Makes the structure only replace water
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Feature Rule
|
||||
|
||||
<CodeHeader>BP/feature_rules/ocean_aqua_temple_feature.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.13.0",
|
||||
"minecraft:feature_rules": {
|
||||
"description": {
|
||||
"identifier": "wiki:ocean_aqua_temple_feature",
|
||||
"places_feature": "wiki:aqua_temple_feature"
|
||||
},
|
||||
"conditions": {
|
||||
"placement_pass": "first_pass",
|
||||
"minecraft:biome_filter": {
|
||||
"test": "has_biome_tag",
|
||||
"operator": "==",
|
||||
"value": "ocean"
|
||||
}
|
||||
},
|
||||
"distribution": {
|
||||
"iterations": 1,
|
||||
"x": {
|
||||
"extent": [0, 16],
|
||||
"distribution": "uniform"
|
||||
},
|
||||
"y": "q.above_top_solid(v.worldx, v.worldz)", //Places the feature on top of the highest solid block on the column, so it won't place it on the surface of the water
|
||||
"z": {
|
||||
"extent": [0, 16],
|
||||
"distribution": "uniform"
|
||||
},
|
||||
"scatter_chance": {
|
||||
"numerator": 1,
|
||||
"denominator": 25
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
|
||||
## Water Surface Structure
|
||||
|
||||
### Feature File
|
||||
|
||||
<CodeHeader>BP/features/raft_feature.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.13.0",
|
||||
"minecraft:structure_template_feature": {
|
||||
"description": {
|
||||
"identifier": "wiki:raft_feature"
|
||||
},
|
||||
"structure_name": "mystructure:raft",
|
||||
"adjustment_radius": 4,
|
||||
"facing_direction": "random",
|
||||
"constraints": {
|
||||
"block_intersection": {
|
||||
"block_allowlist": [
|
||||
"minecraft:water", //Makes the structure only replace air and water
|
||||
"minecraft:air"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Feature Rule
|
||||
|
||||
<CodeHeader>BP/feature_rules/ocean_raft_feature.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.13.0",
|
||||
"minecraft:feature_rules": {
|
||||
"description": {
|
||||
"identifier": "wiki:ocean_raft_feature",
|
||||
"places_feature": "wiki:raft_feature"
|
||||
},
|
||||
"conditions": {
|
||||
"placement_pass": "first_pass",
|
||||
"minecraft:biome_filter": {
|
||||
"test": "has_biome_tag",
|
||||
"operator": "==",
|
||||
"value": "ocean"
|
||||
}
|
||||
},
|
||||
"distribution": {
|
||||
"iterations": 1,
|
||||
"x": {
|
||||
"extent": [0, 16],
|
||||
"distribution": "uniform"
|
||||
},
|
||||
"y": 62, //Makes the feature generate only on y62, which is Minecraft water level
|
||||
"z": {
|
||||
"extent": [0, 16],
|
||||
"distribution": "uniform"
|
||||
},
|
||||
"scatter_chance": {
|
||||
"numerator": 1,
|
||||
"denominator": 25
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
202
docs/wiki/world-generation/surface-builder.md
Normal file
202
docs/wiki/world-generation/surface-builder.md
Normal file
@@ -0,0 +1,202 @@
|
||||
---
|
||||
title: Generating Patches
|
||||
category: Tutorials
|
||||
mentions:
|
||||
- DerpMcaddon
|
||||
- SirLich
|
||||
tags:
|
||||
- experimental
|
||||
---
|
||||
|
||||
Feature based surface builder is a feature that puts together a collection of blocks that serve to add variety and decoration to the Overworld surface. This tutorial will explain what is needed to create this feature, including size, frequency, generation location, and more!
|
||||
|
||||
## Single Block Features
|
||||
|
||||
Single block features are going to be the base of our surface builder. They will define which blocks we are going to use. For this tutorial I'll be using Coarse Dirt, Podzol and Cobblestone.
|
||||
|
||||
Learn more about single block features [here](/world-generation/feature-types#single-block-features)
|
||||
|
||||
Coarse Dirt File
|
||||
|
||||
<CodeHeader>BP/features/coarse_dirt_feature.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.13.0",
|
||||
"minecraft:single_block_feature": {
|
||||
"description": {
|
||||
"identifier": "wiki:coarse_dirt_feature"
|
||||
},
|
||||
"places_block": {
|
||||
//Coarse dirt shares same identifier as dirt, set it using name and states
|
||||
"name": "minecraft:dirt",
|
||||
"states": {
|
||||
"dirt_type": "coarse"
|
||||
}
|
||||
},
|
||||
"enforce_survivability_rules": false,
|
||||
"enforce_placement_rules": false,
|
||||
"may_replace": [
|
||||
"minecraft:grass" //The block can only replace grass
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Podzol File
|
||||
|
||||
<CodeHeader>BP/features/podzol_feature.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.13.0",
|
||||
"minecraft:single_block_feature": {
|
||||
"description": {
|
||||
"identifier": "wiki:podzol_feature"
|
||||
},
|
||||
"places_block": "minecraft:podzol", //Podzol can be defined using direct identifier
|
||||
"enforce_survivability_rules": false,
|
||||
"enforce_placement_rules": false,
|
||||
"may_replace": [
|
||||
"minecraft:grass" //The block can only replace grass
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Cobblestone File
|
||||
|
||||
<CodeHeader>BP/features/cobblestone_feature.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.13.0",
|
||||
"minecraft:single_block_feature": {
|
||||
"description": {
|
||||
"identifier": "wiki:cobblestone_feature"
|
||||
},
|
||||
"places_block": "minecraft:cobblestone", //Cobblestone can be defined using direct identifier
|
||||
"enforce_survivability_rules": false,
|
||||
"enforce_placement_rules": false,
|
||||
"may_replace": [
|
||||
"minecraft:grass" //The block can only replace grass
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Weighted Random Features
|
||||
|
||||
Weighted random features are going to be our _randomizer_ to select between each type of blocks.
|
||||
|
||||
Learn more about weighted random features [here](/world-generation/feature-types#weighted-random-features)
|
||||
|
||||
<CodeHeader>BP/features/select_surface_block_feature.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.13.0",
|
||||
"minecraft:weighted_random_feature": {
|
||||
"description": {
|
||||
"identifier": "wiki:select_surface_block_feature"
|
||||
},
|
||||
"features": [
|
||||
[
|
||||
"wiki:coarse_dirt_feature", //Coarse dirt weighs 5
|
||||
5
|
||||
],
|
||||
[
|
||||
"wiki:podzol_feature", //Podzol dirt weighs 3
|
||||
3
|
||||
],
|
||||
[
|
||||
"wiki:cobblestone_feature", //Cobblestone weighs 2
|
||||
2
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Scatter Features
|
||||
|
||||
Scatter features are an important part of our surface builder. It will determine the size, shape and number of blocks in one blob.
|
||||
|
||||
Learn more about scatter features [here](/world-generation/feature-types#scatter-features)
|
||||
|
||||
<CodeHeader>BP/features/scatter_surface_block_feature.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.13.0",
|
||||
"minecraft:scatter_feature": {
|
||||
"description": {
|
||||
"identifier": "wiki:scatter_surface_block_feature"
|
||||
},
|
||||
"iterations": "math.random_integer(20,25)",
|
||||
"x": {
|
||||
"extent": [0, 8],
|
||||
"distribution": "gaussian"
|
||||
},
|
||||
"z": {
|
||||
"extent": [0, 8],
|
||||
"distribution": "gaussian"
|
||||
},
|
||||
"y": "q.heightmap(v.worldx, v.worldz) -1",
|
||||
"places_feature": "wiki:select_surface_block_feature" //Weighted random feature identifier
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- `iterations` determine how many blocks will be placed. I'm going to use the Molang `math.random_integer` function to randomize the number of blocks. In this case, it'll be 20 to 25 blocks.
|
||||
|
||||
- `extent` use an array to determine the size of the blob. `[0, 8]` means the size is extended from 0 to 8 blocks. So, our blob would be 8 blocks long both on X and Z axis. **Only use this for X and Z distribution**.
|
||||
|
||||
- `"y": "q.heightmap(v.worldx, v.worldz) -1` means it will put the block on the highest block on the y coordinate -1. So it'll always put the feature on the surface.
|
||||
|
||||
- `distribution` specifies the type of distribution to use. Available include `Gaussian`, `Inverse Gaussian`, `Uniform`,`Fixed Grid` and `Jittered Grid`
|
||||
|
||||
## Feature Rule
|
||||
|
||||
This is the final step for our surface builder. The feature rules for our surface builders are slightly different.
|
||||
|
||||
<CodeHeader>BP/feature_rules/overworld_surface_blocks_feature.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.13.0",
|
||||
"minecraft:feature_rules": {
|
||||
"description": {
|
||||
"identifier": "wiki:overworld_surface_blocks_feature",
|
||||
"places_feature": "wiki:scatter_surface_block_feature"
|
||||
},
|
||||
"conditions": {
|
||||
"placement_pass": "surface_pass",
|
||||
"minecraft:biome_filter": {
|
||||
"test": "has_biome_tag",
|
||||
"operator": "==",
|
||||
"value": "overworld" //You can change this to whatever biometag you want
|
||||
}
|
||||
},
|
||||
"distribution": {
|
||||
"iterations": 1,
|
||||
"x": {
|
||||
"extent": [0, 16],
|
||||
"distribution": "uniform"
|
||||
},
|
||||
"y": 0,
|
||||
"z": {
|
||||
"extent": [0, 16],
|
||||
"distribution": "uniform"
|
||||
},
|
||||
"scatter_chance": {
|
||||
//Chance of the blob generating each chunk
|
||||
"numerator": 1,
|
||||
"denominator": 5
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
And our surface builder is done! Feel free to modify and mess around with it!
|
||||
340
docs/wiki/world-generation/world-generation-intro.md
Normal file
340
docs/wiki/world-generation/world-generation-intro.md
Normal file
@@ -0,0 +1,340 @@
|
||||
---
|
||||
title: Intro to World Generation
|
||||
category: General
|
||||
nav_order: 1
|
||||
tags:
|
||||
- guide
|
||||
- experimental
|
||||
mentions:
|
||||
- SirLich
|
||||
- solvedDev
|
||||
- Dreamedc2015
|
||||
- destruc7ion
|
||||
- MedicalJewel105
|
||||
- aexer0e
|
||||
- retr0cube
|
||||
- SmokeyStack
|
||||
---
|
||||
|
||||
:::warning
|
||||
This page is somewhat out-dated, and contains limited information. For the most up-to-date and comprehensive information, view the other pages in this section.
|
||||
:::
|
||||
|
||||
You can change the world's generation via Add-ons. The needed folders in the Behavior pack for these are:
|
||||
|
||||
`structures`, `features`, `feature_rules` and `biomes`. It's quite self-explanatory: you can store your .mcstructure files from (or for) structure blocks in `structures`, biome files in `biomes`, terrain features, like ores, in `features` and the rules for their generation in `feature_rules`. Let's go over adding a custom biome first.
|
||||
|
||||
_Note: it might be easier to create biomes using bridge., a Visual software for Add-on creation (also linked in Links and Contact), since the official Documentation is rather incomplete. You can also generate all example files of vanilla biomes, features and feature rules for reference, like shown here:_
|
||||
|
||||

|
||||
_Generating a coal_ore feature using bridge._
|
||||
|
||||
However, bridge. is not required.
|
||||
|
||||
---
|
||||
|
||||
## Custom Biomes
|
||||
|
||||
<CodeHeader>BP/biomes/cold_biome.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.13.0",
|
||||
"minecraft:biome": {
|
||||
"description": {
|
||||
"identifier": "cold_biome"
|
||||
},
|
||||
"components": {
|
||||
"minecraft:climate": {
|
||||
"downfall": 0.7,
|
||||
"snow_accumulation": [0.6, 0.9],
|
||||
"temperature": 15.0
|
||||
},
|
||||
"minecraft:overworld_height": {
|
||||
"noise_params": [0.6, 0.9]
|
||||
},
|
||||
"minecraft:surface_parameters": {
|
||||
"sea_floor_depth": 7,
|
||||
"sea_floor_material": "minecraft:blue_ice",
|
||||
"foundation_material": "minecraft:cobblestone",
|
||||
"mid_material": "minecraft:minecraft:concrete",
|
||||
"top_material": "minecraft:glass",
|
||||
"sea_material": "minecraft:water"
|
||||
},
|
||||
"minecraft:overworld_generation_rules": {
|
||||
"generate_for_climates": [
|
||||
["medium", 100],
|
||||
["warm", 100],
|
||||
["cold", 100]
|
||||
]
|
||||
},
|
||||
"cold_biome": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- Set `format_version` to 1.13.0: it's the latest biome file version as of the current release.
|
||||
- `description` takes only one value: `identifier`. This requires **NO namespace** and **MUST** be the same as the **file's name**.
|
||||
(If you do use a namespace, for example `wiki:cold_biome`, the file name needs to only match the id, so it has to remain as `cold_biome.json`.
|
||||
- `components` is just what you'd expect: something applied to the biome at default. let's look through them:
|
||||
- `minecraft:climate` controls everything climate-wise.
|
||||
- `downfall` is how often it'll be raining or snowing. 0.0 is for absolutely no rain (like a desert) and 1.0 should mean constant rain.
|
||||
- `temperature` is used to define things like water freezing and rain turning into snow.
|
||||
|
||||
**You can generate default biome files for reference using bridge.**
|
||||
|
||||
- `overworld_surface` controls blocks generated.
|
||||
- `floor_depth` is how deep down lakes and rivers go in blocks.
|
||||
- `sea_floor_material` defines the material to be used when generating the river and lake's floor.
|
||||
- `foundation_material` is the material to be used approximately between y=5 and y=50. For a desert, for example, it's stone.
|
||||
- `sea_material` is the material used as show liquid in lakes, rivers, oceans, etc. For example, in all Overworld biomes, this is set to "minecraft:water".
|
||||
- `top_material` defines the material for the highest level. E.g for Plains it's grass.
|
||||
- `mid_material` is the layer between 'top' and 'foundation'. For Plains it's dirt.
|
||||
- `overworld_height` defines how the Biome will look terrain-wise.
|
||||
|
||||
DO NOT use both `noise_type` and `noise_params` at the same time. `noise_params` is an array of the top level of noise and the lowest level of noise allowed in the biome.
|
||||
|
||||

|
||||
_A non-smooth transition between the same biome, generated with noise_params as [0.1, 0,1] and then [1.0, 1.0]._
|
||||
|
||||
- If you want to use `noise_type`, however, you will be presented with a few pre-generated types of noise. You will probably know how some of them look from the Vanilla game. Here's the list:
|
||||
|
||||
`beach, default, extreme, taiga, ocean, mountains, default_mutated, deep_ocean, lowlands, less_extreme, stone_beach, swamp, river, mushroom`.
|
||||
|
||||
- `minecraft_world_generation_rules` is the most important component of all, especially the `generate_for_climates` array. Basically, there are three climates in the game: "warm", "medium" and "cold". They are randomly thrown around every world when it's created [hard-coded]. Now, you can choose how often your custom biome will generate in every specific climate. If you do not provide anything in here, the default value is 0 for every climate, and the biome won't generate. In the example, the **weight** (the smaller the number, the smaller the chance of this biome generating instead of a vanilla one in the climate) for every climate is set to 100 for testing purposes: that makes the biome generate almost everywhere in the Overworld. Once I'm done with testing, however, I'll balance the weight how it's supposed to be. For example, the Vanilla _desert_ has the weight of 3 for warm.
|
||||
|
||||
- This component also takes Objects such as: `hills_transformation`, `mutate_transformation`, `shore_transformation`, `river_transformation`, but their meaning is unclear to me. Contributions are always appreciated. Same goes for the `surface_meaterial_adjustments` component.
|
||||
|
||||
- And, last but not least, BIOME TAGS! They're very simple, but useful. You can set however many of the vanilla or custom tags you want, by adding them in this format in `components`:
|
||||
|
||||
```
|
||||
"tagName": {}
|
||||
```
|
||||
|
||||
Then, you can test for your tag in _environment_sensors_, _filters_, _has_biome_ tests, _spawn rules_, and more.
|
||||
|
||||
Your custom biome is now complete!
|
||||
|
||||
---
|
||||
|
||||
## Features and Feature Rules
|
||||
|
||||
Note: in v.1.15Beta, it is possible to use `.mcstructures` from the `structures` folder instead of `features` to generate custom structures with `feature_rules`. More on that after the update arrives.
|
||||
|
||||
Features and Feature Rules are used to generate everything from ores to grass and flowers, vegetation to granite or clay patches.
|
||||
It is even possible to create custom structures using those, but as it is very grindy and will be much easier after the mentioned update, we won't talk about it just yet.
|
||||
|
||||
Now, it's worthwhile to mention that the easiest way to generate Custom Structures is this [auto generator](https://machine-builder.itch.io/frg-v2) by [MACHINE_BUILDER](https://www.youtube.com/channel/UC8FBQgo4AWwKFX97h60NKOQ), you should note that this tool has a free version with limited functionality and to enjoy the full functionality use the payware version. However, we'll still learn some other manual feature generation here, because some things like Ores are much more efficient to generate as `ore_feature`s and not `structure_template_feature`s.
|
||||
|
||||
Let's make our `wiki:blocky` custom block generate as an ore for the tutorial's sake. I'll do it the easy way, like this:
|
||||
|
||||
1. Open _bridge._, choose your Add-on.
|
||||
1. _Add new file>features>diamond_ore and Add new file>feature_rules>diamond_ore_.
|
||||
1. Now I'll save the files and open them in my Code Editor and make the necessary modifications.
|
||||
|
||||
_You could've easily just written the files from scratch or copied them from somewhere without using bridge. in case you are having trouble installing it. **One place to find the Vanilla Files are the [Example Packs](https://www.minecraft.net/en-us/addons), another, a more complete one is [bridge.'s repository](https://github.com/bridge.-core/bridge../tree/master/static/vanilla)**._
|
||||
|
||||
## Features
|
||||
|
||||
Features are located in `BP/features` and are basically a group of blocks stored in the game's files, which can be placed with a _feature_rule_. The **file name** of a _feature_ **must match** the **identifier** as well.
|
||||
|
||||
You can find their Documentation on [bedrock.dev/r/Features](https://bedrock.dev/r/Features)
|
||||
|
||||
<CodeHeader>BP/features/blocky_ore_feature.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.13.0",
|
||||
"minecraft:ore_feature": {
|
||||
"description": {
|
||||
"identifier": "blocky_ore_feature"
|
||||
},
|
||||
"count": 8,
|
||||
"places_block": "wiki:blocky",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- `minecraft_ore_feature` is type of the specific feature that places ores automatically. Each feature type has it's own specific syntax. (There's also `single_block_feature` that places a single block instead of an ore group, etc)
|
||||
- `identifier` doesn't require a namespace in this scenario. The namespace is optional, and is not to be added in the filename.
|
||||
- `count` is how big the ore "cluster" will be at maximum, or how many actual ore blocks will generate together.
|
||||
- `places_block` takes the identifier of the block to be placed as the value.
|
||||
- `may_replace` takes all the blocks that the feature can replace as arguments. If it generates over one of the blocks not included in here, the block will remain where it was without being replaced.
|
||||
|
||||
## Feature Rules
|
||||
|
||||
**Feature Rules** control where and how _features_ (and, in the future, _structures_) are placed.
|
||||
|
||||
<CodeHeader>BP/feature_rules/overworld_underground_blocky_ore_feature.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.13.0",
|
||||
"minecraft:feature_rules": {
|
||||
"description": {
|
||||
"identifier": "overworld_underground_blocky_ore_feature",
|
||||
"places_feature": "blocky_ore_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": 100,
|
||||
"coordinate_eval_order": "zyx",
|
||||
"x": {
|
||||
"distribution": "uniform",
|
||||
"extent": [0, 16]
|
||||
},
|
||||
"y": {
|
||||
"distribution": "uniform",
|
||||
"extent": [0, 16]
|
||||
},
|
||||
"z": {
|
||||
"distribution": "uniform",
|
||||
"extent": [0, 16]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- `description`
|
||||
- `identifier` needs no namespace, but the filename needs to match.
|
||||
- `places_feature` takes the identifier of the feature that is controlled by this rule as the value.
|
||||
- `conditions`
|
||||
- `placement_pass` HOW the feature will be passed.
|
||||
- `biome_filter` tests for biome tags where the feature will generate, exactly as a spawn rule.
|
||||
- `distribution`
|
||||
- `iterations` basically chance. I set mine to 100 to make it generate everywhere, but for a diamond_ore, this is set to 1.
|
||||
- The next four components show in which directions the ore will be 'dragged' towards.
|
||||
_Needs more clarification_
|
||||
|
||||
The easiest way to test wether your ores generated is /fill ~15 ~5 ~15 ~-15 ~-15 ~-15 air 0 replace stone using this command at a low y level. it'll keep everything BUT stone in the selected area, like this:
|
||||
|
||||

|
||||
|
||||
And yes, 100 as "iterations" is definitely waaay too much ;)
|
||||
|
||||
It's a good idea to proceed checking out other feature and feature_rule vanilla files to learn further techniques. However, the ones you were just walked through are enough to create most of what needs to be generated.
|
||||
|
||||
---
|
||||
|
||||
## Custom Structures
|
||||
|
||||
As of MCBE v1.16.20, **Custom Generated structures are possible**.
|
||||
A simple way to generate Structures is [this](https://machine-builder.itch.io/frg-v2) auto generator by MACHINE_BUILDER, mentioned earlier. It generates all three of the required files for your structure: `feature_rules/mystructure.feature_rule.json`, `feature_rules/mystructure.feature.json` and `structures/mystructure.mcstructure.` You can learn more about defining `.mcstructures` with Structure Blocks in Minecraft itself [here](/nbt/mcstructure).
|
||||
|
||||
---
|
||||
|
||||
Now that you have your `.mcstructure`, time to write your `feature` and `feature rule`. The last is the same as with ores (see the beginning of this article). Let's continue to the **Feature**.
|
||||
|
||||
- Remember that the namespace is not required and that the filename must match the identifier, excluding the namespace. So if you have a feature rule with the identifier `wiki:myfeaturerule` or simply `myfeaturerule`, the file name can be be `myfeaturerule.json` in both cases.
|
||||
|
||||
Here's an code example from the [Features Documentation](https://bedrock.dev/r/Features#minecraft:structure_template_feature):
|
||||
|
||||
<CodeHeader></CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.13.0",
|
||||
"minecraft:structure_template_feature": {
|
||||
"description": {
|
||||
"identifier": "wiki:hot_air_balloon_feature"
|
||||
},
|
||||
"structure_name": "wiki:hot_air_balloon",
|
||||
"adjustment_radius": 8,
|
||||
"facing_direction": "random",
|
||||
"constraints": {
|
||||
"unburied": {},
|
||||
"block_intersection": {
|
||||
"block_whitelist": [
|
||||
"minecraft:air"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- `structure_name` is the structure's identifier, the one you saved via a Structure Block.
|
||||
|
||||
That's pretty much it! Now you're able to generate your own custom Structures in the world.
|
||||
|
||||
---
|
||||
|
||||
---
|
||||
|
||||
## Your progress so far
|
||||
|
||||
**What you've done:**
|
||||
|
||||
<Checklist>
|
||||
|
||||
- [x] Created you very first biome.
|
||||
- [x] Made your very first ore generate naturally.
|
||||
- [x] Learned to use bridge. for vanilla files generation and referencing.
|
||||
- [x] Learned about other Custom Generation methods.
|
||||
- [x] Created custom Structures
|
||||
|
||||
</Checklist>
|
||||
Reference in New Issue
Block a user