Colored Lights
一种通过在区块级别进行着色来实现 Minecraft 彩色光照的折中方案。
通常情况下,计算彩色光照需要消耗大量内存,这使得它在实际应用中并不太可行。
本模组采用了一种折中的方法,它为每个区块角点计算光源颜色,并在区块内部进行平滑过渡。
尽管此方案并不完美且存在一些明显的问题,但它以极小的性能损耗实现了整体效果。
本模组完全在客户端运行,需要 Fabric 加载器和 API。
你可以在这里查看该模组的一些实际效果示例:
\
配置与模组集成
方块发出的颜色可以通过资源包进行配置!这意味着任何模组只需添加一个数据文件即可轻松实现彩色光照兼容。
要修改或添加光源颜色,请创建 assets/colored_lights/light_colors.json:
{
"replace": false,
"colors": {
"redstone_torch": "#ff3333",
"lava": "#ff9933"
}
}
配置必须提供发出光线的方块与其应发出的对应十六进制颜色值之间的映射。
请注意,由于颜色空间被压缩,颜色无法精确表示。
如果将 replace 指定为 true,则默认值将被清除。
对于仅添加到现有颜色映射或仅替换特定条目的资源包,应将 replace 设置为 false。
Colored Lights
A compromise solution to colored lighting in Minecraft by tinting based on area.
Normally, computing colored lighting would require excessive memory requirements which makes it unfortunately quite impractical.
This mod takes a compromising approach that calculates light colors instead for each chunk corner, and smoothly blends between them within the chunk.
Although this solution is not perfect and does have noticeable issues, it achieves the general effect with minimal performance impact.
This mod works entirely client-side and requires both Fabric Loader and API.
You can see some examples of the mod in action here:
\
Configuration & Mod Integration
The colors emitted by blocks can be configured with a resource pack! This means any mod can easily add colored light
compatibility by just adding a data file.
To modify or add light colors, create assets/colored_lights/light_colors.json:
{
"replace": false,
"colors": {
"redstone_torch": "#ff3333",
"lava": "#ff9933"
}
}
The configuration must provide a mapping between blocks that emit light and the corresponding hex color value that they should emit.
Note that colors aren't represented exactly due to the color space being compressed down.
If replace is specified as true, the default values will be cleared.
For any pack just adding to existing color mappings or just replacing specific entries, replace should be false.
评论 0
登录后参与评分
还没有评论,来抢沙发吧