描述
Just Enough Dimensions(以下简称 JED)是一个允许向游戏中注册新自定义维度的模组,或者也可以仅用于调整和配置现有维度的一些属性。
可以对现有维度进行的一些调整示例包括:
- 使用按维度划分的 World Border(即所有维度不必强制与主世界拥有相同的边界)
- 使用按维度划分的难度(*)、游戏规则、白天时间、昼夜长度、世界种子、天空和/或雾和/或云的颜色或云层渲染高度
* 由于部分原版代码的工作方式,单玩家模式下的按维度难度设置存在问题。但在多人服务器中应能正常工作。
从版本 1.6.0-dev.??? 开始,还可以使用 JED 在世界首次创建时强制应用某些设置。这些设置包括生成器设置的 WorldType(例如制作超平坦世界或虚空世界 [这也是一种超平坦形式]),或设置某些游戏规则。(这在 1.6.0 之前也能工作,但方式不完全相同,也不够简洁。)
注意: 由于原版和 Forge 处理维度 ID(以及 WorldProvider)的方式,以及因渲染相关的自定义选项,此模组不仅需要在服务端运行,也必须在客户端安装。
配置文件位置
所有的维度注册和配置均通过位于 config/justenoughdimensions/dimensions.json 的简单(?) JSON 配置文件完成。此外,还有一些“全局”配置和启用特定功能的开关选项,这些通过位于 config/justenoughdimensions/justenoughdimensions.cfg 的配置文件进行设置,下文将称之为 JED 主配置文件。
还支持按世界存档的配置(以便在同一游戏实例或整合包中的不同世界中使用不同的设置)。
在这种情况下,配置文件将位于世界目录内,分别为 <worlddirectory>/justenoughdimensions/dimensions.json 和 <worlddirectory>/justenoughdimensions/justenoughdimensions.cfg。
如果这些文件存在,并且在全局 JED 主配置(位于普通配置目录内)中启用了按世界配置功能,则这些文件的优先级高于配置目录中的普通配置文件。
配置文件结构概览
本节描述配置文件结构的粗略概览。更详细的说明在下方。
提示:我的 pastebin 上有大量各种各样的示例配置,地址如下:masa's pastebin。
JED 主配置文件 justenoughdimensions.cfg
JED 主配置文件包含一些开关选项,用于启用特定功能和覆盖项,其中一些(如 B:enableOverrideWorldProvider=true)对于模组的大多数配置选项实际生效至关重要。
另一个重要(或至少极其有用)的选项是 B:enableLoggingInfo=true。建议在 模组打包开发或 JED 配置测试期间始终启用此选项。
启用此选项后,JED 将在游戏控制台/日志中打印大量(虽然不至于超级刷屏……)有用的调试信息,这将帮助你了解 JED 正在做什么(或未做什么),以及在何时使用了哪些值。
主配置文件还包含启用按世界存档配置功能的选项。这些选项需要在“全局” JED 主配置中启用,模组才会尝试从按世界的位置读取配置。
维度配置文件 dimensions.json
dimensions.json 配置文件是 JED 用来知晓如何处理维度的唯一配置文件。
你想要注册或以某种方式配置的每个维度都需要在此配置中进行定义和描述。
该配置的主要结构是包含一个名为 dimensions 的维度定义 JSON 数组,以及可选的 config_version 对象(与按世界存档配置处理相关,在大多数情况下你可以忽略并省略它)。
dimensions 数组中的每一项都应是一个 JSON 对象,描述针对该给定维度要执行的操作。
每个维度条目中最常见且最重要的键(配置值名称)包括:
dim (int) - 此条目对应的 (Forge) 维度 ID
dimensiontype (object) - 定义要注册的维度类型。
override (boolean) - 启用覆盖现有维度
worldinfo (object) - 存储在 level.dat 文件中的所有值
worldinfo_onetime (object) - 与 worldinfo 相同,但仅在首次加载维度时应用一次
- 注意: 在大多数情况下,你希望使用
worldinfo_onetime 而不是 worldinfo!
jed (object) - 此对象包含大多数 JED 特定的选项
详见下方的更详细描述及其余选项的完整列表。
详细配置说明
dimensions.json 顶层键
本节描述维度配置对象中的“顶层”键/选项(即不嵌套在其他对象内部的选项)。
其中一些本身就是对象,另一些(读作:jed)包含众多可能的子键/选项,这些将在下方单独描述。
请注意,此处所有 boolean 类型的选项默认值为 false,如果你不想使用它们,无需指定。
其他选项基本上也是如此——你不需要指定任何你不打算使用的选项。
需要特别注意的是,如果 worldinfo 或 worldinfo_onetime 的值存在(即使是空对象),则会为该维度启用“WorldInfo 覆盖”功能(有关更多信息,请见下文)。
最常见的选项
dim (int) - 此条目所属的(Forge)维度 ID。这是一个整数值,每个维度的该值都是唯一的。每个维度配置条目都必须包含此值,否则由于未指向任何维度,该条目将不起作用。原版维度 ID 为:主世界(The Overworld)是 0,下界(The Nether)是 -1,末地(The End)是 1。
dimensiontype (object) - 定义要注册的维度类型。
- 如果你想注册一个新维度,或替换/覆盖现有维度,则维度条目应包含此值
- 如果你只是覆盖某个已存在(原版或其他模组)维度的部分设置,而不覆盖整个维度,则不需要此值
- 这个
DimensionType 对象(在 MCP 映射中如此称呼)仅定义了维度的一小部分基本设置:
id (int) - “维度类型 ID”(在原版中它是唯一的维度 ID,但在 Forge 下它独立于“实际维度 ID”,且此“维度类型 ID”无需唯一)
name (string) - 维度的名称。这对许多功能来说并不重要,主要仅在传送相关物品和事物中可见。
keeploaded (boolean) - 是否允许卸载维度的出生点区块。
- 请注意,这不是一个区块加载选项。它控制的是原版出生点区块的行为(想象一下主世界的出生点区块)。
- 基本上,如果此项为
true,则在某些东西加载了它们之后,出生点区块不允许卸载。
- 此选项不会自动加载它们。也不会让没有玩家在相同维度(针对方块实体)或附近(针对实体)时区块继续 ticking。
worldprovider (string) - 这是这里最重要的选项。它是所用 WorldProvider 的类名。在许多情况下,你希望使用三种 JED WorldProvider 变体之一,而大多数(但非全部)jed 对象内的配置选项都需要这些变体才能生效。
require_exact_match (boolean) - 这是一个 JED 选项,控制是否需要所有值的精确匹配,或者 JED 是否可以使用预注册的、具有不同 name 和 id 的常见 DimensionType 实例。
- 名称和 ID 通常不那么重要,因此重用这些预注册的实例可以避免一些在游戏启动后注册的
DimensionType 条目无法正常工作的问题。
- 据称导致此类问题的一个原因是安装了 Optifine。这是因为原版代码中的
DimensionType 是一个 Java 枚举,不应在运行时修改。因此,向其中添加新条目可能无效,因为 JIT 可能已经优化掉了 values() 方法以返回之前固定的值列表。而且据称 Optifine 会频繁调用 values() 方法,导致 JIT 很快将其优化掉。这意味着在游戏启动一段时间后尝试注册新维度将不再有效。出于这个原因,JED 会预先注册少量 DimensionType 值,并在可能时使用它们(重要的是 worldprovider 值和 keeploaded 值必须匹配,因为这些会显著改变行为。)
override (boolean) - 如果为 true,且已存在具有此 ID 的维度,则该维度将被此维度覆盖。使用 dimensiontype 选项来定义要注册的维度类型。
worldinfo (object) - 可以设置原版保留在 WorldInfo 类(MCP 名称)中的任何值。
- 如果存在此值(或
worldinfo_onetime),也会为此维度启用“WorldInfo 覆盖”功能。如果没有覆盖,除了主世界之外,这些值对大多数维度都不会产生影响。
- 这些值存储在原版的
level.dat 文件中,或由 JED 存储在 jed_level.dat 文件中。
- 这些值包括:维度的出生点、世界种子(
RandomSeed)、世界类型(generatorName)和世界生成器设置(generatorOptions)、难度、游戏规则、游戏类型(游戏模式)、时间设置、天气计数器、世界边界设置以及其他一些设置。所有选项的完整列表见下文。
worldinfo_onetime (object) - 与 worldinfo 相同,但值仅在维度第一次加载时应用一次。
- 在大多数情况下,你应该使用此选项而不是
worldinfo
- 只有在以下情况下才需要使用
worldinfo 而不是 worldinfo_onetime:
- 如果你确实希望在每次加载维度时重置这些设置
- 如果服务器运行的是 Sponge,那么
generatorName 和 generatorOptions 值会在后续的维度加载中被重置(出于某种原因),因此你需要每次都使用 worldinfo 来设置它们
jed (object) - 此对象可以容纳大量不同的 JED 特定选项,用于配置维度的行为和属性。可能的选项完整列表见下文。
- 此对象内的大多数(但非全部)选项要求维度使用 JED 的 WorldProvider 变体之一。这是因为许多配置是通过用检查 JED 维度配置中是否定义了该值的变体重写
WorldProvider 类中的原版方法来实现的,如果没有定义,则继续使用原版行为。
其余选项(可能较少使用)
biome (string) - 如果存在此选项,JED 将强制该维度使用原版的单生物群系 BiomeProviderSingle。
- 该维度各处将仅有一个单一的生物群系。而且,你不能在这里指定多个生物群系。我知道许多用户希望具备该功能,但原版的单生物群系提供程序正是如此——即整个维度始终为同一个单一生物群系。
biomeprovider (string) - 强制使用指定的 BiomeProvider 类。
- 请注意,这可能有其局限性,因为模组化的 BiomeProvider 可能会使用自定义构造函数,这意味着 JED 不知道如何创建其实例。
- 这主要是为了与 Painted Biomes 模组有更好的兼容性。对于该模组,请使用值
fi.dy.masa.paintedbiomes.world.BiomeProviderPaintedBiomes。
chunkgenerator (string) - 使用给定的类覆盖 ChunkGenerator。
disable_teleporting_from (boolean) - 如果为 true,则使用 Forge 传送事件来取消所有 来自 此维度的传送。
- 请注意,并非所有模组都会使用/尊重该事件,传送命令仍将有效。
disable_teleporting_to (boolean) - 如果为 true,则使用 Forge 传送事件来取消所有 前往 此维度的传送。
- 请注意,并非所有模组都会使用/尊重该事件,传送命令仍将有效。
load_on_start (boolean) - 如果为 true,则该维度将比平时更早注册,以便在服务器启动期间由原版/Forge加载该维度。
- 通常你并不希望维度毫无理由地被加载。虽然在某些特殊情况下你可能需要这样做,但默认情况下请省略此项。
normal_biomes (boolean) - 强制该维度使用原版主世界(Overworld)的正常生物群系提供程序。
- 这将允许你在下界(Nether)或末地(End)中获得主世界的生物群系(即世界中保存的生物群系值),然而这些维度使用它们自己的 ChunkGenerator,后者在地形生成时并不关心生物群系。
- 一个更有用的示例是在“超平坦”(superflat)维度中使用此选项,该维度通常使用单生物群系提供程序。因此,你可以在此选项的帮助下在平坦世界中获得正常生物群系。
post_deletion_command (string) - 在临时维度被删除后执行的命令(见下文)。
spawn_structure (object) - 在维度首次加载时,向世界中放置一个结构/蓝图。
temporary_dimension (boolean) - 如果为 true,则该维度旨在成为一个“临时维度”,一旦所有玩家离开该维度且它允许卸载(即没有区块被强制加载),它将被立即删除。这对于某些类型的重置任务维度等可能很有用。
unregister (boolean) - 如果为 true,则将注销现有的维度。
- 注意: 无法注销主世界(Overworld)。因此,原版和模组代码中的许多内容都假设主世界始终处于加载状态,执行此操作会导致游戏完全崩溃。
- 同时,在注销其他原版维度时要小心。如果你注销了下界(Nether)或末地(End),某些模组也会出错。
- 如果你想禁用对原版维度的访问,与其完全注销维度,不如将其覆盖为虚空维度,使用
disable_teleporting_to 选项,并可能设置虚空/天空传送选项,以立即将任何设法进入的玩家传送出去。
world_template (string) - 允许使用模板世界(通过模组配置目录分发),当维度首次加载时,该模板世界会被复制到该维度的存档位置。
- 但是请注意,由于在 1.12.2 及更早版本中,游戏仍使用按世界全局的方块 ID,因此你不能随意对任意维度执行此操作,这些 ID 在每个模组化世界中都可能不同。这基本上意味着你需要从同一个源世界获取每个此类模板维度,以使它们拥有相同的方块 ID,并且你还需要为主世界(即维度 0)提供一个模板,其中包括源世界的
level.dat 文件,其中包含 Forge 方块注册表(以及所有其他注册表)。但随后你还需要一些 worldinfo_onetime 覆盖项,你最可能希望将世界时间重置为零,并很可能随机化世界种子,以防止所有世界相同。此外,你可能应该手动编辑 level.dat 文件以删除玩家数据标签,这样在单人游戏中,玩家就不会总是在同一个地方出生并拥有与原始模板世界中相同的物品栏。
- 因此总结一下:此功能存在问题。在大多数情况下,你可能不想使用它。
dimensions.json -> spawn_structure
spawn_structure 选项允许你指定一个原版结构方块模板文件或蓝图文件,该文件将在维度首次加载时放置在相对于维度出生点的世界中。
蓝图文件应放置在 config/justenoughdimensions/structures/name.<schematic | nbt>,例如 config/justenoughdimensions/structures/spawn_house.nbt。
蓝图可以通过以下任一选项创建:
我推荐要么使用 World Primer 要么使用 Litematica,虽然我在这点上可能有点偏颇……但原版结构方块确实存在上述尺寸限制,我不记得 Schematica 模组是否有此限制,或者是否能够以原版格式保存。
实际上,这两种结构格式都不是最佳选择。但我尚未添加对 Sponge 结构格式或 Litematica 结构格式的支持(目前)。
原版格式在内存使用上极其低效,当体积超过大约 100x100x100 方块时,你就会遇到严重的内存占用问题以及服务器崩溃。
而旧的 *.schematic 格式无法很好地适应游戏中大量方块的情况,它仍然依赖于旧的“魔法元数据”。如果你使用 NEID、JEID 或其他工具将方块 ID 数量扩展到 0..4095 范围之外,该格式将无法正常工作。
因此简要总结如下:如果你的结构较小(例如体积在 100x100x100 方块以下),或者你使用了 NEID、JEID 或其他工具来扩展方块 ID 范围,请使用原版 *.nbt 格式。否则,你可以使用 *.schematic 格式以获得更好的内存效率和性能。
下面是一个类似“伪 JSON”的示例,展示了可能的键和值(主要用于旋转和镜像选项):
"spawn_structure": {
"name": "spawn_house.nbt",
"rotation": "<none | cw_90 | cw_180 | ccw_90>",
"mirror": "<none | left_right | front_back>",
"centered": <true | false>,
"offset": [0, -4, 0],
"load_around": 16
}
rotation 和 mirror 选项默认均为 none,因此如果你不需要旋转结构,则无需指定它们。centered 默认为 false,但它通常是一个很有用的选项,因为它会将结构水平居中到维度的出生点(加上指定的 offset)。offset 选项允许你相对于维度的出生点移动结构。
load_开始加载 选项指定在开始放置结构之前,应预先加载结构区域周围多少个方块(向上取整至完整区块)。这有助于避免地形生成破坏刚刚放置的结构,当相邻区块被加载并形成触发中间 16x16 方块生成的 2x2 已加载区块区域时。
这是一个实际有效的示例。由于未使用镜像功能,省略了 mirror 选项。
"spawn_structure": {
"name": "spawn_house.nbt",
"rotation": "cw_90",
"centered": true,
"offset": [12, -9, -8],
"load_around": 16
}
JED 选项
请注意,这些选项中大多数需要配合自定义的 JED WorldProvider 才能生效。
待办:添加一个无需 JED WorldProvider 即可工作的选项列表。
-
AverageGroundLevel (int) - ?
-
CanDoLightning (boolean) - 启用/禁用闪电(以及骷髅陷阱马)
-
CanDoRainSnowIce (boolean) - 启用/禁用水结冰,以及下雪和下雨时容器(如锅)中注水。
- 下雪和容器注水还取决于
HasSkyLight,以确保天气/降雨首先发生。
-
CanRespawnHere (boolean) - 玩家死亡后是否可以在该维度重生
-
CanSleepHere (string) - 可选值之一:allow、deny 或 bed_explodes
-
CanSpawnHostiles (boolean) - 使用此值覆盖基于正常难度的生物生成行为(和平模式 vs. 其他模式)
-
CanSpawnPeacefulMobs (boolean) - 覆盖默认值,在硬核模式和单人游戏中默认为 true,而在服务器上则取决于 server.properties 中的 spawn-animals 设置
-
CelestialAngleMin (float, 0.0 .. 1.0) - 使用自定义的天体角度范围(需同时设置最小值和最大值才能生效)
-
CelestialAngleMax (float, 0.0 .. 1.0) - 使用自定义的天体角度范围(需同时设置最小值和最大值才能生效)
-
ChunkGenFactoryWorldProvider (string) - 维度加载期间的临时 World Provider 覆盖,仅用于从模组创建 ChunkGenerator,随后将与其他 World Provider 配合使用
-
CloudColor (hex color string) - 云朵的颜色
-
CloudHeight (int) - 云朵的渲染高度
-
CloudRenderer (string) - 自定义云渲染器类的完全限定类名
-
CustomDayCycle (boolean) - 启用自定义昼夜周期长度。在 DayLength 和 NightLength 中设置白天和夜晚的长度。
-
DayCycleIncrement (int, default = 24000) - 在使用 DayTimeMin 和 DayTimeMax 选项时,每个昼夜周期世界时间增加的刻数。
-
DayLength (int) - 自定义白天长度,如果 CustomDayCycle 为 true
-
DayTimeMin (int, 0 - 23999) - 使用自定义的世界时间范围。这可能会与某些功能产生奇怪的效果……需要同时设置最小值和最大值才能生效。
-
DayTimeMax (int, 0 - 23999) - 使用自定义的世界时间范围。这可能会与某些功能产生奇怪的效果……需要同时设置最小值和最大值才能生效。
-
DisableDawnDuskColors (boolean) - 禁用地平线处的日出和日落天空/雾气着色
-
DisableEnderDragon (boolean) - 用虚拟类覆盖 DragonFightManager,禁用与龙相关的内容。需要 WorldProviderEndJED。
-
DisableEndSpikes (boolean) - 使用 ChunkGeneratorEndJED,这会禁用末地尖刺(黑曜石塔)的生成。需要 WorldProviderEndJED。
-
DontAdvanceWeatherWhenSleeping (boolean) - 防止玩家睡觉度过夜晚时清除天气
-
FogColor (hex color string) - 雾效的颜色。
-
FoggyBiomes (object) - 定义哪些生物群系有雾或无雾。详见下文。
-
ForceGameMode (boolean) -
-
GenerateFallbackSpawnBlock (boolean) - 如果为 true 且 JED 找到的出生点位置在半空中(虚空维度),则在出生点正下方放置一个玻璃方块
-
HasSkyLight (boolean) - 影响天气和光照计算等事物
-
HasXZFog (boolean) - 玩家周围将渲染(浓)雾
-
Horizon (float) - 地平线的高度(用于天空渲染)
-
IgnoreSpawnSuitability (boolean) - 如果为 true,在寻找维度的出生点时,不检查生物群系的出生适宜性,也不尝试寻找草方块作为出生点(在 overworld 出生点搜索类型中)
-
IsSurfaceWorld (boolean) - 指南针和时钟模型,启用云层和天空渲染,启用(原版)睡眠,启用猪人通过传送门生成
-
LightBrightness (array of exactly 16 floats) -
-
MoonColor (hex color string) - 月亮的颜色
-
MoonScale (float) - 月亮渲染的缩放因子
-
MovementFactor (float) - 下界传送门的缩放因子
-
MusicType (string) - 该维度应使用的环境音乐类型。你可以在 TellMe 模组的 musictype dump 中获取可用值的列表。
-
NightLength (int) - 自定义夜晚长度,如果 CustomDayCycle 为 true
-
PlayerInventoryGroup (string) - 如果启用了 JED 的玩家物品栏交换,则该维度应使用的物品栏组。
-
RespawnDimension (int) - 如果 CanRespawnHere 为 false,则在该维度重生
-
ShouldClientCheckLight (boolean) - 客户端是否应检查/重新计算接收到的区块中的光照数据
-
SkyBlend (float) - ?
-
SkyColor (hex color string) - 天空的颜色
-
SkyDisableFlags (int) - 一个位掩码,用于禁用太阳、月亮或星星,如果使用 SkyRenderType ??。(0x1, 0x2, 0x4)
-
SkyLightBlend (float) - 允许控制天空颜色与光照级别的混合,从而即使在夜间也能拥有彩色的天空。范围:0.0 - 1.0,默认值 = 1.0(正常光照混合)。
-
SkyRenderer (string) - 自定义天空渲染器类的完全限定类名
-
SkyRenderType (int) -
-
SpawnPointSearchType (object) - 允许自定义出生点搜索代码的行为及其使用的算法
-
SunBrightness (float) - ?
-
SunBrightnessFactor (float) - ?
-
SunColor (hex color string) - 太阳的颜色
-
SunScale (float) - 太阳渲染的缩放因子
-
VoidTeleportInterval (int) - 游戏刻数的间隔,用于定期检查实体是否需要从虚空或使用 void_teleport 和 sky_teleport 选项从天空传送出去。默认值为 40 刻(2 秒)。
-
WaterVaporizes (boolean) - 覆盖水是否应蒸发(在水桶使用和冰块融化时,如下界中的情况)
-
WeatherRenderer (string) - 自定义天气渲染器类的完全限定类名
-
WorldBorderCenteredOnSpawn(布尔值)- 如果设为 true,且该维度使用了 WorldInfo 覆盖配置,则世界边界将居中于该维度的出生点。
-
WorldProviderOverride(字符串)- 允许在不使用带有正确提供者的自定义 DimensionType 条目的情况下,“手动”覆盖 WorldProvider。
jed -> SpawnPointSearchType
此选项允许你指定出生点搜索算法以及允许的 Y 轴范围。
对于使用 WorldInfo 覆盖的任何维度,都会自动执行出生点搜索。这是为了确保如果玩家被传送至该维度的出生点,该位置将是一个安全地点。如果你不希望进行此搜索,请使用类型 none。
type (string) - 可选值:overworld、cavern 或 none。默认情况下,cavern 类型用于下界维度。none 会跳过对该维度的出生点搜索,并使用主世界的出生点。
min_y (int) - 搜索的最低 Y 坐标。在 cavern 类型中默认为 30,在 overworld 类型中默认为 1。
max_y (int) - 搜索的最高 Y 坐标。在 cavern 类型中默认为 120,在 overworld 类型中默认为当前区块最高填充部分的顶部 + 1。
示例:
"SpawnPointSearchType": {
"type": "cavern",
"min_y": 40,
"max_y": 100
}
jed -> sky_teleport 和 void_teleport 选项
天空传送(sky teleport)和虚空传送(void teleport)功能允许你在实体超出或低于指定的 Y 高度限制时,将该实体从维度中传送走。
当实体移动到配置好的 trigger_y Y 高度上方时,触发天空传送变体。
当实体移动到配置好的 trigger_y Y 高度下方时,触发虚空传送变体。
以下是一个展示可用选项的“伪 JSON”示例:
"<sky | void>_teleport": {
"dimension": 10,
"trigger_y": -10,
"find_surface": <true | false>,
"remove_fall_damage": <true | false>,
"fall_distance": 4.5,
"min_health_left": 1,
"teleport_type": "<same_location | fixed_location | spawn | scaled_location | relative_location | scaled_relative_location>",
"scale": [8, 1, 8],
"fixed_location": [256, 64, 256],
"relative_location": "~ 256 ~+32"
}
dimension (int) - 实体将被传送到的目标维度
trigger_y (int) - 触发送传的 Y 高度限制。(天空 = 高于此值,虚空 = 低于此值)
find_surface (boolean) - 如果为 true,则传送代码会将实体放置在地面(配置位置的上方或下方),而不是精确放置在配置的位置。
remove_fall_damage (boolean) - 是否在传送时完全移除摔落伤害。(这之前是怎么工作的?如果实体在传送后再次坠落怎么办?)
fall_distance (float) - 如果不存在 remove_fall_damage 但存在此键/值对,则该值将在处理传送时的摔落伤害时被用作摔落距离
min_health_left (int) - 如果存在此值,则将限制最大摔落伤害/距离,使得剩余血量为此数值
teleport_type (string) - 可选值:same_location、fixed_location、spawn、scaled_location、relative_location、scaled_relative_location
same_location - 实体将被传送至目标维度中与触发传送时相同的坐标
fixed_location - 实体将被传送至目标维度中给定的固定精确位置
spawn - 实体将被传送至目标维度的出生点
scaled_location - 实体将被传送至一个位置,该位置是根据 scale 中给出的缩放因子对其当前坐标进行缩放后的结果。
relative_location - 实体将被传送至一个相对于其当前位置的位置。你可以在 relative_location 中指定原版命令风格的相对偏移量。
scaled_relative_location - 实体将被传送至一个既经过缩放又相对于其当前位置的位置。(待办:缩放是在相对偏移之前进行的,对吗?)
scale (包含3个浮点数的数组) - 适用于 scaled_location 和 scaled_relative_location。这是从实体在当前维度中的位置到目标维度中位置的坐标缩放因子。
fixed_location (包含3个整数的数组) - 用于 fixed_location 类型的目标维度中的传送位置。
relative_location (string) - 用于 relative_location 和 scaled_relative_location 类型的原版命令风格相对位置说明符。
以下是一个真实示例:
"void_teleport": {
"dimension": 123,
"trigger_y": -50,
"find_surface": true,
"fall_distance": 7.5,
"teleport_type": "relative_location",
"relative_location": "~ 256 ~"
}
worldinfo 和 worldinfo_onetime 的所有可能选项
generatorName (string) - 该维度使用的 WorldType
- 原版值:
default、default_1_1、flat、amplified、largeBiomes、debug_all_block_states
- Biomes 'O Plenty:
BIOMESOP
generatorOptions (string) - 生成器设置。此处应填入你的“超平坦”(superflat)设置字符串,或原版自定义主世界生成器的设置,或 BoP 的配置文件 JSON 字符串等。
generatorVersion (int) - 某些 WorldType 具有版本标识。在原版中,default WorldType 必须在此处使用 1,否则它将改用 default_1_1 类型。
GameType (int) - 玩家加入时的默认游戏模式。0 = 生存,1 = 创造,2 = 冒险,3 = 旁观者
GameRules (object) - 一个包含键值对的对象(键和值均为字符串),用于设置/覆盖你想要更改的所有游戏规则(从默认值开始)。
MapFeatures (int) - 使用 0 可禁用大多数结构生成。(此维度中将不会生成地牢、女巫小屋、海洋神殿、庄园、下界要塞等结构)
RandomSeed (int 或 string) - 世界种子。可以是直接的数字种子,也可以是一个将被转换为数字种子的字符串。如果未指定,则将使用主世界的相同种子。
- 一种特殊情况是空字符串,JED 会将其视为指示,为此维度生成一个新的随机种子。
SpawnX (int) - 该维度出生点的 X 坐标。你无需指定所有三个坐标。未指定的坐标将会…… ??? 待补充
SpawnY (int) - 同上
SpawnZ (int) - 同上
Time (long) - 该维度的总世界时间。注意,一旦维度创建完成,你不应该更改此值,因为它被各种方块和机制用于计时和延迟,修改它会导致一些功能严重出错。
DayTime (long) - 该维度当前的白天时间。睡觉会将其推进到第二天早晨,使用 /time set xxx 命令可以设置/重置该值。
LastPlayed
LevelName
clearWeatherTime
rainTime
raining (0 | 1) - 当前是否正在下雨
thunderTime
thundering (0 | 1) - 当前是否正在打雷
hardcore (0 | 1) - 此维度是否启用了硬核模式
allowCommands (0 | 1) - 此维度是否允许使用指令
Difficulty
DifficultyLocked (0 | 1) - 是否允许更改难度(这主要用于单人菜单中的难度按钮)
BorderCenterX (int) - 世界边界中心点的 X 坐标
BorderCenterZ (int) - 世界边界中心点的 Z 坐标
BorderSize (int) - 世界边界的大小
BorderSizeLerpTime
BorderSizeLerpTarget
BorderSafeZone
BorderDamagePerBlock
BorderWarningBlocks
BorderWarningTime
Description
Just Enough Dimensions (after this referred to as JED) is a mod that allows registering new custom dimensions to the game, or it can also be used to just tweak and configure some properties of existing dimensions.
A few examples of tweaks that can be done to existing dimensions:
- Use per-dimension World Borders (i.e. all dimensions would not be forced to have the same border as the overworld)
- Use per-dimension difficulty(*), Game Rules, day time, day length, world seed, sky and/or fog and/or cloud colors or the cloud render height
* Per-dimension difficulty is problematic in single player due to how some of the vanilla code works. But it should work no problem on a multiplayer server.
As of version 1.6.0-dev.??? it's also possible to use JED to force certain settings for the world when the world is first being created. These include for example the WorldType of generator settings (for example making a superflat world or a void world [which is also just a form of superflat]), or setting some Game Rules. (This did work before 1.6.0 as well, but not quite the same way and not as cleanly.)
Note: Due to the way that dimension IDs (and WorldProviders) are handled in vanilla and Forge, and also due to the rendering related customization options, this mod is also required on the client side and not only on the server.
Config file locations
All dimension registration and configuration is done via a simple(?) JSON config file located at config/justenoughdimensions/dimensions.json. There are also a number of "global" configs and toggle options to enable certain functionality, these are configured via the config file located at config/justenoughdimensions/justenoughdimensions.cfg, which will be referred to as the JED main config from now on.
There is also support for per-world-save configs (to allow using different settings in different worlds within the same game instance or mod pack).
In that case the config files would be inside the world, at <worlddirectory>/justenoughdimensions/dimensions.json and <worlddirectory>/justenoughdimensions/justenoughdimensions.cfg.
If these files exist, and the per-world configs are enabled in the "global" JED main config (inside the normal config directory), then these ones take precedence over the normal configs inside the config directory.
Config file structure overview
This section describes the rough overview of the config file structure. More detailed descriptions are further down.
Tip: There are a lot of various different example configs on my pastebin, here: masa's pastebin.
JED main config justenoughdimensions.cfg
The JED main config has a few toggle options to enable certain functionality and overrides, some of which (like B:enableOverrideWorldProvider=true) are very important for many of the configuration options the mod has to actually work.
Another important (or at least extremely useful) option is B:enableLoggingInfo=true. I would recommend you to always enable this during mod pack development or JED config testing.
With this option enabled JED will be printing lots of (not super spammy though...) useful debug information to the game console/log, which will help you see what JED is doing (or not doing) and when and using what values.
The main config also has the options to enable the per-world-save config functionality. These need to be enabled in the "global" JED main config for the mod to try to read the configs from the per-world location.
Dimension config dimensions.json
The dimensions.json config file is the (only) config file JED uses to know what to do with dimensions and how.
Every dimension you want to register or configure in some way needs to be defined and described in this config.
The main structure of this config is that there is just one JSON array of dimension definitions, called dimensions, plus the optional config_version object which is related to the per-world-save config handling, and which you can ignore and leave out in most cases.
Each entry in the dimensions array should be a JSON object, which describes what to do for that given dimension.
The most common and most important keys (config value names) inside each dimension entry are:
dim (int) - the (Forge) dimension ID this entry is fo
dimensiontype (object) - This defines what type of dimension to register.
override (boolean) - Enable overriding an existing dimension
worldinfo (object) - All the values stored in the level.dat file
worldinfo_onetime (object) - Same as worldinfo, but only applied once on the first load of the dimension
- Note: In most cases you want to use
worldinfo_onetime instead of worldinfo!
jed (object) - This object holds most JED-specific options
See below for more detailed descriptions, and a full list of the rest of the options.
Detailed config descriptions
dimensions.json top level keys
This section describes the "top level" keys/options inside a dimension config object (which are not nested inside other objects).
Some of these are objects themselves, some (read: jed) with numerous possible contained keys/options themselves, and those will be described separately further down.
Note that all of the boolean type options here default to false, and you don't need to specify them if you don't wan to use them.
And it's basically the same with all other options - you don't need to specify any options you don't want to use.
One particular note is that if either of the worldinfo or worldinfo_onetime values exists, even as an empty object, then that enables the "WorldInfo override" feature for that dimension (see further down for more info about that).
Most common options
dim (int) - the (Forge) dimension ID this entry is for. This is an integer value, and is unique for each dimension. This value should always exist for every dimension config entry, otherwise the entry won't do anything as it doesn't target any dimension. The vanilla dimension IDs are 0 for the Overworld, -1 for The Nether, and `1´ for The End.
dimensiontype (object) - This defines what type of dimension to register.
- If you want to register a new dimension, or replace/override an existing dimension, then the dimension entry should have this value
- If you are just overriding some settings for an already existing (vanilla or other mod) dimension without overriding the entire dimension, then this value is not needed
- This
DimensionType object (as it's called in the MCP mappings) defines only a small number of basic settings for the dimension:
id (int) - The "Dimension Type ID" (in vanilla it's the only dimension ID, but under Forge this is separate from the "actual dimension ID", and this "DimensionType ID" doesn't need to be unique)
name (string) - The dimension's name. This isn't that important for many things, it's mostly just visible for teleportation related items and things.
keeploaded (boolean) - Whether the dimension's spawn chunks are allowed to unload.
- Note that this is not a chunk loading option. This controls the vanilla spawn chunks behavior (think overworld spawn chunks).
- Basically if this is
true, then the spawn chunks are not allowed to unload after something has laoded them.
- This option will not automatically load them. Nor does this keep the chunks ticking with no players in the same dimension (for block entities) or nearby (for entities).
worldprovider (string) - This is the most important option here. It's the class name of the WorldProvide to use. In many cases you want to use one of the three JED WorldProvider variants, and those are needed for most (but not all) of the config options inside the jed object to work.
require_exact_match (boolean) - This is a JED option, which controls whether an exact match of all the values is required, or whether JED can use pre-registered common DimensionType instances that have a different name and id.
- The name and id aren't usually that important, so re-using those pre-registered instances can avoid some issues with
DimensionType entries registered later after game start not actually working properly.
- Apparently one cause for such issues is having Optifine installed. This is because the
DimensionType in the vanilla code is a Java enum, and isn't supposed to be modified at run-time. So adding new entries to it might not work if the JIT has already optimized away the values() method to return the earlier fixed list of values. And apparently Optifine calls the values() method a lot, which causes the JIT to optimize it away pretty quickly. Which means that trying to register new dimensions some time after game start does not work anymore. For this reason JED pre-registers a small number of DimensionType values early on, and uses those when possible (the important thing is that the worldprovider value and keeploaded both match, as those change behavior significantly.)
override (boolean) - If true, and a dimension already exists by this ID, then that dimension will be overridden by this dimension. Use the dimensiontype option to define what type of dimension to register.
worldinfo (object) - This can set any of the values that vanilla keeps in the WorldInfo class (MCP name).
- If this value (or
worldinfo_onetime) exists, that also enabled the "WorldInfo override" feature for this dimension. Without the override these would have no effect on most dimensions except for the overworld.
- These values are stored in the
level.dat file in vanilla, or by JED in the jed_level.dat file.
- These values include: the dimension's spawn point, the world seed (
RandomSeed), the WorldType (generatorName) and the world generator settings (generatorOptions), the difficulty, game rules, game type (game mode), time settings, weather counters, world border settings and a few others. A full list of the options is provided further down.
worldinfo_onetime (object) - Same as worldinfo, but the values are only applied once, when the dimension is loaded for the very first time.
- In most cases you should use this instead of
worldinfo
- The only cases where you need to use
worldinfo instead of worldinfo_onetime are:
- If you actually want to reset these settings every time the dimension is loaded
- If the server is running Sponge, then the
generatorName and generatorOptions values will (for some reason) get reset on subsequent dimension loads, so you need to use worldinfo to set them every time
jed (object) - This object can hold a lot of different JED-specific options to configure the behavior and properties of the dimension. See further down for a full list of the possible options.
- Most (but not all) of the options inside this object will require the dimension to be using one of JED's WorldProvider variants. This is because many of the configs are implemented by overriding the vanilla methods in the
WorldProvider class with variants that check if the value was defined in the JED dimension config, and if not, then continue with the vanilla behavior.
The rest of the options (which might be used less often)
biome (string) - If this option exists, then JED will force the dimension to use the vanilla single biome BiomeProviderSingle.
- The dimension will only have a single biome everywhere. And no, you can't specify multiple biomes here. I know many users want that functionality, but the vanilla single biome provider is exactly just that - the same single biome everywhere.
biomeprovider (string) - Force using the given BiomeProvider class.
- Note that this may be of limited use, as modded BiomeProviders might use custom constructors, meaning that JED doesn't know how to create the instance.
- This was mainly added for better compatibility with the Painted Biomes mod. For that, use the value
fi.dy.masa.paintedbiomes.world.BiomeProviderPaintedBiomes.
chunkgenerator (string) - Overrides the ChunkGenerator using the given class.
disable_teleporting_from (boolean) - If true, then the Forge teleport event is used to cancel any teleports from this dimension.
- Note that all mods might not use/respect the event, and teleport commands will still work.
disable_teleporting_to (boolean) - If true, then the Forge teleport event is used to cancel any teleports to this dimension.
- Note that all mods might not use/respect the event, and teleport commands will still work.
load_on_start (boolean) - If this is true, then the dimension will be registered earlier than than usual, so that the dimension will get loaded by vanilla/Forge during server start.
- Usually you don't want the dimension to get loaded for no good reason. There are some special cases when you might need this, but by default leave this out.
normal_biomes (boolean) - Force the dimension to use the normal vanilla overworld biome provider.
- This would allow you to get the overworld biomes (as in the biome value saved in the world) in the Nether or the End, however those dimensions use their own ChunkGenerators which don't care about the biome for the terrain generation.
- A more useful example is using this in a "superflat" dimension, which normally uses the single biome provider. So you can get normal biomes in a flat world with this option.
post_deletion_command (string) - A command to run after a temorary dimension is deleted (see below).
spawn_structure (object) - Place a structure/schematic to the world when the dimension is first loaded
temporary_dimension (boolean) - If this is true, then the dimension is intended to be a "temporary dimension", and it will get deleted as soon as all players leave the dimension, and it's allowed to unload (i.e. no chunks are force loaded). THis might be useful for some type of resetting quest dimensions and such.
unregister (boolean) - If true, then an existing dimension will be unregistered.
- Note: It's not possible to unregister the overworld. So many things in the vanilla and mod code assume the overworld to always be loaded, that doing so would break the game entirely.
- Also be careful with unregistering the other vanilla dimensions. Some mods also break if you unregister the Nether or the End.
- If you want to disable access to the vanilla dimensions, then instead of unregistering the dimension entirely, it might be better to just override it to be a void dimension, use the
disable_teleporting_to option, and maybe also set up the void/sky teleport option to immediately teleport out any player that manages to enter it anyway.
world_template (string) - Allows using a template world (shipped via the mod config directory) that gets copied to the save location for this dimension when the dimension is loaded for the first time.
- Note however that you can't "just do it" for any random dimensions due to how in 1.12.2 and earlier the game still uses per-world-global block IDs, which can and will be different in every modded world. That basically means that you would need to take every such template dimension from the same source world so that they all have the same block IDs, and you would need to also ship a template for the overworld i.e. dimension 0, which includes the source world's
level.dat file, which contains the Forge block registry (along with all other registries). But then you would need to also have some worldinfo_onetime overrides, you would most likely at least want to reset the world time back to zero, and probably randomize the world seed so that all worlds won't be the same. And you should probably manually edit the level.dat file to delete the player data tag, so that the player in single player won't always spawn in the same place with the same inventory they had in the original template world.
- So as a summary: This feature is problematic. In most cases you probably don't want to use it.
dimensions.json -> spawn_structure
The spawn_structure option allows you to specify a vanilla Structure Block template file or a schematic file that will be placed to the world relative to the dimension's spawn point when the dimension is loaded for the first time.
The schematic file sould be placed at config/justenoughdimensions/structures/name.<schematic | nbt>, so for example config/justenoughdimensions/structures/spawn_house.nbt.
The schematic can be created with one of the following options:
- The
/worldprimer create-structure command from the World Primer mod
- With the Litematica mod
- Vanilla Structure Blocks (these have a 32 block limit per side when saving though)
- The Schematica mod
I would recommend either World Primer or Litematica, but maybe I'm a bit biased in that... But the vanilla Structure Blocks do have the above mentioned size limit, and I don't remember if the Schematica mod has that or is able to save in the vanilla format or not.
Actually neither of these schematic formats is the best option for this. But I haven't added support for the Sponge schematic format or the Litematica schematic format (yet?).
The vanilla format is extremely memory-inefficient, and you can't really go beyond something like 100x100x100 blocks volume before you run into some serious issues with memory usage and server crashes with it.
And the old *.schematic format doesn't really scale with large number of blocks in the game, and it still relies on the old "magic metadata". That format doesn't work if you use NEID or JEID or something else to extend the number of block IDs beyond the 0..4095 range.
So as a short summary, use the vanilla *.nbt format if your structure is small-ish, let's say around 100x100x100 blocks volume or below, or if you use NEID or JEID or something else to extend the block ID range. Otherwise you can use the *.schematic format for far better memory efficiency and performance.
Below is a sort of "pseudo-json" example showing the possible keys and values (mostly for the rotation and mirror options).
"spawn_structure": {
"name": "spawn_house.nbt",
"rotation": "<none | cw_90 | cw_180 | ccw_90>",
"mirror": "<none | left_right | front_back>",
"centered": <true | false>,
"offset": [0, -4, 0],
"load_around": 16
}
Both rotation and mirror options default to none, so you don't need to specify them if you don't need to rotate the structure. centered defaults to false, but it's quite often a useful option, as it will center the structure horizontally to the dimension's spawn point (plus the specified offset). The offset option allows you to move the structure relative to the dimension's spawn point.
The load_around option specifies how many blocks (scaled up to full chunks) should be pre-loaded around the structure's area before starting to place the structure. This is useful to avoid terrain generation ripping through the just placed structure, when an adjacent chunk is loaded forming the 2x2 loaded chunk area that triggers generation in the middle 16x16 blocks of those chunks.
Here is an actual valid example. The mirror option has been omitted, as it's not being used.
"spawn_structure": {
"name": "spawn_house.nbt",
"rotation": "cw_90",
"centered": true,
"offset": [12, -9, -8],
"load_around": 16
}
The jed options
Note that most of these options need one of the custom JED WorldProviders to be used to work.
TODO: Add a list of the options that work without a JED WorldProvider.
AverageGroundLevel (int) - ?
CanDoLightning (boolean) - Enable/disable lightning (and also skeleton trap horses)
CanDoRainSnowIce (boolean) - Enable/disable water freezing, plus snowing and blocks (like Cauldrons) filling with water while raining.
- The snowing and blcoks filling with water also depend on
HasSkyLight for weather/rain to happen in the first place.
CanRespawnHere (boolean) - Whether the player can respawn in this dimension after dying
CanSleepHere (string) - One of allow, deny or bed_explodes
CanSpawnHostiles (boolean) - Override the normal difficulty-based mob spawning behaviour (peaceful vs. others) with this value
CanSpawnPeacefulMobs (boolean) - Override the normal value, which is true in hardcore mode and single player, and on servers it's the spawn-animals setting in server.properties
CelestialAngleMin (float, 0.0 .. 1.0) - Use a customized celestial angle range (needs both min and max set to take effect)
CelestialAngleMax (float, 0.0 .. 1.0) - Use a customized celestial angle range (needs both min and max set to take effect)
ChunkGenFactoryWorldProvider (string) - A temporary World Provider override during dimension load, which is just used to create a ChunkGenerator from a mod, that will then be used with some other World Provider later on
CloudColor (hex color string) - The color for the clouds
CloudHeight (int) - The render height for the clouds
CloudRenderer (string) - The fully qualified class name of a custom cloud renderer class
CustomDayCycle (boolean) - Enable a customized day cycle length. Set the day and night lengths in DayLength and NightLength.
DayCycleIncrement (int, default = 24000) - The amount of ticks the world time is incremented per day cycle when using the DayTimeMin and DayTimeMax options.
DayLength (int) - The custom day length, if CustomDayCycle is true
DayTimeMin (int, 0 - 23999) - Use a customized world time range. This may work weirdly with things... Needs both min and max set to take effect.
DayTimeMax (int, 0 - 23999) - Use a customized world time range. This may work weirdly with things... Needs both min and max set to take effect.
DisableDawnDuskColors (boolean) - Disables the sunrise and sunset sky/fog coloring at the horizon
DisableEnderDragon (boolean) - Overrides the DragonFightManager with a dummy class, disabling the Dragon related stuff. Needs WorldProviderEndJED.
DisableEndSpikes (boolean) - Uses ChunkGeneratorEndJED, which disables the End Spike (obsidian towers) generation. Needs WorldProviderEndJED.
DontAdvanceWeatherWhenSleeping (boolean) - Prevents clearing the weather when players sleep to pass the night
FogColor (hex color string) - The color for the fog effect.
FoggyBiomes (object) - Defines which biomes either have or don't have fog. See further down for more details.
ForceGameMode (boolean) -
GenerateFallbackSpawnBlock (boolean) - If true and the spawn position JED found is in mid-air (void dimensions), then a glass block will be placed right under the spawn point
HasSkyLight (boolean) - Affects things like weather and light calculations
HasXZFog (boolean) - (Thick) fog will be rendered around the player
Horizon (float) - The height of the horizon (used for sky rendering)
IgnoreSpawnSuitability (boolean) - If true, doesn't check the biome's spawn suitability or try to search for a grass block to spawn on when finding a spawn point for the dimension (in the overworld spawn point search type)
IsSurfaceWorld (boolean) - Compass & clock models, enables cloud & sky rendering, enables (vanilla) sleeping, enables pigmen spawning from portals
LightBrightness (array of exactly 16 floats) -
MoonColor (hex color string) - The color for the moon
MoonScale (float) - A scaling factor for the moon rendering
MovementFactor (float) - The Nether Portal scaling factor
MusicType (string) - The ambient music type that should be used in this dimension. You can get a list of the available values with the musictype dump in the TellMe mod.
NightLength (int) - The custom night length, if CustomDayCycle is true
PlayerInventoryGroup (string) - The inventory group this dimension should use, if the JED player inventory swapping is enabled.
RespawnDimension (int) - The dimension to respawn in, if CanRespawnHere is false
ShouldClientCheckLight (boolean) - Whether the client should check/re-calculate the light data in the received chunks
SkyBlend (float) - ?
SkyColor (hex color string) - The color of the sky
SkyDisableFlags (int) - A bitmask to disable the sun, moon or stars, if using SkyRenderType ??. (0x1, 0x2, 0x4)
SkyLightBlend (float) - Allows controlling the sky color blending with the light level, allowing to have a colored sky at night too. Range: 0.0 - 1.0, default = 1.0 (normal light blending).
SkyRenderer (string) - he fully qualified class name of a custom sky renderer class
SkyRenderType (int) -
SpawnPointSearchType (object) - Allows customizing the spawn point search code behaviour, and the algorithm to use for it
SunBrightness (float) - ?
SunBrightnessFactor (float) - ?
SunColor (hex color string) - The color for the sun
SunScale (float) - A scaling factor for the sun rendering
VoidTeleportInterval (int) - The interval in game ticks how often entities are checked if they need to be teleported from the void or the sky with the void_teleport and sky_teleport options. Default is 40 ticks (2 seconds).
WaterVaporizes (boolean) - Overrides whether water should vaporize (on bucket use and ice melting, like in the Nether)
WeatherRenderer (string) - The fully qualified class name of a custom weather renderer class
WorldBorderCenteredOnSpawn (boolean) - If true, and the dimension is using WorldInfo overrides, then the World Border will be centered on the dimension's spawn point
WorldProviderOverride (string) - Allows "manually" overriding the WorldProvider, without using a custom DimensionType entry with the correct provider
jed -> SpawnPointSearchType
This option allows you to specify the spawn point search algorithm and the allowed y-range for the spawn point.
The spawn point search automatically happens for any dimensions that use WorldInfo override. This is so that if the player is teleported to the dimension's spawn point, that position would hopefully be a safe location. If you don't want this search to happen, then use the type none.
type (string) - One of overworld, cavern or none. The cavern type is used for Nether dimensions by default. none skips the spawn point search for that dimension, and uses the spawn point of the overworld.
min_y (int) - The lowest y-coordinate to search in. Defaults to 30 in the cavern type and 1 in the overworld type.
max_y (int) - The highest y-coordinate to search in. Defaults to 120 in the cavern type and the chunk's highest filled section's top + 1 in the overworld type.
Example:
"SpawnPointSearchType": {
"type": "cavern",
"min_y": 40,
"max_y": 100
}
jed -> sky_teleport and void_teleport options
The sky teleport and void teleport features allow you to teleport away any entities from the dimension when the entity goes above or below the specified y height limit.
The sky teleport variant will trigger when the entity goes above the configured trigger_y y-height.
The void teleport variant will trigger when the entity goes below the configured trigger_y y-height.
Here is a "pseudo json" example showing the available options:
"<sky | void>_teleport": {
"dimension": 10,
"trigger_y": -10,
"find_surface": <true | false>,
"remove_fall_damage": <true | false>,
"fall_distance": 4.5,
"min_health_left": 1,
"teleport_type": "<same_location | fixed_location | spawn | scaled_location | relative_location | scaled_relative_location>",
"scale": [8, 1, 8],
"fixed_location": [256, 64, 256],
"relative_location": "~ 256 ~+32"
}
dimension (int) - The target dimension where the entity will be teleported to
trigger_y (int) - The trigger y height limit for teleportation. (sky = above this, void = below this)
find_surface (boolean) - If true, then the teleport code will place the entity on the ground (either above or below the configured position), instead of putting it exactly at the configured position.
remove_fall_damage (boolean) - Whether to completely remove fall damage when teleporting. (How did this work again? What if the entity falls after the teleport?)
fall_distance (float) - If remove_fall_damage doesn't exist, but this key/value does, then this value will be used as the fall distance when dealing fall damage on teleport
min_health_left (int) - If this value exists, then the maximum fall damage/distance will be limited such that this amount of health will remain
teleport_type (string) - One of same_location, fixed_location, spawn, scaled_location, relative_location, scaled_relative_location
same_location - the entity will be teleported to the same coordinates in the target dimension (when the teleport triggers)
fixed_location - The entity will be teleported to the given exact fixed location in the target dimension
spawn - The entity will be teleported to the dimension's spawn point in the target dimension
scaled_location - The entity will be teleported to a location that is scaled from its current coordinates by the given scale factors in scale.
relative_location - The entity will be teleported to a location that is relative to its current location. You can specify the vanilla command style relative offset in relative_location.
scaled_relative_location - The entity will be teleported to a location that is both scaled and relative to its current location. (TODO: scaling happens first, before relative offset, right?)
scale (array of 3 floats) - For scaled_location and scaled_relative_location. This is the coordinate scale factor from the entity's position in the current dimension to the position in the target dimension.
fixed_location (array of 3 ints) - The teleport position in the target dimension for the fixed_location type.
relative_location (string) - The vanilla command style relative position specifier for the relative_location and scaled_relative_location types.
Here is a real example:
"void_teleport": {
"dimension": 123,
"trigger_y": -50,
"find_surface": true,
"fall_distance": 7.5,
"teleport_type": "relative_location",
"relative_location": "~ 256 ~"
}
All possible options for worldinfo and worldinfo_onetime
generatorName (string) - The WorldType for the dimension
- Vanilla values:
default, default_1_1, flat, amplified, largeBiomes, debug_all_block_states
- Biomes 'O Plenty:
BIOMESOP
generatorOptions (string) - The generator settings. This is where your "superflat" settings string would go, or the vanilla customized overworld generator settings, or BoP config json strings etc.
generatorVersion (int) - Certain WorldTypes may be versioned. In vanilla the default WorldType must use 1 here, otherwise it will use default_1_1 type instead.
GameType (int) - The default game mode for joining players. 0 = survival, 1 = creative, 2 = adventure, 3 = spectator
GameRules (object) - An object of string-to-string key-value pairs for all the game rules you want to set/override from the default values
MapFeatures (int) - Use 0 to disable most structure generation. (No mineshafts, witch huts, ocean monuments, mansions, nether fortresses etc. will generate in this dimension)
RandomSeed (int or string) - The world seed. Either the numeric seed directly, or a string which will get converted into a numeric seed. If not specified, then the same seed from the overworld will be used.
- A special case is an empty string, which JED will use as indication to generate a new randomized seed for this dimension.
SpawnX (int) - The dimension's spawn point's X coordinate. You don't need to specify all three coordinates. The ones you leave out will... ??? TODO
SpawnY (int) - See above
SpawnZ (int) - See above
Time (long) - The total world time in this dimension. Note that you should never change this after the dimension is created, as it's used in various blocks and things for timing and delays, and changing it will break some stuff quite badly.
DayTime (long) - The current day time in this dimension. Sleeping will advance it t othe next morning, and using /time set xxx will set/reset the value.
LastPlayed
LevelName
clearWeatherTime
rainTime
raining (0 | 1) - Whether it's currently raining
thunderTime
thundering (0 | 1) - Whether it's currently thundering
hardcore (0 | 1) - Whether hardcore mode is enabled in this dimension
allowCommands (0 | 1) - Whether commands are allowed in this dimension
Difficulty
DifficultyLocked (0 | 1) - Whether chaging the difficulty is allowed (this is mostly for single player menu difficulty button)
BorderCenterX (int) - World border center point X coordinate
BorderCenterZ (int) - World border center point Z coordinate
BorderSize (int) - The size of the world border
BorderSizeLerpTime
BorderSizeLerpTarget
BorderSafeZone
BorderDamagePerBlock
BorderWarningBlocks
BorderWarningTime
评论 0
登录后参与评分
还没有评论,来抢沙发吧