本站文本内容除另有声明外,转载时均必须注明出处,并遵守CC BY-NC-SA 3.0协议。(转载须知)
本站是中文Minecraft Wiki的镜像站,与Mojang Studios、Weird Gloop没有从属关系。(免责声明)
维度类型
阅读
2026-08-26更新
最新编辑:中文mcwiki机器人
阅读:
更新日期:2026-08-26
最新编辑:中文mcwiki机器人
维度类型(Dimension Type)控制了维度的环境光照、建筑高度等诸多行为。维度类型定义文件是维度类型在数据包中的数据驱动定义文件。
定义格式
维度类型在游戏内使用DIMENSION_TYPE注册表,数据包路径为dimension_type,即所有维度类型定义文件都需要在data/<命名空间>/dimension_type目录下定义,维度类型标签则需要在data/<命名空间>/tags/dimension_type目录下定义。
维度类型定义文件使用JSON格式,并具有下列结构:
- JSON文件根对象
- has_fixed_time:(默认为
false)维度是否逻辑上拥有昼夜更替。详见下文§ has_fixed_time。 - *has_skylight:维度是否具有天空光照,详见下文§ has_skylight。
- *has_ceiling:维度是否具有天花板,详见下文§ has_ceiling。
- *has_ender_dragon_fight:此维度是否可以启动末影龙战斗。
- *ambient_light:维度的环境光照,用于生物生成行走目标值、着色器lightmap等计算。在原版着色器定义下此值应只在0至1之间取值。
- *coordinate_scale:(0.00001≤值≤30000000.0)维度的坐标缩放值,影响下界传送门的传送和
/execute in ...的行为。 - *infiniburn:维度内火能在哪些方块上永久燃烧。可以为一个方块ID、一个方块标签的ID或一个方块ID的列表。
- *min_y:(-2032≤值≤2031,必须为16的倍数)维度可以存在方块的最低高度。因值必须为16的倍数,故此字段可用最大值为2016。
- *height:(16≤值≤2032 - *min_y,必须为16的倍数)维度可以存在方块的总高度。
- *logical_height:(0≤值≤*height)维度的逻辑高度,紫颂果的传送和游戏创建的下界传送门不会超过此高度。
- *monster_spawn_block_light_limit:(-0≤值≤15)怪物生成位置的最大方块光照。
- *monster_spawn_light_level:(-0≤值≤15)怪物生成位置的最大光照,使用内部天空光照计算,但雷暴时天空光照视为天空光照减10。若指定一个范围,则游戏每次尝试生成时都会采样一次。
- attributes:维度的环境属性映射。如果有多个相同的环境属性,则游戏只使用最后一个值。
- <环境属性ID>:一项环境属性及其对应的值,详见环境属性。
- timelines:维度活动的时间线。可以为时间线的ID、时间线的标签或一个时间线ID的列表。如果多个时间线对同一个环境属性的变化进行了定义,则游戏只使用最后一个时间线定义的环境属性。
- skybox:(默认为
overworld)维度的天空盒。取值可以为none(无效果)、end(每隔一段时间出现末地闪光,使用世界时钟时间计算)、overworld(天空可以渲染太阳、月亮、星星等天体和日出日落效果)。 - cardinal_light:(默认为
default)维度的方块光照类型,取值可以为default和nether。与默认值相比,nether会使shade为false的方块的顶面和底面亮度降低10%而不是0和50%,而流体和shade为true的方块的所有面的亮度降低10%,详见模型 § 模型元素。 - default_clock:(命名空间ID)此维度所使用的世界时钟。不存在时在此维度不存在世界时钟。
- has_fixed_time:(默认为
定义行为
维度类型仅在服务端启动时加载一次,使用/reload命令不可以使维度类型定义被重新加载,而必须重启服务端。
尽管游戏支持在数据包和level.dat中对维度类型内联定义,但游戏不支持加载内联维度类型的维度。[1]
维度类型控制了维度内所有与世界生成无关的效果,包括建筑高度限制、环境效果和部分方块或生物的行为等。
维度行为
下列为维度类型里较复杂的维度效果,对应的游戏行为均假定已满足其他条件。其余不由维度类型控制的维度行为见§ 其他行为。
has_fixed_time控制了维度逻辑上是否拥有昼夜更替。注意:此值不控制太阳的东升西落、亮度的昼夜变化等视觉上的行为,它仅会使部分生物对昼夜更替的判定失效,例如:
- 玩家在任意游戏时间使用床时均会尝试入睡。(本质上是影响环境属性
gameplay/bed_rule的when_dark条件) - 溺尸始终保持敌对状态。
- 流浪商人不再饮用隐身药水或奶桶。
- 灾厄巡逻队始终可以尝试生成。
- 末影人始终不会增加随机传送的概率。
- 狐狸始终不会前往村庄或尝试睡觉。
- 僵尸围城始终可以尝试生成。
- 部分亡灵生物不会尝试躲避阳光。
has_skylight控制了下列行为:
has_ceiling控制了下列行为:
- 初始动物生成寻找可生成方块时,其不会在对应的高度图选择方块,而是在对应高度图的高度上向下搜寻到首个上方为空气的非空气方块上选择方块。
- 玩家是否倾向于生成在Y=64上,而不是生成在最高的方块上。但如果世界是超平坦世界,依然会生成在最顶层。
- 影响部分地图更新行为。
- 是否不拥有天气变化。
其他行为
一些维度行为被游戏硬编码,无法被修改。
为便于描述,规定overworld维度为主世界维度,the_nether维度为下界维度,the_end维度为末地维度。游戏以它们的ID为判断依据。
- 玩家总是生成在主世界。
- 下界传送门在非下界维度时会尝试将实体按维度缩放传送到下界维度,如果世界不存在下界维度则什么也不做;在下界维度时会将实体按维度缩放传送到主世界维度。
- 末地传送门在非末地维度时会尝试将实体传送到末地维度,如果世界不存在末地维度则什么也不做;在末地维度时会将实体传送到主世界维度。
- 在末地维度的霜冰依赖方块光照而非内部天空光照融化。
- 末地维度永远不会拥有天气。
- 下界维度的地图的玩家图标会随机旋转。
内置维度类型
游戏本体内置了四种维度类型:
以下为各内置维度类型数据的默认值:
| 属性 | 主世界 | 下界 | 末地 | 主世界洞穴 |
|---|---|---|---|---|
| has_fixed_time | False | True | True | False |
| has_skylight | True | False | True | True |
| has_ceiling | False | True | False | True |
| has_ender_dragon_fight | False | False | True | False |
| ambient_light | 0.0 | 0.1 | 0.25 | 0.0 |
| coordinate_scale | 1.0 | 8.0 | 1.0 | 1.0 |
| min_y | -64 | 0 | 0 | -64 |
| height | 384 | 256 | 256 | 384 |
| logical_height | 384 | 128 | 256 | 384 |
| monster_spawn_light_level | 0-7 | 7 | 15 | 0-7 |
| monster_spawn_block_light_limit | 0 | 15 | 0 | 0 |
| infiniburn | #infiniburn_overworld | #infiniburn_nether | #infiniburn_end | #infiniburn_overworld |
| attributes | 此段内容过长,请通过显示按钮阅读
{
"minecraft:audio/ambient_sounds": {
"mood": {
"block_search_extent": 8,
"offset": 2.0,
"sound": "minecraft:ambient.cave",
"tick_delay": 6000
}
},
"minecraft:audio/background_music": {
"creative": {
"max_delay": 24000,
"min_delay": 12000,
"sound": "minecraft:music.creative"
},
"default": {
"max_delay": 24000,
"min_delay": 12000,
"sound": "minecraft:music.game"
}
},
"minecraft:gameplay/bed_rule": {
"can_set_spawn": "always",
"can_sleep": "when_dark",
"error_message": {
"translate": "block.minecraft.bed.no_sleep"
}
},
"minecraft:gameplay/nether_portal_spawns_piglin": true,
"minecraft:gameplay/respawn_anchor_works": false,
"minecraft:visual/ambient_light_color": "#0a0a0a",
"minecraft:visual/cloud_color": "#ccffffff",
"minecraft:visual/cloud_height": 192.33,
"minecraft:visual/fog_color": "#c0d8ff",
"minecraft:visual/sky_color": "#78a7ff"
}
|
此段内容过长,请通过显示按钮阅读
{
"minecraft:gameplay/bed_rule": {
"can_set_spawn": "never",
"can_sleep": "never",
"explodes": true
},
"minecraft:gameplay/can_start_raid": false,
"minecraft:gameplay/fast_lava": true,
"minecraft:gameplay/piglins_zombify": false,
"minecraft:gameplay/respawn_anchor_works": true,
"minecraft:gameplay/sky_light_level": 4.0,
"minecraft:gameplay/snow_golem_melts": true,
"minecraft:gameplay/water_evaporates": true,
"minecraft:visual/ambient_light_color": "#302821",
"minecraft:visual/default_dripstone_particle": {
"type": "minecraft:dripping_dripstone_lava"
},
"minecraft:visual/fog_end_distance": 96.0,
"minecraft:visual/fog_start_distance": 10.0,
"minecraft:visual/sky_light_color": "#7a7aff",
"minecraft:visual/sky_light_factor": 0.0
}
|
此段内容过长,请通过显示按钮阅读
{
"minecraft:audio/ambient_sounds": {
"mood": {
"block_search_extent": 8,
"offset": 2.0,
"sound": "minecraft:ambient.cave",
"tick_delay": 6000
}
},
"minecraft:audio/background_music": {
"default": {
"max_delay": 24000,
"min_delay": 6000,
"replace_current_music": true,
"sound": "minecraft:music.end"
}
},
"minecraft:gameplay/bed_rule": {
"can_set_spawn": "never",
"can_sleep": "never",
"explodes": true
},
"minecraft:gameplay/respawn_anchor_works": false,
"minecraft:visual/ambient_light_color": "#3f473f",
"minecraft:visual/fog_color": "#181318",
"minecraft:visual/sky_color": "#000000",
"minecraft:visual/sky_light_color": "#ac60cd",
"minecraft:visual/sky_light_factor": 0.0
}
|
此段内容过长,请通过显示按钮阅读
{
"minecraft:audio/ambient_sounds": {
"mood": {
"block_search_extent": 8,
"offset": 2.0,
"sound": "minecraft:ambient.cave",
"tick_delay": 6000
}
},
"minecraft:audio/background_music": {
"creative": {
"max_delay": 24000,
"min_delay": 12000,
"sound": "minecraft:music.creative"
},
"default": {
"max_delay": 24000,
"min_delay": 12000,
"sound": "minecraft:music.game"
}
},
"minecraft:gameplay/bed_rule": {
"can_set_spawn": "always",
"can_sleep": "when_dark",
"error_message": {
"translate": "block.minecraft.bed.no_sleep"
}
},
"minecraft:gameplay/nether_portal_spawns_piglin": true,
"minecraft:gameplay/respawn_anchor_works": false,
"minecraft:visual/ambient_light_color": "#0a0a0a",
"minecraft:visual/cloud_color": "#ccffffff",
"minecraft:visual/cloud_height": 192.33,
"minecraft:visual/fog_color": "#c0d8ff",
"minecraft:visual/sky_color": "#78a7ff"
}
|
| timelines | #in_overworld | #in_nether | #in_end | #in_overworld |
| skybox | overworld | none | end | overworld |
| cardinal_light | none | nether | none | none |
| default_clock | overworld | none | the_end | overworld |
历史
| Java版 | |||||||
|---|---|---|---|---|---|---|---|
| 1.16 | pre1 | 向数据包中加入了维度类型。 | |||||
| 1.16.2 | pre1 | 维度类型从data/minecraft/dimension_type/<命名空间>/<路径>移动到data/<命名空间>/dimension_type/<路径>,和其他资源保持一致。
| |||||
| pre2 | 加入了coordinate_scale字段。 | ||||||
| 移除了shrunk字段。 | |||||||
| 1.17 | 20w49a | 加入了min_y和height字段。 | |||||
| 21w05a | 将min_y字段的有效区间从-2048到2047调整为-2032到2031。 | ||||||
| 将height字段的有效区间从0到4096调整为16到4064。 | |||||||
| 1.18.2 | 22w06a | 现在infiniburn的值需要有#前缀。
| |||||
| 1.19 | 22w11a | 现在游戏会对维度进行验证,若使用了内联的维度类型将不再尝试加载。 | |||||
| pre1 | 加入了monster_spawn_block_light_limit和monster_spawn_light_level字段。 | ||||||
| 1.21.4 | pre1 | 现在natural不再控制时钟和指南针是否不会随机转动。 | |||||
| 1.21.6 | 25w15a | 加入了cloud_height字段用以控制维度的云层高度,此前这项硬编码于effects内。 | |||||
| 1.21.11 | 25w42a | 加入了attributes以指定维度环境属性。 | |||||
移除了ultrawarm,其功能由环境属性visual/default_dripstone_particle、gameplay/water_evaporates和gameplay/fast_lava取代。
| |||||||
移除了bed_works,其功能由环境属性gameplay/bed_rule取代。
| |||||||
移除了respawn_anchor_works,其功能由环境属性gameplay/respawn_anchor_works取代。
| |||||||
移除了cloud_height,其功能由环境属性visval/cloud_height取代。
| |||||||
移除了piglin_safe,其功能由环境属性gameplay/piglins_zombify取代。
| |||||||
移除了has_raids,其功能由环境属性gameplay/can_start_raid取代。
| |||||||
将natural控制僵尸猪灵生成的行为转移到环境属性gameplay/nether_portal_spawns_piglin。
| |||||||
将effects控制迷雾效果的行为转移到环境属性visual/extra_fog。
| |||||||
| 25w45a | 加入了timeline、has_fixed_time、skybox和cardinal_light。 | ||||||
移除了natural,其剩余功能被环境属性gameplay/eyeblossom_open和gameplay/creaking_active取代。
| |||||||
| 移除了fixed_time,其控制游戏行为的行为被has_fixed_time取代,而所有与昼夜更替相关的视觉渲染功能被转移到环境属性。 | |||||||
| 移除了effects,其剩余功能已经被拆分为skybox和cardinal_light。 | |||||||
| 26.1 | snapshot-3 | 加入了default_clock字段。 | |||||
| snapshot-4 | 现在end天空盒下末地闪光的计算时间使用世界时钟时间而非游戏时间。
| ||||||
| snapshot-6 | 加入了has_ender_dragon_fight字段以替换the_end维度的维度类型是否是the_end的硬编码检查。
| ||||||
| 26.2 | snapshot-1 | infiniburn字段现在也接受方块ID和方块ID的列表,且不再接受不存在的方块标签。
| |||||
参考
外部链接
导航
| 基本概念 | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 数据包 |
| ||||||||||||
| 资源包 | |||||||||||||
| 相关条目 | |||||||||||||
| 官方工具 | |||||||||||||
| 相关教程 | |||||||||||||
| 参考实例 |
| ||||||||||||

沪公网安备 31011002002714 号