教學:自訂世界生成
對於數據包和模組創作者來説,自訂世界生成通常是十分複雜且困難的。要想創造出一個較為完善的世界,有必要參考原版中世界生成的方式。
本教學選取1.20.1中的部分原版世界生成檔案進行大致解讀,方便創作者閱讀和理解原版世界生成。
如何取得原版世界生成檔案[編輯 | 編輯原始碼]
在1.19.3的22w42a及之後的版本,大部分世界生成檔案都可以在client.jar或server.jar的data/minecraft/
目錄下找到。但在世界設定中並不包含原版主世界和地獄維度的生物羣落方案參數。
通過數據生成器可以直接生成所有原版數據包檔案,以及主世界和地獄維度的生物羣落方案參數。
你也可以在Slicedlime的github上取得22w42a以前的原版世界生成檔案,位於examples倉庫中。倉庫歷史中缺失的版本意味着在這些版本裏原版世界生成檔案沒有發生變動。
主世界最終密度函數[編輯 | 編輯原始碼]
主世界最終密度函數是位於worldgen/noise_settings/overworld.json內的final_density
字段。
{ //主世界最終密度函數
- "type": "minecraft:min",
- "argument1":
- { //使其值更接近0,影響含水層各水域間分隔的生成,final_density的負值越小,分隔越不易生成
- "type": "minecraft:squeeze",
- "argument": {
- "type": "minecraft:mul",
- "argument1": 0.64,
- "argument2":
- { //插值
- "type": "minecraft:interpolated",
- "argument":
- { //與舊版區塊銜接
- "type": "minecraft:blend_density",
- "argument":
- { //從Y=-40到Y=-64,密度函數值逐漸變為固定值0.1171875,以避免洞穴過深暴露甚至貫穿基岩層
- "type": "minecraft:add",
- "argument1": 0.1171875,
- "argument2": {
- "type": "minecraft:mul",
- "argument1": {
- "type": "minecraft:y_clamped_gradient",
- "from_y": -64,
- "to_y": -40,
- "from_value": 0,
- "to_value": 1
- },
- "argument2": {
- "type": "minecraft:add",
- "argument1": -0.1171875,
- "argument2":
- { //從Y=240到Y=256,密度函數值逐漸變為固定值-0.078125,以避免生成過高地形
- "type": "minecraft:add",
- "argument1": -0.078125,
- "argument2": {
- "type": "minecraft:mul",
- "argument1": {
- "type": "minecraft:y_clamped_gradient",
- "from_y": 240,
- "to_y": 256,
- "from_value": 1,
- "to_value": 0
- },
- "argument2": {
- "type": "minecraft:add",
- "argument1": 0.078125,
- "argument2":
- { //以sloped_cheese的1.5625為分界線,分為地表和地下
- "type": "minecraft:range_choice",
- "input": "minecraft:overworld/sloped_cheese",
- "min_inclusive": -1000000,
- "max_exclusive": 1.5625,
- "when_in_range":
- { //地表
- "type": "minecraft:min",
- "argument1": "minecraft:overworld/sloped_cheese", //決定了地形表面的高度和形狀
- "argument2":
- { //雜訊洞穴入口,即連通地表與地下洞穴的一些洞穴
- "type": "minecraft:mul",
- "argument1": 5,
- "argument2": "minecraft:overworld/caves/entrances"
- }
- },
- "when_out_of_range":
- { //地下
- "type": "minecraft:max",
- "argument1":
- { //意麪、芝士洞穴與洞穴入口,取兩次最小值相對於取三者的最小值。這裏有必要再次呼叫洞穴入口,否則洞穴入口只在地表生成而被切斷
- "type": "minecraft:min",
- "argument1":
- { //芝士洞穴與洞穴入口
- "type": "minecraft:min",
- "argument1":
- { //芝士洞穴
- "type": "minecraft:add",
- "argument1":
- { //使洞穴更小且形狀更不規則。該部分永遠為正
- "type": "minecraft:mul",
- "argument1": 4,
- "argument2": {
- "type": "minecraft:square",
- "argument": {
- "type": "minecraft:noise",
- "noise": "minecraft:cave_layer",
- "xz_scale": 1,
- "y_scale": 8
- }
- }
- },
- "argument2":
- {
- "type": "minecraft:add",
- "argument1":
- { //芝士洞穴的主體。只有該部分小於零的地方才能生成芝士洞穴
- "type": "minecraft:clamp",
- "input": {
- "type": "minecraft:add",
- "argument1": 0.27,
- "argument2": {
- "type": "minecraft:noise",
- "noise": "minecraft:cave_cheese",
- "xz_scale": 1,
- "y_scale": 0.6666666666666666
- }
- },
- "min": -1,
- "max": 1
- },
- "argument2":
- { //靠近地表時增加密度,減少靠近地表的芝士洞穴生成。該部分在sloped_cheese的值大於2.34375時為0,在2.34375和1.5626之間逐漸增加,在1.5625時為0.5
- "type": "minecraft:clamp",
- "input": {
- "type": "minecraft:add",
- "argument1": 1.5,
- "argument2": {
- "type": "minecraft:mul",
- "argument1": -0.64,
- "argument2": "minecraft:overworld/sloped_cheese"
- }
- },
- "min": 0,
- "max": 0.5
- }
- }
- },
- "argument2": "minecraft:overworld/caves/entrances" //洞穴入口
- },
- "argument2":
- { //意麪洞穴
- "type": "minecraft:add",
- "argument1": "minecraft:overworld/caves/spaghetti_2d",
- "argument2": "minecraft:overworld/caves/spaghetti_roughness_function"
- }
- },
- "argument2":
- { //雜訊洞穴裏的雜訊柱
- "type": "minecraft:range_choice",
- "input": "minecraft:overworld/caves/pillars",
- "min_inclusive": -1000000,
- "max_exclusive": 0.03,
- "when_in_range": -1000000,
- "when_out_of_range": "minecraft:overworld/caves/pillars"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "argument2": "minecraft:overworld/caves/noodle" //麪條洞穴
}
其中呼叫的用於決定地形表面高度和形狀的sloped_cheese位於data/minecraft/worldgen/density_function/overworld/sloped_cheese.json。
{ //sloped_cheese
- "type": "minecraft:add",
- "argument1":
- { //乘上因子
minecraft:overworld/factor
以確定三維地形的位置。並使正值乘上4,以避免地形較深處受base_3d_noise的影響
- "type": "minecraft:mul",
- "argument1": 4.0,
- "argument2": {
- "type": "minecraft:quarter_negative",
- "argument": {
- "type": "minecraft:mul",
- "argument1":
- {
- "type": "minecraft:add",
- "argument1": "minecraft:overworld/depth", //決定一般情況下的地形表面高度,地形表面上方為負值,下方為正值
- "argument2":
- { //在較高的山地增加或減小密度,獲得尖銳的鋸齒狀小型山峯。該部分為二維的密度函數。
- "type": "minecraft:mul",
- "argument1": "minecraft:overworld/jaggedness", //使用樣條函數,根據大陸性、侵蝕度、PV值和奇異度確定山脈的位置。在大部分地方為0,在高大陸性、低侵蝕度、高PV值的地方為正,且在奇異值為負的地方數值更大
- "argument2": { //雜訊因子,將山脈化為小型山峯
- "type": "minecraft:half_negative",
- "argument": {
- "type": "minecraft:noise",
- "noise": "minecraft:jagged",
- "xz_scale": 1500.0,
- "y_scale": 0.0
- }
- }
- }
- },
- "argument2": "minecraft:overworld/factor" //該因子使用樣條函數,根據大陸性、侵蝕度、奇異性和PV值來確定三維地形的位置,永遠為正,在風襲類生物羣落應該生成的位置數值較小,在其他地方數值較大以減小base_3d_noise的影響
- }
- }
- },
- "argument2": "minecraft:overworld/base_3d_noise" //三維的雜訊,用於建立三維的地表
}
其中sloped_cheese中呼叫的用於決定一般地形表面高度的depth位於data/minecraft/worldgen/density_function/overworld/depth.json。
{ //depth
- "type": "minecraft:add",
- "argument1":
- { //每下降1格,深度增加1⁄128(0.0078125),在Y=128時為0
- "type": "minecraft:y_clamped_gradient",
- "from_value": 1.5,
- "from_y": -64,
- "to_value": -1.5,
- "to_y": 320
- },
- "argument2": "minecraft:overworld/offset" //使用樣條函數,根據大陸性、侵蝕度和PV值決定地形的高度偏移
}
主世界地表規則[編輯 | 編輯原始碼]
主世界地表規則是位於worldgen/noise_settings/overworld.json內的surface_rule
字段。
{ //主世界地表規則
- "type": "minecraft:sequence",
- "sequence": [
- //基岩層
- {
- "type": "minecraft:condition",
- "if_true": //Y=-64為基岩,Y=-64到Y=-60使用雜訊漸變。
- {
- "type": "minecraft:vertical_gradient",
- "random_name": "minecraft:bedrock_floor",
- "true_at_and_below": {
- "above_bottom": 0
- },
- "false_at_and_above": {
- "above_bottom": 5
- }
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:bedrock"
- }
- }
- },
- //表層(例如平原的草地和泥土)
- {
- "type": "minecraft:condition",
- "if_true": { //是否要嘗試生成表層(例如平原的草地和泥土)。preliminary_surface為initial_density_without_jaggedness產生的初始地表高度向下整體偏移約2到8格後的高度,該高度通常相對於實際表層厚度很低,以保證能夠生成表層。若無此條件,洞穴的地面也會生成表層。
- "type": "minecraft:above_preliminary_surface"
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //特殊生物羣落的表面(即最表層)
- {
- "type": "minecraft:condition",
- "if_true": //最表層(上方為空氣,或者與空氣方塊間隔了一些液體方塊)
- {
- "type": "minecraft:stone_depth",
- "offset": 0,
- "surface_type": "floor",
- "add_surface_depth": false,
- "secondary_depth_range": 0
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //疏林惡地高處表面粗泥和草地相間分佈,草地在水下時則為泥土
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:wooded_badlands"
- ]
- },
- "then_run": {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:y_above",
- "anchor": {
- "absolute": 97
- },
- "surface_depth_multiplier": 2,
- "add_stone_depth": false
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //粗泥
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:surface",
- "min_threshold": -0.909,
- "max_threshold": -0.5454
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:coarse_dirt"
- }
- }
- },
- //粗泥
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:surface",
- "min_threshold": -0.1818,
- "max_threshold": 0.1818
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:coarse_dirt"
- }
- }
- },
- //粗泥
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:surface",
- "min_threshold": 0.5454,
- "max_threshold": 0.909
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:coarse_dirt"
- }
- }
- },
- //預設為草地(在水下時為泥土)
- {
- "type": "minecraft:sequence",
- "sequence": [
- //上方沒有水時為草地
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:water",
- "offset": 0,
- "surface_depth_multiplier": 0,
- "add_stone_depth": false
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:grass_block",
- "Properties": {
- "snowy": "false"
- }
- }
- }
- },
- //否則為泥土
- {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:dirt"
- }
- }
- ]
- }
- ]
- }
- }
- },
- //沼澤地在Y=62的表面根據雜訊隨機替換成水。Y=62通常是河流、湖泊或海洋的岸上。
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:swamp"
- ]
- },
- "then_run": {
- "type": "minecraft:condition",
- "if_true": //如果Y>=62
- {
- "type": "minecraft:y_above",
- "anchor": {
- "absolute": 62
- },
- "surface_depth_multiplier": 0,
- "add_stone_depth": false
- },
- "then_run": {
- "type": "minecraft:condition",
- "if_true": //如果在Y<63
- {
- "type": "minecraft:not",
- "invert": {
- "type": "minecraft:y_above",
- "anchor": {
- "absolute": 63
- },
- "surface_depth_multiplier": 0,
- "add_stone_depth": false
- }
- },
- "then_run": {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:surface_swamp",
- "min_threshold": 0,
- "max_threshold": 1.7976931348623157e+308
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:water",
- "Properties": {
- "level": "0"
- }
- }
- }
- }
- }
- }
- },
- //紅樹林沼澤地在Y=60到62表面根據雜訊隨機替換成水。通常是岸上或淺水域的水底。
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:mangrove_swamp"
- ]
- },
- "then_run": {
- "type": "minecraft:condition",
- "if_true": //如果Y>=60
- {
- "type": "minecraft:y_above",
- "anchor": {
- "absolute": 60
- },
- "surface_depth_multiplier": 0,
- "add_stone_depth": false
- },
- "then_run": {
- "type": "minecraft:condition",
- "if_true": //如果Y<63
- {
- "type": "minecraft:not",
- "invert": {
- "type": "minecraft:y_above",
- "anchor": {
- "absolute": 63
- },
- "surface_depth_multiplier": 0,
- "add_stone_depth": false
- }
- },
- "then_run": {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:surface_swamp",
- "min_threshold": 0,
- "max_threshold": 1.7976931348623157e+308
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:water",
- "Properties": {
- "level": "0"
- }
- }
- }
- }
- }
- }
- }
- ]
- }
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:badlands",
- "minecraft:eroded_badlands",
- "minecraft:wooded_badlands"
- ]
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //表面
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:stone_depth",
- "offset": 0,
- "surface_type": "floor",
- "add_surface_depth": false,
- "secondary_depth_range": 0
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //極高處表面為橙色陶瓦。並不生效,因為原版主世界Y=256及以上沒有任何方塊
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:y_above",
- "anchor": {
- "absolute": 256
- },
- "surface_depth_multiplier": 0,
- "add_stone_depth": false
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:orange_terracotta"
- }
- }
- },
- //Y=(74+表層厚度)以上,表面為各種陶瓦和染色陶瓦
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:y_above",
- "anchor": {
- "absolute": 74
- },
- "surface_depth_multiplier": 1,
- "add_stone_depth": true
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //陶瓦
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:surface",
- "min_threshold": -0.909,
- "max_threshold": -0.5454
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:terracotta"
- }
- }
- },
- //陶瓦
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:surface",
- "min_threshold": -0.1818,
- "max_threshold": 0.1818
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:terracotta"
- }
- }
- },
- //陶瓦
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:surface",
- "min_threshold": 0.5454,
- "max_threshold": 0.909
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:terracotta"
- }
- }
- },
- //陶瓦和各種顏色的染色陶瓦
- {
- "type": "minecraft:bandlands"
- }
- ]
- }
- },
- //上方沒有水時為紅沙(如果懸空則為紅砂岩)
- {
- "type": "minecraft:condition",
- "if_true": //上方沒有液體
- {
- "type": "minecraft:water",
- "offset": -1,
- "surface_depth_multiplier": 0,
- "add_stone_depth": false
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //下方沒有方塊支撐,則為紅砂岩
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:stone_depth",
- "offset": 0,
- "surface_type": "ceiling",
- "add_surface_depth": false,
- "secondary_depth_range": 0
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:red_sandstone"
- }
- }
- },
- //否則為紅沙
- {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:red_sand"
- }
- }
- ]
- }
- },
- //上方有液體時,若表層厚度為正值,生成橙色陶瓦
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:not",
- "invert": {
- "type": "minecraft:hole"
- }
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:orange_terracotta"
- }
- }
- },
- //淺水,預設為白色陶瓦
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:water",
- "offset": -6,
- "surface_depth_multiplier": -1,
- "add_stone_depth": true
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:white_terracotta"
- }
- }
- },
- //深水,預設為砂礫(如果懸空則為石頭)
- {
- "type": "minecraft:sequence",
- "sequence": [
- //下方沒有支撐則為石頭
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:stone_depth",
- "offset": 0,
- "surface_type": "ceiling",
- "add_surface_depth": false,
- "secondary_depth_range": 0
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:stone"
- }
- }
- },
- //砂礫
- {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:gravel"
- }
- }
- ]
- }
- ]
- }
- },
- //地表高度>=(63-表層厚度)是的表層
- {
- "type": "minecraft:condition",
- "if_true": //地表高度>=(63-表層厚度)
- {
- "type": "minecraft:y_above",
- "anchor": {
- "absolute": 63
- },
- "surface_depth_multiplier": -1,
- "add_stone_depth": true
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //Y>=63且地表高度<(74+表層厚度)時,為橙色陶瓦
- {
- "type": "minecraft:condition",
- "if_true": //Y>=63
- {
- "type": "minecraft:y_above",
- "anchor": {
- "absolute": 63
- },
- "surface_depth_multiplier": 0,
- "add_stone_depth": false
- },
- "then_run": {
- "type": "minecraft:condition",
- "if_true": //地表高度<(74+表層厚度)
- {
- "type": "minecraft:not",
- "invert": {
- "type": "minecraft:y_above",
- "anchor": {
- "absolute": 74
- },
- "surface_depth_multiplier": 1,
- "add_stone_depth": true
- }
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:orange_terracotta"
- }
- }
- }
- },
- //否則
- {
- "type": "minecraft:bandlands"
- }
- ]
- }
- },
- //上方無水或淺水下的表層
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:stone_depth",
- "offset": 0,
- "surface_type": "floor",
- "add_surface_depth": true,
- "secondary_depth_range": 0
- },
- "then_run": {
- "type": "minecraft:condition",
- "if_true": //淺水或無水
- {
- "type": "minecraft:water",
- "offset": -6,
- "surface_depth_multiplier": -1,
- "add_stone_depth": true
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:white_terracotta"
- }
- }
- }
- }
- ]
- }
- },
- //上方無液體的表面
- {
- "type": "minecraft:condition",
- "if_true": //表面
- {
- "type": "minecraft:stone_depth",
- "offset": 0,
- "surface_type": "floor",
- "add_surface_depth": false,
- "secondary_depth_range": 0
- },
- "then_run": {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:frozen_ocean",
- "minecraft:deep_frozen_ocean"
- ]
- },
- "then_run": {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:hole"
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- {
- "type": "minecraft:condition",
- "if_true":
- {
- "type": "minecraft:water",
- "offset": 0,
- "surface_depth_multiplier": 0,
- "add_stone_depth": false
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:air"
- }
- }
- },
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:temperature"
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:ice"
- }
- }
- },
- {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:water",
- "Properties": {
- "level": "0"
- }
- }
- }
- {
- ]
}
- }
- },
- //表面
- {
- "type": "minecraft:sequence",
- "sequence": [
- //冰峯表面為冰、雪和冰磚
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:frozen_peaks"
- ]
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //背陽的陡峭斜坡生成冰磚
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:steep"
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:packed_ice"
- }
- }
- },
- //偶爾生成冰磚
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:packed_ice",
- "min_threshold": 0,
- "max_threshold": 0.2
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:packed_ice"
- }
- }
- },
- //偶爾生成冰,較為罕見
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:ice",
- "min_threshold": 0,
- "max_threshold": 0.025
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:ice"
- }
- }
- },
- //預設為雪
- {
- "type": "minecraft:condition",
- "if_true": //用於雕刻器的條件,詳見§ 註釋
- {
- "type": "minecraft:water",
- "offset": 0,
- "surface_depth_multiplier": 0,
- "add_stone_depth": false
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:snow_block"
- }
- }
- }
- ]
- }
- },
- //雪坡表面為幼雪、雪和石頭
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:snowy_slopes"
- ]
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //背陽的陡峭斜坡生成石頭
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:steep"
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:stone"
- }
- }
- },
- //偶爾生成幼雪
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:powder_snow",
- "min_threshold": 0.35,
- "max_threshold": 0.6
- },
- "then_run": {
- "type": "minecraft:condition",
- "if_true": //用於雕刻器的條件,詳見§ 註釋。
- {
- "type": "minecraft:water",
- "offset": 0,
- "surface_depth_multiplier": 0,
- "add_stone_depth": false
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:powder_snow"
- }
- }
- }
- },
- //預設為雪
- {
- "type": "minecraft:condition",
- "if_true": //用於雕刻器的條件,詳見§ 註釋。
- {
- "type": "minecraft:water",
- "offset": 0,
- "surface_depth_multiplier": 0,
- "add_stone_depth": false
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:snow_block"
- }
- }
- }
- ]
- }
- },
- //尖峯表面為雪和石頭
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:jagged_peaks"
- ]
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //背陽的陡峭斜坡生成石頭
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:steep"
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:stone"
- }
- }
- },
- //預設為雪
- {
- "type": "minecraft:condition",
- "if_true": //用於雕刻器的條件,詳見§ 註釋。
- {
- "type": "minecraft:water",
- "offset": 0,
- "surface_depth_multiplier": 0,
- "add_stone_depth": false
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:snow_block"
- }
- }
- }
- ]
- }
- },
- //雪林表面為幼雪和雪
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:grove"
- ]
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //偶爾生成幼雪
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:powder_snow",
- "min_threshold": 0.35,
- "max_threshold": 0.6
- },
- "then_run": {
- "type": "minecraft:condition",
- "if_true": //用於雕刻器的條件,詳見§ 註釋。
- {
- "type": "minecraft:water",
- "offset": 0,
- "surface_depth_multiplier": 0,
- "add_stone_depth": false
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:powder_snow"
- }
- }
- }
- },
- //預設為雪
- {
- "type": "minecraft:condition",
- "if_true": //用於雕刻器的條件,詳見§ 註釋。
- {
- "type": "minecraft:water",
- "offset": 0,
- "surface_depth_multiplier": 0,
- "add_stone_depth": false
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:snow_block"
- }
- }
- }
- ]
- }
- },
- //某些生物羣落表面為沙或石頭
- {
- "type": "minecraft:sequence",
- "sequence": [
- //石峯表面為方解石和石頭
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:stony_peaks"
- ]
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //偶爾生成方解石
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:calcite",
- "min_threshold": -0.0125,
- "max_threshold": 0.0125
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:calcite"
- }
- }
- },
- //預設為石頭
- {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:stone"
- }
- }
- ]
- }
- },
- //石岸表面為砂礫和石頭
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:stony_shore"
- ]
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //偶爾生成砂礫(懸空時為石頭)
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:gravel",
- "min_threshold": -0.05,
- "max_threshold": 0.05
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- {
- "type": "minecraft:condition",
- "if_true": //下方沒有支撐則為石頭
- {
- "type": "minecraft:stone_depth",
- "offset": 0,
- "surface_type": "ceiling",
- "add_surface_depth": false,
- "secondary_depth_range": 0
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:stone"
- }
- }
- },
- {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:gravel"
- }
- }
- {
- ]
- }
- },
- //預設為石頭
- {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:stone"
- }
- }
- ]
- }
- },
- //風襲丘陵地表層厚度較厚處的表面為石頭
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:windswept_hills"
- ]
- },
- "then_run": //表層厚度較厚時生成石頭
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:surface",
- "min_threshold": 0.12121212121212122,
- "max_threshold": 1.7976931348623157e+308
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:stone"
- }
- }
- }
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:warm_ocean",
- "minecraft:beach",
- "minecraft:snowy_beach"
- ]
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //懸空時為砂岩
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:stone_depth",
- "offset": 0,
- "surface_type": "ceiling",
- "add_surface_depth": false,
- "secondary_depth_range": 0
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:sandstone"
- }
- }
- },
- //預設為沙
- {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:sand"
- }
- }
- ]
- }
- },
- //沙漠表面為沙和砂岩
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:desert"
- ]
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //懸空時為砂岩
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:stone_depth",
- "offset": 0,
- "surface_type": "ceiling",
- "add_surface_depth": false,
- "secondary_depth_range": 0
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:sandstone"
- }
- }
- },
- //預設為沙
- {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:sand"
- }
- }
- ]
- }
- },
- //溶洞(雖然很少生成在地表)表面為石頭
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:dripstone_caves"
- ]
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:stone"
- }
- }
- }
- ]
- },
- //風襲熱帶稀樹草原表面大部分為石頭和粗泥
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:windswept_savanna"
- ]
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //表層厚度很厚時生成石頭
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:surface",
- "min_threshold": 0.21212121212121213,
- "max_threshold": 1.7976931348623157e+308
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:stone"
- }
- }
- },
- //表層厚度較厚時生成粗泥
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:surface",
- "min_threshold": -0.06060606060606061,
- "max_threshold": 1.7976931348623157e+308
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:coarse_dirt"
- }
- }
- }
- ]
- }
- },
- //風襲砂礫丘陵地表面為砂礫、石頭和草地
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:windswept_gravelly_hills"
- ]
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //表層厚度很厚時生成砂礫(懸空時為石頭)
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:surface",
- "min_threshold": 0.24242424242424243,
- "max_threshold": 1.7976931348623157e+308
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:stone_depth",
- "offset": 0,
- "surface_type": "ceiling",
- "add_surface_depth": false,
- "secondary_depth_range": 0
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:stone"
- }
- }
- },
- {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:gravel"
- }
- }
- {
- ]
- }
- },
- //表層厚度較厚時生成石頭
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:surface",
- "min_threshold": 0.12121212121212122,
- "max_threshold": 1.7976931348623157e+308
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:stone"
- }
- }
- },
- //表層厚度較薄時生成草地
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:surface",
- "min_threshold": -0.12121212121212122,
- "max_threshold": 1.7976931348623157e+308
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //用於雕刻器的條件,詳見§ 註釋。
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:water",
- "offset": 0,
- "surface_depth_multiplier": 0,
- "add_stone_depth": false
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:grass_block",
- "Properties": {
- "snowy": "false"
- }
- }
- }
- },
- {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:dirt"
- }
- }
- ]
- }
- },
- //預設(表層厚度很薄時)為砂礫(懸空時為石頭)
- {
- "type": "minecraft:sequence",
- "sequence": [
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:stone_depth",
- "offset": 0,
- "surface_type": "ceiling",
- "add_surface_depth": false,
- "secondary_depth_range": 0
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:stone"
- }
- }
- },
- {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:gravel"
- }
- }
- {
- ]
- }
- ]
- }
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:old_growth_pine_taiga",
- "minecraft:old_growth_spruce_taiga"
- ]
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //表層厚度很厚時生成粗泥
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:surface",
- "min_threshold": 0.21212121212121213,
- "max_threshold": 1.7976931348623157e+308
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:coarse_dirt"
- }
- }
- },
- //表層厚度較厚時生成灰壤
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:surface",
- "min_threshold": -0.11515151515151514,
- "max_threshold": 1.7976931348623157e+308
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:podzol",
- "Properties": {
- "snowy": "false"
- }
- }
- }
- }
- ]
- }
- },
- //冰刺之地表面為雪
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:ice_spikes"
- ]
- },
- "then_run": {
- "type": "minecraft:condition",
- "if_true": //用於雕刻器的條件,詳見§ 註釋。
- {
- "type": "minecraft:water",
- "offset": 0,
- "surface_depth_multiplier": 0,
- "add_stone_depth": false
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:snow_block"
- }
- }
- }
- },
- //紅樹林沼澤地表面為泥
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:mangrove_swamp"
- ]
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:mud"
- }
- }
- },
- //蘑菇地表面為菌絲
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:mushroom_fields"
- ]
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:mycelium",
- "Properties": {
- "snowy": "false"
- }
- }
- }
- },
- //預設表面為草地
- {
- "type": "minecraft:sequence",
- "sequence": [
- {
- "type": "minecraft:condition",
- "if_true": //用於雕刻器的條件,詳見§ 註釋。
- {
- "type": "minecraft:water",
- "offset": 0,
- "surface_depth_multiplier": 0,
- "add_stone_depth": false
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:grass_block",
- "Properties": {
- "snowy": "false"
- }
- }
- }
- },
- {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:dirt"
- }
- }
- {
- ]
- }
- ]
- }
- ]
- }
- }
- },
- //淺水下的表層(包括表面),以及上方沒有液體的表層(不包括表面,因為在上方已經處理過表面)。以及部分生物羣落表層下的附加表層。
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:water",
- "offset": -6,
- "surface_depth_multiplier": -1,
- "add_stone_depth": true
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //盆地,詳見§ 註釋。
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:stone_depth",
- "offset": 0,
- "surface_type": "floor",
- "add_surface_depth": false,
- "secondary_depth_range": 0
- },
- "then_run": {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:frozen_ocean",
- "minecraft:deep_frozen_ocean"
- ]
- },
- "then_run": {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:hole"
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:water",
- "Properties": {
- "level": "0"
- }
- }
- }
- }
- }
- },
- //表層
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:stone_depth",
- "offset": 0,
- "surface_type": "floor",
- "add_surface_depth": true,
- "secondary_depth_range": 0
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //冰峯表層為冰、雪和冰磚
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:frozen_peaks"
- ]
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //背陽的陡峭斜坡生成冰磚
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:steep"
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:packed_ice"
- }
- }
- },
- //大部分為冰磚
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:packed_ice",
- "min_threshold": -0.5,
- "max_threshold": 0.2
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:packed_ice"
- }
- }
- },
- //偶爾生成冰,較為罕見
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:ice",
- "min_threshold": -0.0625,
- "max_threshold": 0.025
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:ice"
- }
- }
- },
- //不在水面下時為雪
- {
- "type": "minecraft:condition",
- "if_true": //上方為空氣,或者與空氣方塊間隔了一些非液體的方塊
- {
- "type": "minecraft:water",
- "offset": 0,
- "surface_depth_multiplier": 0,
- "add_stone_depth": false
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:snow_block"
- }
- }
- }
- ]
- }
- },
- //雪坡表層為幼雪、雪和石頭
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:snowy_slopes"
- ]
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //背陽的陡峭斜坡生成石頭
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:steep"
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:stone"
- }
- }
- },
- //不在水面下時偶爾生成幼雪
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:powder_snow",
- "min_threshold": 0.45,
- "max_threshold": 0.58
- },
- "then_run": {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:water",
- "offset": 0,
- "surface_depth_multiplier": 0,
- "add_stone_depth": false
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:powder_snow"
- }
- }
- }
- },
- //不在水面下時為雪
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:water",
- "offset": 0,
- "surface_depth_multiplier": 0,
- "add_stone_depth": false
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:snow_block"
- }
- }
- }
- ]
- }
- },
- //尖峯表層為石頭
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:jagged_peaks"
- ]
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:stone"
- }
- }
- },
- //雪林表層為幼雪和泥土
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:grove"
- ]
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //不在水面下時偶爾生成幼雪,較為罕見
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:powder_snow",
- "min_threshold": 0.45,
- "max_threshold": 0.58
- },
- "then_run": {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:water",
- "offset": 0,
- "surface_depth_multiplier": 0,
- "add_stone_depth": false
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:powder_snow"
- }
- }
- }
- },
- //預設為泥土
- {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:dirt"
- }
- }
- ]
- }
- },
- //某些生物羣落表層為沙或石頭
- {
- "type": "minecraft:sequence",
- "sequence": [
- //石峯表層為方解石和石頭
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:stony_peaks"
- ]
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //偶爾生成方解石
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:calcite",
- "min_threshold": -0.0125,
- "max_threshold": 0.0125
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:calcite"
- }
- }
- },
- //預設為石頭
- {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:stone"
- }
- }
- ]
- }
- },
- //石岸表層為砂礫和石頭
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:stony_shore"
- ]
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //偶爾生成砂礫(懸空時為石頭)
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:gravel",
- "min_threshold": -0.05,
- "max_threshold": 0.05
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:stone_depth",
- "offset": 0,
- "surface_type": "ceiling",
- "add_surface_depth": false,
- "secondary_depth_range": 0
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:stone"
- }
- }
- },
- {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:gravel"
- }
- }
- {
- ]
}
- },
- //預設為石頭
- {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:stone"
- }
- }
- ]
- }
- },
- //風襲丘陵地表層在表層厚度較厚時為石頭
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:windswept_hills"
- ]
- },
- "then_run": {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:surface",
- "min_threshold": 0.12121212121212122,
- "max_threshold": 1.7976931348623157e+308
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:stone"
- }
- }
- }
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:warm_ocean",
- "minecraft:beach",
- "minecraft:snowy_beach"
- ]
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //懸空時為砂岩
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:stone_depth",
- "offset": 0,
- "surface_type": "ceiling",
- "add_surface_depth": false,
- "secondary_depth_range": 0
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:sandstone"
- }
- }
- },
- //預設為沙
- {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:sand"
- }
- }
- ]
- }
- },
- //沙漠表層為沙和砂岩
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:desert"
- ]
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //懸空時為砂岩
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:stone_depth",
- "offset": 0,
- "surface_type": "ceiling",
- "add_surface_depth": false,
- "secondary_depth_range": 0
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:sandstone"
- }
- }
- },
- //預設為沙
- {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:sand"
- }
- }
- ]
- }
- },
- //溶洞(雖然很少生成在地表)表層為石頭
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:dripstone_caves"
- ]
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:stone"
- }
- }
- }
- ]
- },
- //風襲熱帶稀樹草原表層在表層厚度較厚時為石頭
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:windswept_savanna"
- ]
- },
- "then_run": {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:surface",
- "min_threshold": 0.21212121212121213,
- "max_threshold": 1.7976931348623157e+308
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:stone"
- }
- }
- }
- },
- //風襲砂礫丘陵地表層為砂礫、石頭和泥土
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:windswept_gravelly_hills"
- ]
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- //表層厚度很厚時生成砂礫(懸空時為石頭)
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:surface",
- "min_threshold": 0.24242424242424243,
- "max_threshold": 1.7976931348623157e+308
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:stone_depth",
- "offset": 0,
- "surface_type": "ceiling",
- "add_surface_depth": false,
- "secondary_depth_range": 0
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:stone"
- }
- }
- },
- {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:gravel"
- }
- }
- {
- ]
- }
- },
- //表層厚度較厚時生成石頭
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:surface",
- "min_threshold": 0.12121212121212122,
- "max_threshold": 1.7976931348623157e+308
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:stone"
- }
- }
- },
- //表層厚度較薄時生成泥土
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:noise_threshold",
- "noise": "minecraft:surface",
- "min_threshold": -0.12121212121212122,
- "max_threshold": 1.7976931348623157e+308
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:dirt"
- }
- }
- },
- //預設(表層厚度很薄時)為砂礫(懸空時為石頭)
- {
- "type": "minecraft:sequence",
- "sequence": [
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:stone_depth",
- "offset": 0,
- "surface_type": "ceiling",
- "add_surface_depth": false,
- "secondary_depth_range": 0
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:stone"
- }
- }
- },
- {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:gravel"
- }
- }
- {
- ]
- }
- ]
- }
- },
- //紅樹林沼澤地表層為泥
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:mangrove_swamp"
- ]
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:mud"
- }
- }
- },
- //預設表層為泥土
- {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:dirt"
- }
- }
- ]
- }
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:warm_ocean",
- "minecraft:beach",
- "minecraft:snowy_beach"
- ]
- },
- "then_run": {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:stone_depth",
- "offset": 0,
- "surface_type": "floor",
- "add_surface_depth": true,
- "secondary_depth_range": 6
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:sandstone"
- }
- }
- }
- },
- //沙漠表層下的附加表層為砂岩
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:desert"
- ]
- },
- "then_run": {
- "type": "minecraft:condition",
- "if_true": { //附加表層常常因為極厚而遠超出preliminary_surface。受到"minecraft:above_preliminary_surface"條件的限制,只會在preliminary_surface之上填充砂岩。
- "type": "minecraft:stone_depth",
- "offset": 0,
- "surface_type": "floor",
- "add_surface_depth": true,
- "secondary_depth_range": 30
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:sandstone"
- }
- }
- }
- }
- ]
- }
- },
- //深水下的表面
- {
- "type": "minecraft:condition",
- "if_true": //表面
- {
- "type": "minecraft:stone_depth",
- "offset": 0,
- "surface_type": "floor",
- "add_surface_depth": false,
- "secondary_depth_range": 0
- },
- "then_run": {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:frozen_peaks",
- "minecraft:jagged_peaks"
- ]
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:stone"
- }
- }
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:biome",
- "biome_is": [
- "minecraft:warm_ocean",
- "minecraft:lukewarm_ocean",
- "minecraft:deep_lukewarm_ocean"
- ]
- },
- "then_run": {
- "type": "minecraft:sequence",
- "sequence": [
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:stone_depth",
- "offset": 0,
- "surface_type": "ceiling",
- "add_surface_depth": false,
- "secondary_depth_range": 0
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:sandstone"
- }
- }
- },
- {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:sand"
- }
- }
- {
- ]
- }
- },
- //預設為砂礫(如果懸空則為石頭)
- {
- "type": "minecraft:sequence",
- "sequence": [
- {
- "type": "minecraft:condition",
- "if_true": {
- "type": "minecraft:stone_depth",
- "offset": 0,
- "surface_type": "ceiling",
- "add_surface_depth": false,
- "secondary_depth_range": 0
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:stone"
- }
- }
- },
- {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:gravel"
- }
- }
- {
- ]
- }
- ]
- }
- }
- ]
- }
- },
- //深板岩層
- {
- "type": "minecraft:condition",
- "if_true": //Y=0及以下為深板岩,Y=8及以上為石頭,中間使用雜訊漸變。
- {
- "type": "minecraft:vertical_gradient",
- "random_name": "minecraft:deepslate",
- "true_at_and_below": {
- "absolute": 0
- },
- "false_at_and_above": {
- "absolute": 8
- }
- },
- "then_run": {
- "type": "minecraft:block",
- "result_state": {
- "Name": "minecraft:deepslate",
- "Properties": {
- "axis": "y"
- }
- }
- }
- }
- ]
}
註釋[編輯 | 編輯原始碼]
盆地在地表規則加入前一直存在於所有生物羣落,在表層深度小於等於0時,地形的表面被直接移除,留下石頭裸露的盆地。而在地表規則加入以來,該地形特徵卻不知為何被限制在冰洋和寒凍深海兩個生物羣落,並且在判斷水面時存在錯誤。在過去的盆地中,當方塊高出海平面時(Y>=63的方塊)為空氣,否則為冰或水(注意當時沒有含水層和雜訊洞穴)。而在目前的原版地表規則中則是在上方沒有水時為空氣,這可能會導致海岸邊出現流動的水。
另外,由於雕刻器程式碼中的一個錯誤,minecraft:water
條件在雕刻器生成時的行為與地形生成時不一致。在地形生成時,offset值是相對於空氣與液體接觸面的偏移值(即空氣方塊的座標)。而在雕刻器生成時,offset值是相對於液體方塊座標的。而又因為雕刻器只在雕刻草地和菌絲時對下方的泥土應用地表規則,遊戲認為草地和菌絲上方不會有水,雕刻後草地和菌絲的位置可能為水,因此泥土上方最多只有一格深的水。因而offset值相當於是相對於泥土上表面的偏移值。
綜上所述,在地形生成時,offset值為0和-1效果相同,都只在上方沒有液體時條件成功。而在雕刻器生成時,offset值若為-1,條件永遠成功,無論上方有無液體。
在地表規則這個功能剛加入遊戲時(21w41a),開發人員沒有意識到雕刻器中的錯誤,在判斷上方是否有水時offset值被設為了-1。因而導致草地可以生成在水下。之後(21w43a和22w07a)為了解決這個問題,又在不能生成在水下的方塊外套了一層offset為0的minecraft:water
條件。因此目前原版主世界地表規則稍顯混亂,但基本能夠按預期工作。
對於數據包和模組開發者來説,應避免把offset設為-1,以保證地形生成與雕刻器生成時行為相同。
生物羣落方案參數[編輯 | 編輯原始碼]
通過數據生成器,可以獲得主世界和地獄維度的生物羣落方案參數。生物羣落方案參數位於generated/reports/biome_parameters/檔案夾內,其中所定義的生物羣落生成在生物羣落頁面有詳細的解釋。
參見[編輯 | 編輯原始碼]
導覽[編輯 | 編輯原始碼]
[隱藏] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|