发光标签
在重度整合包中搜索所有会发光的方块,通常意味着需要手动在 JEI/EMI 中滚动浏览,并祈祷没有遗漏任何内容。本模组会自动为你生成该列表。
在运行时,它会扫描当前加载的每一个方块(包括原版和模组添加的),并检查其任何可能的状态是否都能发光,而不仅仅是默认外观。这也能捕捉到条件性光源:例如未点亮的红石灯仍然会被计入,因为它在通电后会发光;蜡烛、海泡菜以及其他仅在特定条件下才会发光的物品同理。结果会被写入一个真实的 c:emits_light 标签,并镜像到对应的物品上,这样在 JEI 或 EMI 的搜索栏中输入 #emits_light 即可返回完整列表。
纯数据包无法实现此功能。方块的发光特性定义在每个模组的 Java 代码中,而非 JSON 文件里,因此静态文件永远无法涵盖玩家实际安装的模组列表。在运行时动态生成标签是保持其准确性的唯一方式。
无需 JEI 或 EMI 插件代码支持。两者本身已支持 #tag 搜索,因此无论你是否安装了其中之一、两者都安装或未安装,本模组的工作方式均相同。如果其他模组或数据包已经定义了 c:emits_light 中的条目,本模组会将它们合并,而不是覆盖。
适用于 Fabric 1.20.1 和 NeoForge 1.21.1。
此功能仅影响搜索界面。它不会触及配方、战利品表或合成系统。
Emit Light Tag
Searching a heavily modded pack for every block that gives off light usually means scrolling through JEI/EMI by hand and hoping you didn't miss anything. This mod builds the list for you.
At runtime, it scans every block currently loaded, vanilla or modded, and checks whether any of its possible states can emit light, not just its default appearance. That catches conditional sources too: an unlit redstone lamp still counts, since it lights up once powered, and the same goes for candles, sea pickles, and anything else that only glows under specific conditions. The result gets written into a real c:emits_light tag, mirrored onto the matching items, so typing #emits_light into JEI or EMI's search bar returns the full list.
A plain datapack can't do this. Block light emission is defined in each mod's Java code, not in JSON, so a static file can never account for whatever mod list a player actually has installed. Generating the tag at runtime is the only way to keep it accurate.
No JEI or EMI plugin code is required. Both already support #tag search on their own, so the mod works the same whether you have one, both, or neither installed. If another mod or datapack already defines entries for c:emits_light, this merges with them instead of overwriting.
Available for Fabric 1.20.1 and NeoForge 1.21.1.
This only affects search. It doesn't touch recipes, loot tables, or crafting.
评论 0
登录后参与评分
还没有评论,来抢沙发吧