该模组会在满足以下三个条件时,将普通火焰光源转换为灵魂火焰光源:
- 气温足够低,可以下雪。
- 环境足够暗,可以睡觉。
- 光源暴露在充足的天空光下。
在实际应用中,这意味着在雪原生物群系中,火把和灯笼等光源在夜间或雷暴期间处于室外时,会被转换为灵魂火把和灵魂灯笼。不过,“室外”的判定范围并不完全精确。在世界生成阶段,符合条件的场景中的光源会自动转换,因此当你走进一个雪原村庄时,原本生成的火把和灯笼应该已经是灵魂形态了。
本模组还内置了对优秀模组 Soul Candles 的支持。需要说明的是,由于主要受限于技术原因,目前不支持将杰克南瓜灯转换为灵魂杰克南瓜灯,但你可以自行脑补任何背景故事来合理化这一点。
扩展的生物群系支持
默认情况下,与人们可能预期的相反,Creeping Chill 不会在灵魂沙峡谷中将火焰光源转换为灵魂火焰光源。不过,你可以通过将其(或任何其他生物群系)添加到 creeping-chill:is_always_creeping 生物群系标签中来启用此功能。这样做将使火焰光源始终转换为灵魂火焰光源,无论生物群系温度、天空光级别或其他任何因素如何。
例如,要将此标签应用于灵魂沙峡谷,你可以在数据包中创建文件 my-epic-data-pack/data/creeping-chill/tags/worldgen/biome/is_always_creeping.json,内容如下:
{
"replace": false,
"values": [
"minecraft:soul_sand_valley"
]
}
自定义灵魂转换
Creeping Chill 还允许用户提供自己的自定义灵魂转换,即从火焰光源到灵魂火焰光源的转换。这是通过 creeping-chill:soul_conversion 动态注册表处理的,也是实现 Soul Candles 模组支持的方式。
要添加自定义转换,以红石火把转换为灵魂火把为例,你可以在数据包中创建文件 my-epic-data-pack/data/my-epic-namespace/creeping-chill/soul_conversion/redstone_torch.json,内容如下:
{
"input": {
"Name": "minecraft:redstone_torch",
"Properties": {
"lit": true
}
},
"output": {
"Name": "minecraft:soul_torch"
}
}
直接使用上述配置即可生效,但如果 minecraft:redstone_torch 或 minecraft:soul_torch 不存在则会报错。这对于原版方块来说通常不是问题,但对于模组添加的方块则不然。例如,如果你不想使用红石火把,而是想为某个模组的 their-epic-mod:their_epic_torch(假设它可以点亮也可以熄灭)添加转换,并且不要求必须安装该模组,你可以在转换配置中添加一个设为 false 的 required 字段,如下所示:
{
"required": false,
"input": {
"Name": "their-epic-mod:their_epic_torch",
"Properties": {
"lit": true
}
},
"output": {
"Name": "minecraft:soul_torch"
}
}
这样,只有当 their-epic-mod:their_epic_torch 确实存在于游戏中时,该转换才会激活。
请注意,由于对灵魂转换的天空光检测是在待转换的方块内部进行的,因此会阻挡天空光的方块最终不会被转换,因为它们所在位置的天空光级别始终为 0。
This mod converts normal fire light sources to soul fire light sources under three conditions:
- It is cold enough to snow.
- It is dark enough to sleep.
- The light source is exposed to enough sky light.
In practice, this means that in snowy biomes, light sources such as torches and lanterns will be converted to soul torches and soul lanterns when outside at night, or during thunderstorms. Though, the bounds of "outside" remain fuzzy and imperfect. During world generation, light sources in applicable circumstances will be automatically converted, so for instance when you walk into a snowy village, the torches and lanterns that normally generate should already be in their soul forms.
This mod also has built-in support for the excellent Soul Candles mod. Converting Jack o'Lanterns to soul Jack o'Lanterns is however not supported, admittedly due mainly to technical limitations, but feel free to imagine whatever lore to justify it.
Extended Biome Support
By default, counter to what one might expect, Creeping Chill does not convert fire light sources to soul fire light sources in soul sand valleys. This however can be enabled by adding it, or any other biome, to the creeping-chill:is_always_creeping biome tag. Doing so will make it so fire light sources will always convert to soul fire light sources, regardless of biome temperature or sky light level, or any other factors.
For instance, to apply this tag to soul sand valleys, one would create a file in their data pack at my-epic-data-pack/data/creeping-chill/tags/worldgen/biome/is_always_creeping.json with the following contents:
{
"replace": false,
"values": [
"minecraft:soul_sand_valley"
]
}
Custom Soul Conversions
Creeping Chill also allows users to provide their own custom soul conversions, that is, a conversion from a fire light source to a soul fire light source. This is handled via the creeping-chill:soul_conversion dynamic registry, and is how the support for the Soul Candles mod is implemented.
To add a custom conversion, for the sake of example let's say from a redstone torch to a soul torch, one would create a file in their data pack at my-epic-data-pack/data/my-epic-namespace/creeping-chill/soul_conversion/redstone_torch.json, with the following contents:
{
"input": {
"Name": "minecraft:redstone_torch",
"Properties": {
"lit": true
}
},
"output": {
"Name": "minecraft:soul_torch"
}
}
Using this as-is will work, but it would error if either minecraft:redstone_torch or minecraft:soul_torch did not exist. That isn't really a consideration for vanilla blocks, but it is for blocks that are added by mods. So for instance if, instead of a redstone torch, you wanted to add a conversion for some mod's own their-epic-mod:their_epic_torch (which let's say can be either lit or unlit), but without requiring that that mod is installed, you could add a required field set to false in the conversion, like so:
{
"required": false,
"input": {
"Name": "their-epic-mod:their_epic_torch",
"Properties": {
"lit": true
}
},
"output": {
"Name": "minecraft:soul_torch"
}
}
This would then only become active if their-epic-mod:their_epic_torch in fact exists in the game.
Do keep in mind however, that since the sky light test for soul conversions is performed inside the to-be-converted block, blocks which block skylight will not end up being converted, since the sky light level at their positions will always be 0.
评论 0
登录后参与评分
还没有评论,来抢沙发吧