介绍
A library mod for Fabric and NeoForge that lets entities emit real block light as they move.
- Light is computed on the server and synced to every client tracking the entity.
- Installing the mod alone changes nothing; every tag ships empty.
- Required on both client and server.
API
All entry points live in io.github.jason13official.living_lights.api.common.lighting.
LightEmitter
Implement on your entity to emit light directly; checked first, computed on both sides.
public class GlowingMob extends Monster implements LightEmitter {
@Override
public int getLightEmission() {
return this.isAggressive() ? 15 : 7;
}
}
LightEmission.register
Add rules for any living entity; the brightest result wins.
public class MyMod {
private void onAnEvent() {
LightEmission.register(entity -> entity.isOnFire() ? 15 : 0);
LightEmission.register(entity -> entity.hasEffect(MobEffects.GLOWING), 8);
}
}
LightEmission.set / clear
Light entities that don’t tick, like part entities; call on both client and server, every time the entity moves.
public class EntityBodyPart {
public void customTick() {
LightEmission.set(segment, 15);
}
public void onRemoval() {
LightEmission.clear(segment);
}
}
Tags
- Entity
#living_lights:luminous: Always emits light level 15 - Item
#living_lights:luminous_when_equipped: Emits light while held or worn in any equipment slot - Item
#living_lights:luminous_in_inventory: Emits light from anywhere in a player’s inventory
Tagged block items emit their block’s light level (torch 14, soul lantern 10); other items emit 15.
Data component
living_lights:light_emission (0-15) sets an exact light level for one stack while it’s equipped, overriding the item tags.
public class MyMod {
private void onAnEvent() {
stack.set(LightEmission.component(), 12);
}
}
/give @s minecraft:blaze_rod[living_lights:light_emission=12]
常见问题
LiLi | Living Lights 支持哪些 Minecraft 版本?
LiLi | Living Lights 支持 Minecraft Java 版 26.1.2,可用的加载器:Fabric / NeoForge。下载时注意选择和你游戏版本一致的文件。
LiLi | Living Lights 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
jason13official 的其他作品
查看全部 →[Let's Do] 葡萄园 [Let’s Do] Vinery
阳光洒满的葡萄园,吱呀作响的木桶,凉爽酒窖里落满灰尘的酒瓶。种植葡萄,压榨自酿葡萄酒,打造你梦想中的酒庄。
MonoLib
一个适用于 Fabric、Forge 和 NeoForge 的非侵入式前置库模组。
Dis-Enchanting Table
从附魔武器或附魔书中回收附魔!
Animal Armor Trims – Horse & Wolf
现在你可以给马铠和狼铠添加盔甲纹饰了!
评论
登录后评论和评分